Skip to content
Snippets Groups Projects
Commit b3791d21 authored by Alena Petraki's avatar Alena Petraki
Browse files

Интерфейс Versions вынесен в pkg/version

parent 7a966155
No related branches found
No related tags found
No related merge requests found
package account package account
import ( import (
"git.perx.ru/perxis/perxis-go/pkg/account/version"
"git.perx.ru/perxis/perxis-go/pkg/auth" "git.perx.ru/perxis/perxis-go/pkg/auth"
"git.perx.ru/perxis/perxis-go/pkg/members" "git.perx.ru/perxis/perxis-go/pkg/members"
msobserver "git.perx.ru/perxis/perxis-go/pkg/members/observer" msobserver "git.perx.ru/perxis/perxis-go/pkg/members/observer"
"git.perx.ru/perxis/perxis-go/pkg/organizations" "git.perx.ru/perxis/perxis-go/pkg/organizations"
"git.perx.ru/perxis/perxis-go/pkg/users" "git.perx.ru/perxis/perxis-go/pkg/users"
"git.perx.ru/perxis/perxis-go/pkg/version"
"google.golang.org/grpc" "google.golang.org/grpc"
) )
......
package version
import (
"context"
"git.perx.ru/perxis/perxis-go/pkg/version"
)
// @microgen grpc
// @protobuf git.perx.ru/perxis/perxis-go/proto/versions/account
// @grpc-addr account.Versions
type Versions interface {
Get(ctx context.Context) (version *version.Version, err error)
}
...@@ -5,7 +5,7 @@ package transport ...@@ -5,7 +5,7 @@ package transport
import ( import (
"context" "context"
versions "git.perx.ru/perxis/perxis-go/pkg/account/version" versions "git.perx.ru/perxis/perxis-go/pkg/version"
endpoint "github.com/go-kit/kit/endpoint" endpoint "github.com/go-kit/kit/endpoint"
) )
......
...@@ -5,7 +5,6 @@ import ( ...@@ -5,7 +5,6 @@ import (
"git.perx.ru/perxis/perxis-go/pkg/clients" "git.perx.ru/perxis/perxis-go/pkg/clients"
"git.perx.ru/perxis/perxis-go/pkg/collaborators" "git.perx.ru/perxis/perxis-go/pkg/collaborators"
"git.perx.ru/perxis/perxis-go/pkg/collections" "git.perx.ru/perxis/perxis-go/pkg/collections"
"git.perx.ru/perxis/perxis-go/pkg/content/version"
"git.perx.ru/perxis/perxis-go/pkg/environments" "git.perx.ru/perxis/perxis-go/pkg/environments"
"git.perx.ru/perxis/perxis-go/pkg/invitations" "git.perx.ru/perxis/perxis-go/pkg/invitations"
"git.perx.ru/perxis/perxis-go/pkg/items" "git.perx.ru/perxis/perxis-go/pkg/items"
...@@ -13,6 +12,7 @@ import ( ...@@ -13,6 +12,7 @@ import (
"git.perx.ru/perxis/perxis-go/pkg/references" "git.perx.ru/perxis/perxis-go/pkg/references"
"git.perx.ru/perxis/perxis-go/pkg/roles" "git.perx.ru/perxis/perxis-go/pkg/roles"
"git.perx.ru/perxis/perxis-go/pkg/spaces" "git.perx.ru/perxis/perxis-go/pkg/spaces"
"git.perx.ru/perxis/perxis-go/pkg/version"
) )
type Runnable interface { type Runnable interface {
......
// Code generated by mockery v2.7.4. DO NOT EDIT.
package mocks
import (
context "context"
version "git.perx.ru/perxis/perxis-go/pkg/version"
mock "github.com/stretchr/testify/mock"
)
// Versions is an autogenerated mock type for the Versions type
type Versions struct {
mock.Mock
}
// Get provides a mock function with given fields: ctx
func (_m *Versions) Get(ctx context.Context) (*version.Version, error) {
ret := _m.Called(ctx)
var r0 *version.Version
if rf, ok := ret.Get(0).(func(context.Context) *version.Version); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*version.Version)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
package version
import (
"context"
"git.perx.ru/perxis/perxis-go/pkg/version"
)
// @microgen grpc
// @protobuf git.perx.ru/perxis/perxis-go/proto/versions/content
// @grpc-addr content.Versions
type Versions interface {
Get(ctx context.Context) (version *version.Version, err error)
}
...@@ -5,7 +5,7 @@ package transport ...@@ -5,7 +5,7 @@ package transport
import ( import (
"context" "context"
versions "git.perx.ru/perxis/perxis-go/pkg/content/version" versions "git.perx.ru/perxis/perxis-go/pkg/version"
endpoint "github.com/go-kit/kit/endpoint" endpoint "github.com/go-kit/kit/endpoint"
) )
......
package version package version
import ( import (
"context"
"fmt" "fmt"
) )
type Versions interface {
Get(ctx context.Context) (version *Version, err error)
}
type Version struct { type Version struct {
ServerVersion string ServerVersion string
APIVersion string APIVersion string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment