Skip to content
Snippets Groups Projects
Commit 7b0a9536 authored by Anton Sattarov's avatar Anton Sattarov :cucumber:
Browse files

fix pkg

parent 95eb39a0
Branches
Tags
No related merge requests found
......@@ -5,7 +5,7 @@ package mocks
import (
context "context"
spaces "git.perx.ru/perxis/perxis-go/spaces"
space "git.perx.ru/perxis/perxis-go/pkg/space"
mock "github.com/stretchr/testify/mock"
)
......@@ -14,25 +14,25 @@ type Spaces struct {
mock.Mock
}
// Create provides a mock function with given fields: ctx, space
func (_m *Spaces) Create(ctx context.Context, space *spaces.Space) (*spaces.Space, error) {
ret := _m.Called(ctx, space)
// Create provides a mock function with given fields: ctx, _a1
func (_m *Spaces) Create(ctx context.Context, _a1 *space.Space) (*space.Space, error) {
ret := _m.Called(ctx, _a1)
var r0 *spaces.Space
var r0 *space.Space
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) (*spaces.Space, error)); ok {
return rf(ctx, space)
if rf, ok := ret.Get(0).(func(context.Context, *space.Space) (*space.Space, error)); ok {
return rf(ctx, _a1)
}
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) *spaces.Space); ok {
r0 = rf(ctx, space)
if rf, ok := ret.Get(0).(func(context.Context, *space.Space) *space.Space); ok {
r0 = rf(ctx, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*spaces.Space)
r0 = ret.Get(0).(*space.Space)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *spaces.Space) error); ok {
r1 = rf(ctx, space)
if rf, ok := ret.Get(1).(func(context.Context, *space.Space) error); ok {
r1 = rf(ctx, _a1)
} else {
r1 = ret.Error(1)
}
......@@ -55,19 +55,19 @@ func (_m *Spaces) Delete(ctx context.Context, spaceId string) error {
}
// Get provides a mock function with given fields: ctx, spaceId
func (_m *Spaces) Get(ctx context.Context, spaceId string) (*spaces.Space, error) {
func (_m *Spaces) Get(ctx context.Context, spaceId string) (*space.Space, error) {
ret := _m.Called(ctx, spaceId)
var r0 *spaces.Space
var r0 *space.Space
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (*spaces.Space, error)); ok {
if rf, ok := ret.Get(0).(func(context.Context, string) (*space.Space, error)); ok {
return rf(ctx, spaceId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) *spaces.Space); ok {
if rf, ok := ret.Get(0).(func(context.Context, string) *space.Space); ok {
r0 = rf(ctx, spaceId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*spaces.Space)
r0 = ret.Get(0).(*space.Space)
}
}
......@@ -81,19 +81,19 @@ func (_m *Spaces) Get(ctx context.Context, spaceId string) (*spaces.Space, error
}
// List provides a mock function with given fields: ctx, orgId
func (_m *Spaces) List(ctx context.Context, orgId string) ([]*spaces.Space, error) {
func (_m *Spaces) List(ctx context.Context, orgId string) ([]*space.Space, error) {
ret := _m.Called(ctx, orgId)
var r0 []*spaces.Space
var r0 []*space.Space
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*spaces.Space, error)); ok {
if rf, ok := ret.Get(0).(func(context.Context, string) ([]*space.Space, error)); ok {
return rf(ctx, orgId)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []*spaces.Space); ok {
if rf, ok := ret.Get(0).(func(context.Context, string) []*space.Space); ok {
r0 = rf(ctx, orgId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*spaces.Space)
r0 = ret.Get(0).([]*space.Space)
}
}
......@@ -106,13 +106,13 @@ func (_m *Spaces) List(ctx context.Context, orgId string) ([]*spaces.Space, erro
return r0, r1
}
// Update provides a mock function with given fields: ctx, space
func (_m *Spaces) Update(ctx context.Context, space *spaces.Space) error {
ret := _m.Called(ctx, space)
// Update provides a mock function with given fields: ctx, _a1
func (_m *Spaces) Update(ctx context.Context, _a1 *space.Space) error {
ret := _m.Called(ctx, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) error); ok {
r0 = rf(ctx, space)
if rf, ok := ret.Get(0).(func(context.Context, *space.Space) error); ok {
r0 = rf(ctx, _a1)
} else {
r0 = ret.Error(0)
}
......@@ -121,11 +121,11 @@ func (_m *Spaces) Update(ctx context.Context, space *spaces.Space) error {
}
// UpdateConfig provides a mock function with given fields: ctx, spaceId, config
func (_m *Spaces) UpdateConfig(ctx context.Context, spaceId string, config *spaces.Config) error {
func (_m *Spaces) UpdateConfig(ctx context.Context, spaceId string, config *space.Config) error {
ret := _m.Called(ctx, spaceId, config)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, *spaces.Config) error); ok {
if rf, ok := ret.Get(0).(func(context.Context, string, *space.Config) error); ok {
r0 = rf(ctx, spaceId, config)
} else {
r0 = ret.Error(0)
......
package spaces
package space
import (
"context"
......
package spaces
package space
type State int
......
......@@ -5,7 +5,7 @@ package transport
import (
"context"
spaces "git.perx.ru/perxis/perxis-go/spaces"
spaces "git.perx.ru/perxis/perxis-go/pkg/space"
)
func (set EndpointsSet) Create(arg0 context.Context, arg1 *spaces.Space) (res0 *spaces.Space, res1 error) {
......
......@@ -2,7 +2,7 @@
package transport
import spaces "git.perx.ru/perxis/perxis-go/spaces"
import spaces "git.perx.ru/perxis/perxis-go/pkg/space"
type (
CreateRequest struct {
......
......@@ -4,7 +4,7 @@ package transportgrpc
import (
grpcerr "git.perx.ru/perxis/perxis-go/pkg/errors/grpc"
transport "git.perx.ru/perxis/perxis-go/spaces/transport"
transport "git.perx.ru/perxis/perxis-go/pkg/space/transport"
grpckit "github.com/go-kit/kit/transport/grpc"
grpc "google.golang.org/grpc"
)
......
......@@ -3,8 +3,8 @@
package transportgrpc
import (
transport "git.perx.ru/perxis/perxis-go/pkg/space/transport"
pb "git.perx.ru/perxis/perxis-go/proto/spaces"
transport "git.perx.ru/perxis/perxis-go/spaces/transport"
grpckit "github.com/go-kit/kit/transport/grpc"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
......
......@@ -7,8 +7,8 @@ import (
"context"
"errors"
transport "git.perx.ru/perxis/perxis-go/pkg/space/transport"
pb "git.perx.ru/perxis/perxis-go/proto/spaces"
transport "git.perx.ru/perxis/perxis-go/spaces/transport"
empty "github.com/golang/protobuf/ptypes/empty"
)
......
......@@ -5,8 +5,8 @@
package transportgrpc
import (
service "git.perx.ru/perxis/perxis-go/pkg/space"
pb "git.perx.ru/perxis/perxis-go/proto/spaces"
service "git.perx.ru/perxis/perxis-go/spaces"
)
func PtrConfigToProto(config *service.Config) (*pb.Config, error) {
......
......@@ -2,13 +2,13 @@ package transportgrpc
import (
grpcerr "git.perx.ru/perxis/perxis-go/pkg/errors/grpc"
"git.perx.ru/perxis/perxis-go/pkg/space"
"git.perx.ru/perxis/perxis-go/pkg/space/transport"
pb "git.perx.ru/perxis/perxis-go/proto/spaces"
"git.perx.ru/perxis/perxis-go/spaces"
"git.perx.ru/perxis/perxis-go/spaces/transport"
grpckit "github.com/go-kit/kit/transport/grpc"
)
func NewServer(svc spaces.Spaces, opts ...grpckit.ServerOption) pb.SpacesServer {
func NewServer(svc space.Spaces, opts ...grpckit.ServerOption) pb.SpacesServer {
eps := transport.Endpoints(svc)
eps = transport.EndpointsSet{
CreateEndpoint: grpcerr.ServerMiddleware(eps.CreateEndpoint),
......
......@@ -4,8 +4,8 @@
package transportgrpc
import (
transport "git.perx.ru/perxis/perxis-go/pkg/space/transport"
pb "git.perx.ru/perxis/perxis-go/proto/spaces"
transport "git.perx.ru/perxis/perxis-go/spaces/transport"
grpc "github.com/go-kit/kit/transport/grpc"
empty "github.com/golang/protobuf/ptypes/empty"
context "golang.org/x/net/context"
......
......@@ -5,7 +5,7 @@ package transport
import (
"context"
spaces "git.perx.ru/perxis/perxis-go/spaces"
spaces "git.perx.ru/perxis/perxis-go/pkg/space"
endpoint "github.com/go-kit/kit/endpoint"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment