forked from TrueCloudLab/frostfs-node
[#83] services/util: Define type of response message interface
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
7464254680
commit
71a06f9e01
6 changed files with 22 additions and 19 deletions
|
@ -23,7 +23,7 @@ func NewSignService(key *ecdsa.PrivateKey, svc container.Service) container.Serv
|
|||
|
||||
func (s *signService) Put(ctx context.Context, req *container.PutRequest) (*container.PutResponse, error) {
|
||||
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
|
||||
func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
func(ctx context.Context, req interface{}) (util.ResponseMessage, error) {
|
||||
return s.svc.Put(ctx, req.(*container.PutRequest))
|
||||
},
|
||||
)
|
||||
|
@ -36,7 +36,7 @@ func (s *signService) Put(ctx context.Context, req *container.PutRequest) (*cont
|
|||
|
||||
func (s *signService) Delete(ctx context.Context, req *container.DeleteRequest) (*container.DeleteResponse, error) {
|
||||
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
|
||||
func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
func(ctx context.Context, req interface{}) (util.ResponseMessage, error) {
|
||||
return s.svc.Delete(ctx, req.(*container.DeleteRequest))
|
||||
},
|
||||
)
|
||||
|
@ -49,7 +49,7 @@ func (s *signService) Delete(ctx context.Context, req *container.DeleteRequest)
|
|||
|
||||
func (s *signService) Get(ctx context.Context, req *container.GetRequest) (*container.GetResponse, error) {
|
||||
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
|
||||
func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
func(ctx context.Context, req interface{}) (util.ResponseMessage, error) {
|
||||
return s.svc.Get(ctx, req.(*container.GetRequest))
|
||||
},
|
||||
)
|
||||
|
@ -62,7 +62,7 @@ func (s *signService) Get(ctx context.Context, req *container.GetRequest) (*cont
|
|||
|
||||
func (s *signService) List(ctx context.Context, req *container.ListRequest) (*container.ListResponse, error) {
|
||||
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
|
||||
func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
func(ctx context.Context, req interface{}) (util.ResponseMessage, error) {
|
||||
return s.svc.List(ctx, req.(*container.ListRequest))
|
||||
},
|
||||
)
|
||||
|
@ -75,7 +75,7 @@ func (s *signService) List(ctx context.Context, req *container.ListRequest) (*co
|
|||
|
||||
func (s *signService) SetExtendedACL(ctx context.Context, req *container.SetExtendedACLRequest) (*container.SetExtendedACLResponse, error) {
|
||||
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
|
||||
func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
func(ctx context.Context, req interface{}) (util.ResponseMessage, error) {
|
||||
return s.svc.SetExtendedACL(ctx, req.(*container.SetExtendedACLRequest))
|
||||
},
|
||||
)
|
||||
|
@ -88,7 +88,7 @@ func (s *signService) SetExtendedACL(ctx context.Context, req *container.SetExte
|
|||
|
||||
func (s *signService) GetExtendedACL(ctx context.Context, req *container.GetExtendedACLRequest) (*container.GetExtendedACLResponse, error) {
|
||||
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
|
||||
func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
func(ctx context.Context, req interface{}) (util.ResponseMessage, error) {
|
||||
return s.svc.GetExtendedACL(ctx, req.(*container.GetExtendedACLRequest))
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue