[#425] services: Define service interfaces that was removed from API lib

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-03-15 13:53:08 +03:00 committed by Alex Vanin
parent e6f945e61d
commit 718a2fad26
29 changed files with 107 additions and 42 deletions

View file

@ -5,16 +5,17 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/accounting"
accountingGRPC "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc"
accountingsvc "github.com/nspcc-dev/neofs-node/pkg/services/accounting"
)
// Server wraps NeoFS API Accounting service and
// provides gRPC Accounting service server interface.
type Server struct {
srv accounting.Service
srv accountingsvc.Server
}
// New creates, initializes and returns Server instance.
func New(c accounting.Service) *Server {
func New(c accountingsvc.Server) *Server {
return &Server{
srv: c,
}

View file

@ -5,16 +5,17 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/container"
containerGRPC "github.com/nspcc-dev/neofs-api-go/v2/container/grpc"
containersvc "github.com/nspcc-dev/neofs-node/pkg/services/container"
)
// Server wraps NeoFS API Container service and
// provides gRPC Container service server interface.
type Server struct {
srv container.Service
srv containersvc.Server
}
// New creates, initializes and returns Server instance.
func New(c container.Service) *Server {
func New(c containersvc.Server) *Server {
return &Server{
srv: c,
}

View file

@ -5,16 +5,17 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/netmap"
netmapGRPC "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc"
netmapsvc "github.com/nspcc-dev/neofs-node/pkg/services/netmap"
)
// Server wraps NeoFS API Netmap service and
// provides gRPC Netmap service server interface.
type Server struct {
srv netmap.Service
srv netmapsvc.Server
}
// New creates, initializes and returns Server instance.
func New(c netmap.Service) *Server {
func New(c netmapsvc.Server) *Server {
return &Server{
srv: c,
}

View file

@ -5,16 +5,17 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/session"
sessionGRPC "github.com/nspcc-dev/neofs-api-go/v2/session/grpc"
sessionsvc "github.com/nspcc-dev/neofs-node/pkg/services/session"
)
// Server wraps NeoFS API Session service and
// provides gRPC Session service server interface.
type Server struct {
srv session.Service
srv sessionsvc.Server
}
// New creates, initializes and returns Server instance.
func New(c session.Service) *Server {
func New(c sessionsvc.Server) *Server {
return &Server{
srv: c,
}