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 ...@@ -5,7 +5,7 @@ package mocks
import ( import (
context "context" 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" mock "github.com/stretchr/testify/mock"
) )
...@@ -14,25 +14,25 @@ type Spaces struct { ...@@ -14,25 +14,25 @@ type Spaces struct {
mock.Mock mock.Mock
} }
// Create provides a mock function with given fields: ctx, space // Create provides a mock function with given fields: ctx, _a1
func (_m *Spaces) Create(ctx context.Context, space *spaces.Space) (*spaces.Space, error) { func (_m *Spaces) Create(ctx context.Context, _a1 *space.Space) (*space.Space, error) {
ret := _m.Called(ctx, space) ret := _m.Called(ctx, _a1)
var r0 *spaces.Space var r0 *space.Space
var r1 error var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) (*spaces.Space, error)); ok { if rf, ok := ret.Get(0).(func(context.Context, *space.Space) (*space.Space, error)); ok {
return rf(ctx, space) return rf(ctx, _a1)
} }
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) *spaces.Space); ok { if rf, ok := ret.Get(0).(func(context.Context, *space.Space) *space.Space); ok {
r0 = rf(ctx, space) r0 = rf(ctx, _a1)
} else { } else {
if ret.Get(0) != nil { 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 { if rf, ok := ret.Get(1).(func(context.Context, *space.Space) error); ok {
r1 = rf(ctx, space) r1 = rf(ctx, _a1)
} else { } else {
r1 = ret.Error(1) r1 = ret.Error(1)
} }
...@@ -55,19 +55,19 @@ func (_m *Spaces) Delete(ctx context.Context, spaceId string) error { ...@@ -55,19 +55,19 @@ func (_m *Spaces) Delete(ctx context.Context, spaceId string) error {
} }
// Get provides a mock function with given fields: ctx, spaceId // 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) ret := _m.Called(ctx, spaceId)
var r0 *spaces.Space var r0 *space.Space
var r1 error 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) 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) r0 = rf(ctx, spaceId)
} else { } else {
if ret.Get(0) != nil { 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 ...@@ -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 // 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) ret := _m.Called(ctx, orgId)
var r0 []*spaces.Space var r0 []*space.Space
var r1 error 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) 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) r0 = rf(ctx, orgId)
} else { } else {
if ret.Get(0) != nil { 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 ...@@ -106,13 +106,13 @@ func (_m *Spaces) List(ctx context.Context, orgId string) ([]*spaces.Space, erro
return r0, r1 return r0, r1
} }
// Update provides a mock function with given fields: ctx, space // Update provides a mock function with given fields: ctx, _a1
func (_m *Spaces) Update(ctx context.Context, space *spaces.Space) error { func (_m *Spaces) Update(ctx context.Context, _a1 *space.Space) error {
ret := _m.Called(ctx, space) ret := _m.Called(ctx, _a1)
var r0 error var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *spaces.Space) error); ok { if rf, ok := ret.Get(0).(func(context.Context, *space.Space) error); ok {
r0 = rf(ctx, space) r0 = rf(ctx, _a1)
} else { } else {
r0 = ret.Error(0) r0 = ret.Error(0)
} }
...@@ -121,11 +121,11 @@ func (_m *Spaces) Update(ctx context.Context, space *spaces.Space) error { ...@@ -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 // 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) ret := _m.Called(ctx, spaceId, config)
var r0 error 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) r0 = rf(ctx, spaceId, config)
} else { } else {
r0 = ret.Error(0) r0 = ret.Error(0)
......
package spaces package space
import ( import (
"context" "context"
......
package spaces package space
type State int type State int
......
...@@ -5,7 +5,7 @@ package transport ...@@ -5,7 +5,7 @@ package transport
import ( import (
"context" "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) { func (set EndpointsSet) Create(arg0 context.Context, arg1 *spaces.Space) (res0 *spaces.Space, res1 error) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
package transport package transport
import spaces "git.perx.ru/perxis/perxis-go/spaces" import spaces "git.perx.ru/perxis/perxis-go/pkg/space"
type ( type (
CreateRequest struct { CreateRequest struct {
......
...@@ -4,7 +4,7 @@ package transportgrpc ...@@ -4,7 +4,7 @@ package transportgrpc
import ( import (
grpcerr "git.perx.ru/perxis/perxis-go/pkg/errors/grpc" 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" grpckit "github.com/go-kit/kit/transport/grpc"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
) )
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
package transportgrpc package transportgrpc
import ( import (
transport "git.perx.ru/perxis/perxis-go/pkg/space/transport"
pb "git.perx.ru/perxis/perxis-go/proto/spaces" 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" grpckit "github.com/go-kit/kit/transport/grpc"
empty "github.com/golang/protobuf/ptypes/empty" empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
......
...@@ -7,8 +7,8 @@ import ( ...@@ -7,8 +7,8 @@ import (
"context" "context"
"errors" "errors"
transport "git.perx.ru/perxis/perxis-go/pkg/space/transport"
pb "git.perx.ru/perxis/perxis-go/proto/spaces" 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" empty "github.com/golang/protobuf/ptypes/empty"
) )
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
package transportgrpc package transportgrpc
import ( import (
service "git.perx.ru/perxis/perxis-go/pkg/space"
pb "git.perx.ru/perxis/perxis-go/proto/spaces" 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) { func PtrConfigToProto(config *service.Config) (*pb.Config, error) {
......
...@@ -2,13 +2,13 @@ package transportgrpc ...@@ -2,13 +2,13 @@ package transportgrpc
import ( import (
grpcerr "git.perx.ru/perxis/perxis-go/pkg/errors/grpc" 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" 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" 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.Endpoints(svc)
eps = transport.EndpointsSet{ eps = transport.EndpointsSet{
CreateEndpoint: grpcerr.ServerMiddleware(eps.CreateEndpoint), CreateEndpoint: grpcerr.ServerMiddleware(eps.CreateEndpoint),
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
package transportgrpc package transportgrpc
import ( import (
transport "git.perx.ru/perxis/perxis-go/pkg/space/transport"
pb "git.perx.ru/perxis/perxis-go/proto/spaces" 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" grpc "github.com/go-kit/kit/transport/grpc"
empty "github.com/golang/protobuf/ptypes/empty" empty "github.com/golang/protobuf/ptypes/empty"
context "golang.org/x/net/context" context "golang.org/x/net/context"
......
...@@ -5,7 +5,7 @@ package transport ...@@ -5,7 +5,7 @@ package transport
import ( import (
"context" "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" 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