Skip to content
Snippets Groups Projects
Commit 59a06d9b authored by Semyon Krestyaninov's avatar Semyon Krestyaninov :dog2:
Browse files

Merge branch 'refactor/6-pkg-refactor-operation' into 'refactor/PRXS-3306-MovePkgGroup1'

Пакет operation вынесен на корневой уровень

See merge request perxis/perxis-go!366
parents 51f2b9bf 8a5d1225
No related branches found
No related tags found
No related merge requests found
File moved
File moved
File moved
File moved
......@@ -3,7 +3,7 @@ package extension
import (
"context"
"git.perx.ru/perxis/perxis-go/pkg/operation"
"git.perx.ru/perxis/perxis-go/operation"
pb "git.perx.ru/perxis/perxis-go/proto/extensions"
"google.golang.org/grpc"
)
......
......@@ -4,8 +4,8 @@ import (
"context"
"strings"
operation2 "git.perx.ru/perxis/perxis-go/operation"
"git.perx.ru/perxis/perxis-go/pkg/errors"
"git.perx.ru/perxis/perxis-go/pkg/operation"
commonpb "git.perx.ru/perxis/perxis-go/proto/common"
pb "git.perx.ru/perxis/perxis-go/proto/extensions"
"google.golang.org/grpc"
......@@ -82,13 +82,13 @@ func WithRouteFn(fn RouteFn) ServerOption {
type Server struct {
extensions RouteFn
wrapErr WrapErrFn
operations operation.Service
operations operation2.Service
pb.UnimplementedExtensionServiceServer
}
func NewServer(options ...ServerOption) *Server {
srv := &Server{
operations: operation.NewDefaultService(),
operations: operation2.NewDefaultService(),
wrapErr: DefaultWrapErrFn(),
}
......@@ -100,11 +100,11 @@ func NewServer(options ...ServerOption) *Server {
}
func RegisterServer(grpcSrv *grpc.Server, srv *Server) {
commonpb.RegisterOperationServiceServer(grpcSrv, operation.NewServer(srv.operations))
commonpb.RegisterOperationServiceServer(grpcSrv, operation2.NewServer(srv.operations))
pb.RegisterExtensionServiceServer(grpcSrv, srv)
}
func (s *Server) Install(ctx context.Context, req *InstallRequest) (*operation.Proto, error) {
func (s *Server) Install(ctx context.Context, req *InstallRequest) (*operation2.Proto, error) {
exts, err := s.extensions(ctx, req.Extensions...)
if err != nil {
return nil, err
......@@ -124,7 +124,7 @@ func (s *Server) Install(ctx context.Context, req *InstallRequest) (*operation.P
return op.Proto(), err
}
func (s *Server) Uninstall(ctx context.Context, req *UninstallRequest) (*operation.Proto, error) {
func (s *Server) Uninstall(ctx context.Context, req *UninstallRequest) (*operation2.Proto, error) {
exts, err := s.extensions(ctx, req.Extensions...)
if err != nil {
return nil, err
......@@ -144,7 +144,7 @@ func (s *Server) Uninstall(ctx context.Context, req *UninstallRequest) (*operati
return op.Proto(), err
}
func (s *Server) Check(ctx context.Context, req *CheckRequest) (*operation.Proto, error) {
func (s *Server) Check(ctx context.Context, req *CheckRequest) (*operation2.Proto, error) {
exts, err := s.extensions(ctx, req.Extensions...)
if err != nil {
return nil, err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment