Adopt service session removal in packages

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-08-20 13:41:55 +03:00 committed by Stanislav Bogatyrev
parent 07f25bd012
commit 252b7036c7
13 changed files with 324 additions and 325 deletions

View file

@ -2,7 +2,7 @@ package accounting
import ( import (
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
) )
type BalanceRequestBody struct { type BalanceRequestBody struct {
@ -12,9 +12,9 @@ type BalanceRequestBody struct {
type BalanceRequest struct { type BalanceRequest struct {
body *BalanceRequestBody body *BalanceRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type BalanceResponseBody struct { type BalanceResponseBody struct {
@ -24,9 +24,9 @@ type BalanceResponseBody struct {
type BalanceResponse struct { type BalanceResponse struct {
body *BalanceResponseBody body *BalanceResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type Decimal struct { type Decimal struct {
@ -63,7 +63,7 @@ func (b *BalanceRequest) SetBody(v *BalanceRequestBody) {
} }
} }
func (b *BalanceRequest) GetMetaHeader() *service.RequestMetaHeader { func (b *BalanceRequest) GetMetaHeader() *session.RequestMetaHeader {
if b != nil { if b != nil {
return b.metaHeader return b.metaHeader
} }
@ -71,13 +71,13 @@ func (b *BalanceRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (b *BalanceRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (b *BalanceRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if b != nil { if b != nil {
b.metaHeader = v b.metaHeader = v
} }
} }
func (b *BalanceRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (b *BalanceRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if b != nil { if b != nil {
return b.verifyHeader return b.verifyHeader
} }
@ -85,7 +85,7 @@ func (b *BalanceRequest) GetVerificationHeader() *service.RequestVerificationHea
return nil return nil
} }
func (b *BalanceRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (b *BalanceRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if b != nil { if b != nil {
b.verifyHeader = v b.verifyHeader = v
} }
@ -147,7 +147,7 @@ func (br *BalanceResponse) SetBody(v *BalanceResponseBody) {
} }
} }
func (br *BalanceResponse) GetMetaHeader() *service.ResponseMetaHeader { func (br *BalanceResponse) GetMetaHeader() *session.ResponseMetaHeader {
if br != nil { if br != nil {
return br.metaHeader return br.metaHeader
} }
@ -155,13 +155,13 @@ func (br *BalanceResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (br *BalanceResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (br *BalanceResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if br != nil { if br != nil {
br.metaHeader = v br.metaHeader = v
} }
} }
func (br *BalanceResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (br *BalanceResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if br != nil { if br != nil {
return br.verifyHeader return br.verifyHeader
} }
@ -169,7 +169,7 @@ func (br *BalanceResponse) GetVerificationHeader() *service.ResponseVerification
return nil return nil
} }
func (br *BalanceResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (br *BalanceResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if br != nil { if br != nil {
br.verifyHeader = v br.verifyHeader = v
} }

View file

@ -3,7 +3,7 @@ package accounting
import ( import (
accounting "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc" accounting "github.com/nspcc-dev/neofs-api-go/v2/accounting/grpc"
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
) )
func BalanceRequestBodyToGRPCMessage(b *BalanceRequestBody) *accounting.BalanceRequest_Body { func BalanceRequestBodyToGRPCMessage(b *BalanceRequestBody) *accounting.BalanceRequest_Body {
@ -45,7 +45,7 @@ func BalanceRequestToGRPCMessage(b *BalanceRequest) *accounting.BalanceRequest {
BalanceRequestBodyToGRPCMessage(b.GetBody()), BalanceRequestBodyToGRPCMessage(b.GetBody()),
) )
service.RequestHeadersToGRPC(b, m) session.RequestHeadersToGRPC(b, m)
return m return m
} }
@ -61,7 +61,7 @@ func BalanceRequestFromGRPCMessage(m *accounting.BalanceRequest) *BalanceRequest
BalanceRequestBodyFromGRPCMessage(m.GetBody()), BalanceRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, b) session.RequestHeadersFromGRPC(m, b)
return b return b
} }
@ -131,7 +131,7 @@ func BalanceResponseToGRPCMessage(br *BalanceResponse) *accounting.BalanceRespon
BalanceResponseBodyToGRPCMessage(br.GetBody()), BalanceResponseBodyToGRPCMessage(br.GetBody()),
) )
service.ResponseHeadersToGRPC(br, m) session.ResponseHeadersToGRPC(br, m)
return m return m
} }
@ -147,7 +147,7 @@ func BalanceResponseFromGRPCMessage(m *accounting.BalanceResponse) *BalanceRespo
BalanceResponseBodyFromGRPCMessage(m.GetBody()), BalanceResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, br) session.ResponseHeadersFromGRPC(m, br)
return br return br
} }

View file

@ -2,7 +2,7 @@ package accounting
import ( import (
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc" refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
service "github.com/nspcc-dev/neofs-api-go/v2/service/grpc" session "github.com/nspcc-dev/neofs-api-go/v2/session/grpc"
) )
// SetOwnerId sets identifier of the account owner. // SetOwnerId sets identifier of the account owner.
@ -20,14 +20,14 @@ func (m *BalanceRequest) SetBody(v *BalanceRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *BalanceRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *BalanceRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *BalanceRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *BalanceRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -48,14 +48,14 @@ func (m *BalanceResponse) SetBody(v *BalanceResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *BalanceResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *BalanceResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *BalanceResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *BalanceResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }

View file

@ -6,7 +6,7 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/netmap" "github.com/nspcc-dev/neofs-api-go/v2/netmap"
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
refsGRPC "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc" refsGRPC "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
) )
func AttributeToGRPCMessage(a *Attribute) *container.Container_Attribute { func AttributeToGRPCMessage(a *Attribute) *container.Container_Attribute {
@ -152,7 +152,7 @@ func PutRequestToGRPCMessage(r *PutRequest) *container.PutRequest {
PutRequestBodyToGRPCMessage(r.GetBody()), PutRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -168,7 +168,7 @@ func PutRequestFromGRPCMessage(m *container.PutRequest) *PutRequest {
PutRequestBodyFromGRPCMessage(m.GetBody()), PutRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -212,7 +212,7 @@ func PutResponseToGRPCMessage(r *PutResponse) *container.PutResponse {
PutResponseBodyToGRPCMessage(r.GetBody()), PutResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -228,7 +228,7 @@ func PutResponseFromGRPCMessage(m *container.PutResponse) *PutResponse {
PutResponseBodyFromGRPCMessage(m.GetBody()), PutResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -272,7 +272,7 @@ func GetRequestToGRPCMessage(r *GetRequest) *container.GetRequest {
GetRequestBodyToGRPCMessage(r.GetBody()), GetRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -288,7 +288,7 @@ func GetRequestFromGRPCMessage(m *container.GetRequest) *GetRequest {
GetRequestBodyFromGRPCMessage(m.GetBody()), GetRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -332,7 +332,7 @@ func GetResponseToGRPCMessage(r *GetResponse) *container.GetResponse {
GetResponseBodyToGRPCMessage(r.GetBody()), GetResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -348,7 +348,7 @@ func GetResponseFromGRPCMessage(m *container.GetResponse) *GetResponse {
GetResponseBodyFromGRPCMessage(m.GetBody()), GetResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -400,7 +400,7 @@ func DeleteRequestToGRPCMessage(r *DeleteRequest) *container.DeleteRequest {
DeleteRequestBodyToGRPCMessage(r.GetBody()), DeleteRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -416,7 +416,7 @@ func DeleteRequestFromGRPCMessage(m *container.DeleteRequest) *DeleteRequest {
DeleteRequestBodyFromGRPCMessage(m.GetBody()), DeleteRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -452,7 +452,7 @@ func DeleteResponseToGRPCMessage(r *DeleteResponse) *container.DeleteResponse {
DeleteResponseBodyToGRPCMessage(r.GetBody()), DeleteResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -468,7 +468,7 @@ func DeleteResponseFromGRPCMessage(m *container.DeleteResponse) *DeleteResponse
DeleteResponseBodyFromGRPCMessage(m.GetBody()), DeleteResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -512,7 +512,7 @@ func ListRequestToGRPCMessage(r *ListRequest) *container.ListRequest {
ListRequestBodyToGRPCMessage(r.GetBody()), ListRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -528,7 +528,7 @@ func ListRequestFromGRPCMessage(m *container.ListRequest) *ListRequest {
ListRequestBodyFromGRPCMessage(m.GetBody()), ListRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -582,7 +582,7 @@ func ListResponseToGRPCMessage(r *ListResponse) *container.ListResponse {
ListResponseBodyToGRPCMessage(r.GetBody()), ListResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -598,7 +598,7 @@ func ListResponseFromGRPCMessage(m *container.ListResponse) *ListResponse {
ListResponseBodyFromGRPCMessage(m.GetBody()), ListResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -649,7 +649,7 @@ func SetExtendedACLRequestToGRPCMessage(r *SetExtendedACLRequest) *container.Set
SetExtendedACLRequestBodyToGRPCMessage(r.GetBody()), SetExtendedACLRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -665,7 +665,7 @@ func SetExtendedACLRequestFromGRPCMessage(m *container.SetExtendedACLRequest) *S
SetExtendedACLRequestBodyFromGRPCMessage(m.GetBody()), SetExtendedACLRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -701,7 +701,7 @@ func SetExtendedACLResponseToGRPCMessage(r *SetExtendedACLResponse) *container.S
SetExtendedACLResponseBodyToGRPCMessage(r.GetBody()), SetExtendedACLResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -717,7 +717,7 @@ func SetExtendedACLResponseFromGRPCMessage(m *container.SetExtendedACLResponse)
SetExtendedACLResponseBodyFromGRPCMessage(m.GetBody()), SetExtendedACLResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -761,7 +761,7 @@ func GetExtendedACLRequestToGRPCMessage(r *GetExtendedACLRequest) *container.Get
GetExtendedACLRequestBodyToGRPCMessage(r.GetBody()), GetExtendedACLRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -777,7 +777,7 @@ func GetExtendedACLRequestFromGRPCMessage(m *container.GetExtendedACLRequest) *G
GetExtendedACLRequestBodyFromGRPCMessage(m.GetBody()), GetExtendedACLRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -829,7 +829,7 @@ func GetExtendedACLResponseToGRPCMessage(r *GetExtendedACLResponse) *container.G
GetExtendedACLResponseBodyToGRPCMessage(r.GetBody()), GetExtendedACLResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -845,7 +845,7 @@ func GetExtendedACLResponseFromGRPCMessage(m *container.GetExtendedACLResponse)
GetExtendedACLResponseBodyFromGRPCMessage(m.GetBody()), GetExtendedACLResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }

View file

@ -3,7 +3,7 @@ package container
import ( import (
acl "github.com/nspcc-dev/neofs-api-go/v2/acl/grpc" acl "github.com/nspcc-dev/neofs-api-go/v2/acl/grpc"
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc" refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
service "github.com/nspcc-dev/neofs-api-go/v2/service/grpc" session "github.com/nspcc-dev/neofs-api-go/v2/session/grpc"
) )
// SetContainer sets container of the request. // SetContainer sets container of the request.
@ -28,14 +28,14 @@ func (m *PutRequest) SetBody(v *PutRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *PutRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *PutRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *PutRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *PutRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -56,14 +56,14 @@ func (m *PutResponse) SetBody(v *PutResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *PutResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *PutResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *PutResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *PutResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -91,14 +91,14 @@ func (m *DeleteRequest) SetBody(v *DeleteRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *DeleteRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *DeleteRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *DeleteRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *DeleteRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -112,14 +112,14 @@ func (m *DeleteResponse) SetBody(v *DeleteResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *DeleteResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *DeleteResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *DeleteResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *DeleteResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -138,14 +138,14 @@ func (m *GetRequest) SetBody(v *GetRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *GetRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *GetRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *GetRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *GetRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -166,14 +166,14 @@ func (m *GetResponse) SetBody(v *GetResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *GetResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *GetResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *GetResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *GetResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -194,14 +194,14 @@ func (m *ListRequest) SetBody(v *ListRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *ListRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *ListRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *ListRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *ListRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -222,14 +222,14 @@ func (m *ListResponse) SetBody(v *ListResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *ListResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *ListResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *ListResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *ListResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -257,14 +257,14 @@ func (m *SetExtendedACLRequest) SetBody(v *SetExtendedACLRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *SetExtendedACLRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *SetExtendedACLRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *SetExtendedACLRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *SetExtendedACLRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -278,14 +278,14 @@ func (m *SetExtendedACLResponse) SetBody(v *SetExtendedACLResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *SetExtendedACLResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *SetExtendedACLResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *SetExtendedACLResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *SetExtendedACLResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -306,14 +306,14 @@ func (m *GetExtendedACLRequest) SetBody(v *GetExtendedACLRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *GetExtendedACLRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *GetExtendedACLRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *GetExtendedACLRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *GetExtendedACLRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -341,14 +341,14 @@ func (m *GetExtendedACLResponse) SetBody(v *GetExtendedACLResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *GetExtendedACLResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *GetExtendedACLResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *GetExtendedACLResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *GetExtendedACLResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }

View file

@ -4,7 +4,7 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/acl" "github.com/nspcc-dev/neofs-api-go/v2/acl"
"github.com/nspcc-dev/neofs-api-go/v2/netmap" "github.com/nspcc-dev/neofs-api-go/v2/netmap"
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
) )
type Attribute struct { type Attribute struct {
@ -34,9 +34,9 @@ type PutRequestBody struct {
type PutRequest struct { type PutRequest struct {
body *PutRequestBody body *PutRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type PutResponseBody struct { type PutResponseBody struct {
@ -46,9 +46,9 @@ type PutResponseBody struct {
type PutResponse struct { type PutResponse struct {
body *PutResponseBody body *PutResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type GetRequestBody struct { type GetRequestBody struct {
@ -58,9 +58,9 @@ type GetRequestBody struct {
type GetRequest struct { type GetRequest struct {
body *GetRequestBody body *GetRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type GetResponseBody struct { type GetResponseBody struct {
@ -70,9 +70,9 @@ type GetResponseBody struct {
type GetResponse struct { type GetResponse struct {
body *GetResponseBody body *GetResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type DeleteRequestBody struct { type DeleteRequestBody struct {
@ -84,9 +84,9 @@ type DeleteRequestBody struct {
type DeleteRequest struct { type DeleteRequest struct {
body *DeleteRequestBody body *DeleteRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type DeleteResponseBody struct{} type DeleteResponseBody struct{}
@ -94,9 +94,9 @@ type DeleteResponseBody struct{}
type DeleteResponse struct { type DeleteResponse struct {
body *DeleteResponseBody body *DeleteResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type ListRequestBody struct { type ListRequestBody struct {
@ -106,9 +106,9 @@ type ListRequestBody struct {
type ListRequest struct { type ListRequest struct {
body *ListRequestBody body *ListRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type ListResponseBody struct { type ListResponseBody struct {
@ -118,9 +118,9 @@ type ListResponseBody struct {
type ListResponse struct { type ListResponse struct {
body *ListResponseBody body *ListResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type SetExtendedACLRequestBody struct { type SetExtendedACLRequestBody struct {
@ -132,9 +132,9 @@ type SetExtendedACLRequestBody struct {
type SetExtendedACLRequest struct { type SetExtendedACLRequest struct {
body *SetExtendedACLRequestBody body *SetExtendedACLRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type SetExtendedACLResponseBody struct{} type SetExtendedACLResponseBody struct{}
@ -142,9 +142,9 @@ type SetExtendedACLResponseBody struct{}
type SetExtendedACLResponse struct { type SetExtendedACLResponse struct {
body *SetExtendedACLResponseBody body *SetExtendedACLResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type GetExtendedACLRequestBody struct { type GetExtendedACLRequestBody struct {
@ -154,9 +154,9 @@ type GetExtendedACLRequestBody struct {
type GetExtendedACLRequest struct { type GetExtendedACLRequest struct {
body *GetExtendedACLRequestBody body *GetExtendedACLRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type GetExtendedACLResponseBody struct { type GetExtendedACLResponseBody struct {
@ -168,9 +168,9 @@ type GetExtendedACLResponseBody struct {
type GetExtendedACLResponse struct { type GetExtendedACLResponse struct {
body *GetExtendedACLResponseBody body *GetExtendedACLResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
func (a *Attribute) GetKey() string { func (a *Attribute) GetKey() string {
@ -327,7 +327,7 @@ func (r *PutRequest) SetBody(v *PutRequestBody) {
} }
} }
func (r *PutRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *PutRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -335,13 +335,13 @@ func (r *PutRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *PutRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *PutRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *PutRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *PutRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -349,7 +349,7 @@ func (r *PutRequest) GetVerificationHeader() *service.RequestVerificationHeader
return nil return nil
} }
func (r *PutRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *PutRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -383,7 +383,7 @@ func (r *PutResponse) SetBody(v *PutResponseBody) {
} }
} }
func (r *PutResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *PutResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -391,13 +391,13 @@ func (r *PutResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *PutResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *PutResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *PutResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *PutResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -405,7 +405,7 @@ func (r *PutResponse) GetVerificationHeader() *service.ResponseVerificationHeade
return nil return nil
} }
func (r *PutResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *PutResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -439,7 +439,7 @@ func (r *GetRequest) SetBody(v *GetRequestBody) {
} }
} }
func (r *GetRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *GetRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -447,13 +447,13 @@ func (r *GetRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *GetRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *GetRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *GetRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -461,7 +461,7 @@ func (r *GetRequest) GetVerificationHeader() *service.RequestVerificationHeader
return nil return nil
} }
func (r *GetRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *GetRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -495,7 +495,7 @@ func (r *GetResponse) SetBody(v *GetResponseBody) {
} }
} }
func (r *GetResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *GetResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -503,13 +503,13 @@ func (r *GetResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *GetResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *GetResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *GetResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -517,7 +517,7 @@ func (r *GetResponse) GetVerificationHeader() *service.ResponseVerificationHeade
return nil return nil
} }
func (r *GetResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *GetResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -565,7 +565,7 @@ func (r *DeleteRequest) SetBody(v *DeleteRequestBody) {
} }
} }
func (r *DeleteRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *DeleteRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -573,13 +573,13 @@ func (r *DeleteRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *DeleteRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *DeleteRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *DeleteRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *DeleteRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -587,7 +587,7 @@ func (r *DeleteRequest) GetVerificationHeader() *service.RequestVerificationHead
return nil return nil
} }
func (r *DeleteRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *DeleteRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -607,7 +607,7 @@ func (r *DeleteResponse) SetBody(v *DeleteResponseBody) {
} }
} }
func (r *DeleteResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *DeleteResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -615,13 +615,13 @@ func (r *DeleteResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *DeleteResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *DeleteResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *DeleteResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *DeleteResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -629,7 +629,7 @@ func (r *DeleteResponse) GetVerificationHeader() *service.ResponseVerificationHe
return nil return nil
} }
func (r *DeleteResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *DeleteResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -663,7 +663,7 @@ func (r *ListRequest) SetBody(v *ListRequestBody) {
} }
} }
func (r *ListRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *ListRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -671,13 +671,13 @@ func (r *ListRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *ListRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *ListRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *ListRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *ListRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -685,7 +685,7 @@ func (r *ListRequest) GetVerificationHeader() *service.RequestVerificationHeader
return nil return nil
} }
func (r *ListRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *ListRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -719,7 +719,7 @@ func (r *ListResponse) SetBody(v *ListResponseBody) {
} }
} }
func (r *ListResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *ListResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -727,13 +727,13 @@ func (r *ListResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *ListResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *ListResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *ListResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *ListResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -741,7 +741,7 @@ func (r *ListResponse) GetVerificationHeader() *service.ResponseVerificationHead
return nil return nil
} }
func (r *ListResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *ListResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -789,7 +789,7 @@ func (r *SetExtendedACLRequest) SetBody(v *SetExtendedACLRequestBody) {
} }
} }
func (r *SetExtendedACLRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *SetExtendedACLRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -797,13 +797,13 @@ func (r *SetExtendedACLRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *SetExtendedACLRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *SetExtendedACLRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *SetExtendedACLRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *SetExtendedACLRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -811,7 +811,7 @@ func (r *SetExtendedACLRequest) GetVerificationHeader() *service.RequestVerifica
return nil return nil
} }
func (r *SetExtendedACLRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *SetExtendedACLRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -831,7 +831,7 @@ func (r *SetExtendedACLResponse) SetBody(v *SetExtendedACLResponseBody) {
} }
} }
func (r *SetExtendedACLResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *SetExtendedACLResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -839,13 +839,13 @@ func (r *SetExtendedACLResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *SetExtendedACLResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *SetExtendedACLResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *SetExtendedACLResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *SetExtendedACLResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -853,7 +853,7 @@ func (r *SetExtendedACLResponse) GetVerificationHeader() *service.ResponseVerifi
return nil return nil
} }
func (r *SetExtendedACLResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *SetExtendedACLResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -887,7 +887,7 @@ func (r *GetExtendedACLRequest) SetBody(v *GetExtendedACLRequestBody) {
} }
} }
func (r *GetExtendedACLRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *GetExtendedACLRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -895,13 +895,13 @@ func (r *GetExtendedACLRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *GetExtendedACLRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *GetExtendedACLRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetExtendedACLRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *GetExtendedACLRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -909,7 +909,7 @@ func (r *GetExtendedACLRequest) GetVerificationHeader() *service.RequestVerifica
return nil return nil
} }
func (r *GetExtendedACLRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *GetExtendedACLRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -957,7 +957,7 @@ func (r *GetExtendedACLResponse) SetBody(v *GetExtendedACLResponseBody) {
} }
} }
func (r *GetExtendedACLResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *GetExtendedACLResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -965,13 +965,13 @@ func (r *GetExtendedACLResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *GetExtendedACLResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *GetExtendedACLResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetExtendedACLResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *GetExtendedACLResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -979,7 +979,7 @@ func (r *GetExtendedACLResponse) GetVerificationHeader() *service.ResponseVerifi
return nil return nil
} }
func (r *GetExtendedACLResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *GetExtendedACLResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }

View file

@ -6,7 +6,7 @@ import (
object "github.com/nspcc-dev/neofs-api-go/v2/object/grpc" object "github.com/nspcc-dev/neofs-api-go/v2/object/grpc"
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
refsGRPC "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc" refsGRPC "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
) )
func TypeToGRPCField(t Type) object.ObjectType { func TypeToGRPCField(t Type) object.ObjectType {
@ -209,7 +209,7 @@ func HeaderToGRPCMessage(h *Header) *object.Header {
) )
m.SetSessionToken( m.SetSessionToken(
service.SessionTokenToGRPCMessage(h.GetSessionToken()), session.SessionTokenToGRPCMessage(h.GetSessionToken()),
) )
attr := h.GetAttributes() attr := h.GetAttributes()
@ -264,7 +264,7 @@ func HeaderFromGRPCMessage(m *object.Header) *Header {
) )
h.SetSessionToken( h.SetSessionToken(
service.SessionTokenFromGRPCMessage(m.GetSessionToken()), session.SessionTokenFromGRPCMessage(m.GetSessionToken()),
) )
attrMsg := m.GetAttributes() attrMsg := m.GetAttributes()
@ -374,7 +374,7 @@ func GetRequestToGRPCMessage(r *GetRequest) *object.GetRequest {
GetRequestBodyToGRPCMessage(r.GetBody()), GetRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -390,7 +390,7 @@ func GetRequestFromGRPCMessage(m *object.GetRequest) *GetRequest {
GetRequestBodyFromGRPCMessage(m.GetBody()), GetRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -522,7 +522,7 @@ func GetResponseToGRPCMessage(r *GetResponse) *object.GetResponse {
GetResponseBodyToGRPCMessage(r.GetBody()), GetResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -538,7 +538,7 @@ func GetResponseFromGRPCMessage(m *object.GetResponse) *GetResponse {
GetResponseBodyFromGRPCMessage(m.GetBody()), GetResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -674,7 +674,7 @@ func PutRequestToGRPCMessage(r *PutRequest) *object.PutRequest {
PutRequestBodyToGRPCMessage(r.GetBody()), PutRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -690,7 +690,7 @@ func PutRequestFromGRPCMessage(m *object.PutRequest) *PutRequest {
PutRequestBodyFromGRPCMessage(m.GetBody()), PutRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -734,7 +734,7 @@ func PutResponseToGRPCMessage(r *PutResponse) *object.PutResponse {
PutResponseBodyToGRPCMessage(r.GetBody()), PutResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -750,7 +750,7 @@ func PutResponseFromGRPCMessage(m *object.PutResponse) *PutResponse {
PutResponseBodyFromGRPCMessage(m.GetBody()), PutResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -794,7 +794,7 @@ func DeleteRequestToGRPCMessage(r *DeleteRequest) *object.DeleteRequest {
DeleteRequestBodyToGRPCMessage(r.GetBody()), DeleteRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -810,7 +810,7 @@ func DeleteRequestFromGRPCMessage(m *object.DeleteRequest) *DeleteRequest {
DeleteRequestBodyFromGRPCMessage(m.GetBody()), DeleteRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -846,7 +846,7 @@ func DeleteResponseToGRPCMessage(r *DeleteResponse) *object.DeleteResponse {
DeleteResponseBodyToGRPCMessage(r.GetBody()), DeleteResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -862,7 +862,7 @@ func DeleteResponseFromGRPCMessage(m *object.DeleteResponse) *DeleteResponse {
DeleteResponseBodyFromGRPCMessage(m.GetBody()), DeleteResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -914,7 +914,7 @@ func HeadRequestToGRPCMessage(r *HeadRequest) *object.HeadRequest {
HeadRequestBodyToGRPCMessage(r.GetBody()), HeadRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -930,7 +930,7 @@ func HeadRequestFromGRPCMessage(m *object.HeadRequest) *HeadRequest {
HeadRequestBodyFromGRPCMessage(m.GetBody()), HeadRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -1050,7 +1050,7 @@ func HeadResponseToGRPCMessage(r *HeadResponse) *object.HeadResponse {
HeadResponseBodyToGRPCMessage(r.GetBody()), HeadResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -1066,7 +1066,7 @@ func HeadResponseFromGRPCMessage(m *object.HeadResponse) *HeadResponse {
HeadResponseBodyFromGRPCMessage(m.GetBody()), HeadResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -1168,7 +1168,7 @@ func SearchRequestToGRPCMessage(r *SearchRequest) *object.SearchRequest {
SearchRequestBodyToGRPCMessage(r.GetBody()), SearchRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -1184,7 +1184,7 @@ func SearchRequestFromGRPCMessage(m *object.SearchRequest) *SearchRequest {
SearchRequestBodyFromGRPCMessage(m.GetBody()), SearchRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -1238,7 +1238,7 @@ func SearchResponseToGRPCMessage(r *SearchResponse) *object.SearchResponse {
SearchResponseBodyToGRPCMessage(r.GetBody()), SearchResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -1254,7 +1254,7 @@ func SearchResponseFromGRPCMessage(m *object.SearchResponse) *SearchResponse {
SearchResponseBodyFromGRPCMessage(m.GetBody()), SearchResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -1332,7 +1332,7 @@ func GetRangeRequestToGRPCMessage(r *GetRangeRequest) *object.GetRangeRequest {
GetRangeRequestBodyToGRPCMessage(r.GetBody()), GetRangeRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -1348,7 +1348,7 @@ func GetRangeRequestFromGRPCMessage(m *object.GetRangeRequest) *GetRangeRequest
GetRangeRequestBodyFromGRPCMessage(m.GetBody()), GetRangeRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -1388,7 +1388,7 @@ func GetRangeResponseToGRPCMessage(r *GetRangeResponse) *object.GetRangeResponse
GetRangeResponseBodyToGRPCMessage(r.GetBody()), GetRangeResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -1404,7 +1404,7 @@ func GetRangeResponseFromGRPCMessage(m *object.GetRangeResponse) *GetRangeRespon
GetRangeResponseBodyFromGRPCMessage(m.GetBody()), GetRangeResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }
@ -1474,7 +1474,7 @@ func GetRangeHashRequestToGRPCMessage(r *GetRangeHashRequest) *object.GetRangeHa
GetRangeHashRequestBodyToGRPCMessage(r.GetBody()), GetRangeHashRequestBodyToGRPCMessage(r.GetBody()),
) )
service.RequestHeadersToGRPC(r, m) session.RequestHeadersToGRPC(r, m)
return m return m
} }
@ -1490,7 +1490,7 @@ func GetRangeHashRequestFromGRPCMessage(m *object.GetRangeHashRequest) *GetRange
GetRangeHashRequestBodyFromGRPCMessage(m.GetBody()), GetRangeHashRequestBodyFromGRPCMessage(m.GetBody()),
) )
service.RequestHeadersFromGRPC(m, r) session.RequestHeadersFromGRPC(m, r)
return r return r
} }
@ -1534,7 +1534,7 @@ func GetRangeHashResponseToGRPCMessage(r *GetRangeHashResponse) *object.GetRange
GetRangeHashResponseBodyToGRPCMessage(r.GetBody()), GetRangeHashResponseBodyToGRPCMessage(r.GetBody()),
) )
service.ResponseHeadersToGRPC(r, m) session.ResponseHeadersToGRPC(r, m)
return m return m
} }
@ -1550,7 +1550,7 @@ func GetRangeHashResponseFromGRPCMessage(m *object.GetRangeHashResponse) *GetRan
GetRangeHashResponseBodyFromGRPCMessage(m.GetBody()), GetRangeHashResponseBodyFromGRPCMessage(m.GetBody()),
) )
service.ResponseHeadersFromGRPC(m, r) session.ResponseHeadersFromGRPC(m, r)
return r return r
} }

View file

@ -2,7 +2,7 @@ package object
import ( import (
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc" refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
service "github.com/nspcc-dev/neofs-api-go/v2/service/grpc" session "github.com/nspcc-dev/neofs-api-go/v2/session/grpc"
) )
// SetAddress sets address of the requested object. // SetAddress sets address of the requested object.
@ -27,14 +27,14 @@ func (m *GetRequest) SetBody(v *GetRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *GetRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *GetRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *GetRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *GetRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -101,14 +101,14 @@ func (m *GetResponse) SetBody(v *GetResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *GetResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *GetResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *GetResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *GetResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -182,14 +182,14 @@ func (m *PutRequest) SetBody(v *PutRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *PutRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *PutRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *PutRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *PutRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -210,14 +210,14 @@ func (m *PutResponse) SetBody(v *PutResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *PutResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *PutResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *PutResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *PutResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -238,14 +238,14 @@ func (m *DeleteRequest) SetBody(v *DeleteRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *DeleteRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *DeleteRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *DeleteRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *DeleteRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -259,14 +259,14 @@ func (m *DeleteResponse) SetBody(v *DeleteResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *DeleteResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *DeleteResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *DeleteResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *DeleteResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -301,14 +301,14 @@ func (m *HeadRequest) SetBody(v *HeadRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *HeadRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *HeadRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *HeadRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *HeadRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -368,14 +368,14 @@ func (m *HeadResponse) SetBody(v *HeadResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *HeadResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *HeadResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *HeadResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *HeadResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -431,14 +431,14 @@ func (m *SearchRequest) SetBody(v *SearchRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *SearchRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *SearchRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *SearchRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *SearchRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -459,14 +459,14 @@ func (m *SearchResponse) SetBody(v *SearchResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *SearchResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *SearchResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *SearchResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *SearchResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -508,14 +508,14 @@ func (m *GetRangeRequest) SetBody(v *GetRangeRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *GetRangeRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *GetRangeRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *GetRangeRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *GetRangeRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -536,14 +536,14 @@ func (m *GetRangeResponse) SetBody(v *GetRangeResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *GetRangeResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *GetRangeResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *GetRangeResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *GetRangeResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -585,14 +585,14 @@ func (m *GetRangeHashRequest) SetBody(v *GetRangeHashRequest_Body) {
} }
// SetMetaHeader sets meta header of the request. // SetMetaHeader sets meta header of the request.
func (m *GetRangeHashRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (m *GetRangeHashRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the request. // SetVerifyHeader sets verification header of the request.
func (m *GetRangeHashRequest) SetVerifyHeader(v *service.RequestVerificationHeader) { func (m *GetRangeHashRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }
@ -620,14 +620,14 @@ func (m *GetRangeHashResponse) SetBody(v *GetRangeHashResponse_Body) {
} }
// SetMetaHeader sets meta header of the response. // SetMetaHeader sets meta header of the response.
func (m *GetRangeHashResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (m *GetRangeHashResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if m != nil { if m != nil {
m.MetaHeader = v m.MetaHeader = v
} }
} }
// SetVerifyHeader sets verification header of the response. // SetVerifyHeader sets verification header of the response.
func (m *GetRangeHashResponse) SetVerifyHeader(v *service.ResponseVerificationHeader) { func (m *GetRangeHashResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
if m != nil { if m != nil {
m.VerifyHeader = v m.VerifyHeader = v
} }

View file

@ -2,7 +2,7 @@ package object
import ( import (
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc" refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
service "github.com/nspcc-dev/neofs-api-go/v2/service/grpc" session "github.com/nspcc-dev/neofs-api-go/v2/session/grpc"
) )
// SetKey sets key to the object attribute. // SetKey sets key to the object attribute.
@ -111,7 +111,7 @@ func (m *Header) SetHomomorphicHash(v *refs.Checksum) {
} }
// SetSessionToken sets session token. // SetSessionToken sets session token.
func (m *Header) SetSessionToken(v *service.SessionToken) { func (m *Header) SetSessionToken(v *session.SessionToken) {
if m != nil { if m != nil {
m.SessionToken = v m.SessionToken = v
} }

View file

@ -7,7 +7,7 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/object"
grpc "github.com/nspcc-dev/neofs-api-go/v2/object/grpc" grpc "github.com/nspcc-dev/neofs-api-go/v2/object/grpc"
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
@ -405,24 +405,24 @@ func generateAddress(cid, oid string) *refs.Address {
return addr return addr
} }
func generateSessionToken(id string) *service.SessionToken { func generateSessionToken(id string) *session.SessionToken {
lifetime := new(service.TokenLifetime) lifetime := new(session.TokenLifetime)
lifetime.SetExp(1) lifetime.SetExp(1)
lifetime.SetNbf(2) lifetime.SetNbf(2)
lifetime.SetIat(3) lifetime.SetIat(3)
objectCtx := new(service.ObjectSessionContext) objectCtx := new(session.ObjectSessionContext)
objectCtx.SetVerb(service.ObjectVerbPut) objectCtx.SetVerb(session.ObjectVerbPut)
objectCtx.SetAddress(generateAddress("Container ID", "Object ID")) objectCtx.SetAddress(generateAddress("Container ID", "Object ID"))
tokenBody := new(service.SessionTokenBody) tokenBody := new(session.SessionTokenBody)
tokenBody.SetID([]byte(id)) tokenBody.SetID([]byte(id))
tokenBody.SetOwnerID(generateOwner("Owner ID")) tokenBody.SetOwnerID(generateOwner("Owner ID"))
tokenBody.SetSessionKey([]byte(id)) tokenBody.SetSessionKey([]byte(id))
tokenBody.SetLifetime(lifetime) tokenBody.SetLifetime(lifetime)
tokenBody.SetContext(objectCtx) tokenBody.SetContext(objectCtx)
sessionToken := new(service.SessionToken) sessionToken := new(session.SessionToken)
sessionToken.SetBody(tokenBody) sessionToken.SetBody(tokenBody)
sessionToken.SetSignature(generateSignature("public key", id)) sessionToken.SetSignature(generateSignature("public key", id))

View file

@ -2,7 +2,7 @@ package object
import ( import (
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
) )
type Type uint32 type Type uint32
@ -50,7 +50,7 @@ type Header struct {
typ Type typ Type
sessionToken *service.SessionToken sessionToken *session.SessionToken
attr []*Attribute attr []*Attribute
@ -76,9 +76,9 @@ type GetRequestBody struct {
type GetRequest struct { type GetRequest struct {
body *GetRequestBody body *GetRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type GetObjectPart interface { type GetObjectPart interface {
@ -104,9 +104,9 @@ type GetResponseBody struct {
type GetResponse struct { type GetResponse struct {
body *GetResponseBody body *GetResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type PutObjectPart interface { type PutObjectPart interface {
@ -134,9 +134,9 @@ type PutRequestBody struct {
type PutRequest struct { type PutRequest struct {
body *PutRequestBody body *PutRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type PutResponseBody struct { type PutResponseBody struct {
@ -146,9 +146,9 @@ type PutResponseBody struct {
type PutResponse struct { type PutResponse struct {
body *PutResponseBody body *PutResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type DeleteRequestBody struct { type DeleteRequestBody struct {
@ -158,9 +158,9 @@ type DeleteRequestBody struct {
type DeleteRequest struct { type DeleteRequest struct {
body *DeleteRequestBody body *DeleteRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type DeleteResponseBody struct{} type DeleteResponseBody struct{}
@ -168,9 +168,9 @@ type DeleteResponseBody struct{}
type DeleteResponse struct { type DeleteResponse struct {
body *DeleteResponseBody body *DeleteResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type HeadRequestBody struct { type HeadRequestBody struct {
@ -182,9 +182,9 @@ type HeadRequestBody struct {
type HeadRequest struct { type HeadRequest struct {
body *HeadRequestBody body *HeadRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type GetHeaderPart interface { type GetHeaderPart interface {
@ -206,9 +206,9 @@ type HeadResponseBody struct {
type HeadResponse struct { type HeadResponse struct {
body *HeadResponseBody body *HeadResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type SearchFilter struct { type SearchFilter struct {
@ -228,9 +228,9 @@ type SearchRequestBody struct {
type SearchRequest struct { type SearchRequest struct {
body *SearchRequestBody body *SearchRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type SearchResponseBody struct { type SearchResponseBody struct {
@ -240,9 +240,9 @@ type SearchResponseBody struct {
type SearchResponse struct { type SearchResponse struct {
body *SearchResponseBody body *SearchResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type Range struct { type Range struct {
@ -258,9 +258,9 @@ type GetRangeRequestBody struct {
type GetRangeRequest struct { type GetRangeRequest struct {
body *GetRangeRequestBody body *GetRangeRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type GetRangeResponseBody struct { type GetRangeResponseBody struct {
@ -270,9 +270,9 @@ type GetRangeResponseBody struct {
type GetRangeResponse struct { type GetRangeResponse struct {
body *GetRangeResponseBody body *GetRangeResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
type GetRangeHashRequestBody struct { type GetRangeHashRequestBody struct {
@ -288,9 +288,9 @@ type GetRangeHashRequestBody struct {
type GetRangeHashRequest struct { type GetRangeHashRequest struct {
body *GetRangeHashRequestBody body *GetRangeHashRequestBody
metaHeader *service.RequestMetaHeader metaHeader *session.RequestMetaHeader
verifyHeader *service.RequestVerificationHeader verifyHeader *session.RequestVerificationHeader
} }
type GetRangeHashResponseBody struct { type GetRangeHashResponseBody struct {
@ -302,9 +302,9 @@ type GetRangeHashResponseBody struct {
type GetRangeHashResponse struct { type GetRangeHashResponse struct {
body *GetRangeHashResponseBody body *GetRangeHashResponseBody
metaHeader *service.ResponseMetaHeader metaHeader *session.ResponseMetaHeader
verifyHeader *service.ResponseVerificationHeader verifyHeader *session.ResponseVerificationHeader
} }
const ( const (
@ -598,7 +598,7 @@ func (h *Header) SetHomomorphicHash(v *refs.Checksum) {
} }
} }
func (h *Header) GetSessionToken() *service.SessionToken { func (h *Header) GetSessionToken() *session.SessionToken {
if h != nil { if h != nil {
return h.sessionToken return h.sessionToken
} }
@ -606,7 +606,7 @@ func (h *Header) GetSessionToken() *service.SessionToken {
return nil return nil
} }
func (h *Header) SetSessionToken(v *service.SessionToken) { func (h *Header) SetSessionToken(v *session.SessionToken) {
if h != nil { if h != nil {
h.sessionToken = v h.sessionToken = v
} }
@ -738,7 +738,7 @@ func (r *GetRequest) SetBody(v *GetRequestBody) {
} }
} }
func (r *GetRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *GetRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -746,13 +746,13 @@ func (r *GetRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *GetRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *GetRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *GetRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -760,7 +760,7 @@ func (r *GetRequest) GetVerificationHeader() *service.RequestVerificationHeader
return nil return nil
} }
func (r *GetRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *GetRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -854,7 +854,7 @@ func (r *GetResponse) SetBody(v *GetResponseBody) {
} }
} }
func (r *GetResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *GetResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -862,13 +862,13 @@ func (r *GetResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *GetResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *GetResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *GetResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -876,7 +876,7 @@ func (r *GetResponse) GetVerificationHeader() *service.ResponseVerificationHeade
return nil return nil
} }
func (r *GetResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *GetResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -984,7 +984,7 @@ func (r *PutRequest) SetBody(v *PutRequestBody) {
} }
} }
func (r *PutRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *PutRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -992,13 +992,13 @@ func (r *PutRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *PutRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *PutRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *PutRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *PutRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1006,7 +1006,7 @@ func (r *PutRequest) GetVerificationHeader() *service.RequestVerificationHeader
return nil return nil
} }
func (r *PutRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *PutRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1040,7 +1040,7 @@ func (r *PutResponse) SetBody(v *PutResponseBody) {
} }
} }
func (r *PutResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *PutResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1048,13 +1048,13 @@ func (r *PutResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *PutResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *PutResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *PutResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *PutResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1062,7 +1062,7 @@ func (r *PutResponse) GetVerificationHeader() *service.ResponseVerificationHeade
return nil return nil
} }
func (r *PutResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *PutResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1096,7 +1096,7 @@ func (r *DeleteRequest) SetBody(v *DeleteRequestBody) {
} }
} }
func (r *DeleteRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *DeleteRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1104,13 +1104,13 @@ func (r *DeleteRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *DeleteRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *DeleteRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *DeleteRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *DeleteRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1118,7 +1118,7 @@ func (r *DeleteRequest) GetVerificationHeader() *service.RequestVerificationHead
return nil return nil
} }
func (r *DeleteRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *DeleteRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1138,7 +1138,7 @@ func (r *DeleteResponse) SetBody(v *DeleteResponseBody) {
} }
} }
func (r *DeleteResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *DeleteResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1146,13 +1146,13 @@ func (r *DeleteResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *DeleteResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *DeleteResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *DeleteResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *DeleteResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1160,7 +1160,7 @@ func (r *DeleteResponse) GetVerificationHeader() *service.ResponseVerificationHe
return nil return nil
} }
func (r *DeleteResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *DeleteResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1222,7 +1222,7 @@ func (r *HeadRequest) SetBody(v *HeadRequestBody) {
} }
} }
func (r *HeadRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *HeadRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1230,13 +1230,13 @@ func (r *HeadRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *HeadRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *HeadRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *HeadRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *HeadRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1244,7 +1244,7 @@ func (r *HeadRequest) GetVerificationHeader() *service.RequestVerificationHeader
return nil return nil
} }
func (r *HeadRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *HeadRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1310,7 +1310,7 @@ func (r *HeadResponse) SetBody(v *HeadResponseBody) {
} }
} }
func (r *HeadResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *HeadResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1318,13 +1318,13 @@ func (r *HeadResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *HeadResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *HeadResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *HeadResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *HeadResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1332,7 +1332,7 @@ func (r *HeadResponse) GetVerificationHeader() *service.ResponseVerificationHead
return nil return nil
} }
func (r *HeadResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *HeadResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1436,7 +1436,7 @@ func (r *SearchRequest) SetBody(v *SearchRequestBody) {
} }
} }
func (r *SearchRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *SearchRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1444,13 +1444,13 @@ func (r *SearchRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *SearchRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *SearchRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *SearchRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *SearchRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1458,7 +1458,7 @@ func (r *SearchRequest) GetVerificationHeader() *service.RequestVerificationHead
return nil return nil
} }
func (r *SearchRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *SearchRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1492,7 +1492,7 @@ func (r *SearchResponse) SetBody(v *SearchResponseBody) {
} }
} }
func (r *SearchResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *SearchResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1500,13 +1500,13 @@ func (r *SearchResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *SearchResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *SearchResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *SearchResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *SearchResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1514,7 +1514,7 @@ func (r *SearchResponse) GetVerificationHeader() *service.ResponseVerificationHe
return nil return nil
} }
func (r *SearchResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *SearchResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1590,7 +1590,7 @@ func (r *GetRangeRequest) SetBody(v *GetRangeRequestBody) {
} }
} }
func (r *GetRangeRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *GetRangeRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1598,13 +1598,13 @@ func (r *GetRangeRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *GetRangeRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *GetRangeRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetRangeRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *GetRangeRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1612,7 +1612,7 @@ func (r *GetRangeRequest) GetVerificationHeader() *service.RequestVerificationHe
return nil return nil
} }
func (r *GetRangeRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *GetRangeRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1646,7 +1646,7 @@ func (r *GetRangeResponse) SetBody(v *GetRangeResponseBody) {
} }
} }
func (r *GetRangeResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *GetRangeResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1654,13 +1654,13 @@ func (r *GetRangeResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *GetRangeResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *GetRangeResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetRangeResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *GetRangeResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1668,7 +1668,7 @@ func (r *GetRangeResponse) GetVerificationHeader() *service.ResponseVerification
return nil return nil
} }
func (r *GetRangeResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *GetRangeResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1744,7 +1744,7 @@ func (r *GetRangeHashRequest) SetBody(v *GetRangeHashRequestBody) {
} }
} }
func (r *GetRangeHashRequest) GetMetaHeader() *service.RequestMetaHeader { func (r *GetRangeHashRequest) GetMetaHeader() *session.RequestMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1752,13 +1752,13 @@ func (r *GetRangeHashRequest) GetMetaHeader() *service.RequestMetaHeader {
return nil return nil
} }
func (r *GetRangeHashRequest) SetMetaHeader(v *service.RequestMetaHeader) { func (r *GetRangeHashRequest) SetMetaHeader(v *session.RequestMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetRangeHashRequest) GetVerificationHeader() *service.RequestVerificationHeader { func (r *GetRangeHashRequest) GetVerificationHeader() *session.RequestVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1766,7 +1766,7 @@ func (r *GetRangeHashRequest) GetVerificationHeader() *service.RequestVerificati
return nil return nil
} }
func (r *GetRangeHashRequest) SetVerificationHeader(v *service.RequestVerificationHeader) { func (r *GetRangeHashRequest) SetVerificationHeader(v *session.RequestVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }
@ -1814,7 +1814,7 @@ func (r *GetRangeHashResponse) SetBody(v *GetRangeHashResponseBody) {
} }
} }
func (r *GetRangeHashResponse) GetMetaHeader() *service.ResponseMetaHeader { func (r *GetRangeHashResponse) GetMetaHeader() *session.ResponseMetaHeader {
if r != nil { if r != nil {
return r.metaHeader return r.metaHeader
} }
@ -1822,13 +1822,13 @@ func (r *GetRangeHashResponse) GetMetaHeader() *service.ResponseMetaHeader {
return nil return nil
} }
func (r *GetRangeHashResponse) SetMetaHeader(v *service.ResponseMetaHeader) { func (r *GetRangeHashResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
if r != nil { if r != nil {
r.metaHeader = v r.metaHeader = v
} }
} }
func (r *GetRangeHashResponse) GetVerificationHeader() *service.ResponseVerificationHeader { func (r *GetRangeHashResponse) GetVerificationHeader() *session.ResponseVerificationHeader {
if r != nil { if r != nil {
return r.verifyHeader return r.verifyHeader
} }
@ -1836,7 +1836,7 @@ func (r *GetRangeHashResponse) GetVerificationHeader() *service.ResponseVerifica
return nil return nil
} }
func (r *GetRangeHashResponse) SetVerificationHeader(v *service.ResponseVerificationHeader) { func (r *GetRangeHashResponse) SetVerificationHeader(v *session.ResponseVerificationHeader) {
if r != nil { if r != nil {
r.verifyHeader = v r.verifyHeader = v
} }

View file

@ -9,21 +9,20 @@ import (
"github.com/nspcc-dev/neofs-api-go/v2/container" "github.com/nspcc-dev/neofs-api-go/v2/container"
"github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/object"
"github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-api-go/v2/service"
"github.com/nspcc-dev/neofs-api-go/v2/session" "github.com/nspcc-dev/neofs-api-go/v2/session"
"github.com/pkg/errors" "github.com/pkg/errors"
) )
type serviceRequest interface { type serviceRequest interface {
GetMetaHeader() *service.RequestMetaHeader GetMetaHeader() *session.RequestMetaHeader
GetVerificationHeader() *service.RequestVerificationHeader GetVerificationHeader() *session.RequestVerificationHeader
SetVerificationHeader(*service.RequestVerificationHeader) SetVerificationHeader(*session.RequestVerificationHeader)
} }
type serviceResponse interface { type serviceResponse interface {
GetMetaHeader() *service.ResponseMetaHeader GetMetaHeader() *session.ResponseMetaHeader
GetVerificationHeader() *service.ResponseVerificationHeader GetVerificationHeader() *session.ResponseVerificationHeader
SetVerificationHeader(*service.ResponseVerificationHeader) SetVerificationHeader(*session.ResponseVerificationHeader)
} }
type stableMarshaler interface { type stableMarshaler interface {
@ -55,19 +54,19 @@ type verificationHeader interface {
} }
type requestMetaHeader struct { type requestMetaHeader struct {
*service.RequestMetaHeader *session.RequestMetaHeader
} }
type responseMetaHeader struct { type responseMetaHeader struct {
*service.ResponseMetaHeader *session.ResponseMetaHeader
} }
type requestVerificationHeader struct { type requestVerificationHeader struct {
*service.RequestVerificationHeader *session.RequestVerificationHeader
} }
type responseVerificationHeader struct { type responseVerificationHeader struct {
*service.ResponseVerificationHeader *session.ResponseVerificationHeader
} }
func (h *requestMetaHeader) getOrigin() metaHeader { func (h *requestMetaHeader) getOrigin() metaHeader {
@ -94,7 +93,7 @@ func (h *requestVerificationHeader) getOrigin() verificationHeader {
func (h *requestVerificationHeader) setOrigin(m stableMarshaler) { func (h *requestVerificationHeader) setOrigin(m stableMarshaler) {
if m != nil { if m != nil {
h.SetOrigin(m.(*service.RequestVerificationHeader)) h.SetOrigin(m.(*session.RequestVerificationHeader))
} }
} }
@ -110,7 +109,7 @@ func (r *responseVerificationHeader) getOrigin() verificationHeader {
func (r *responseVerificationHeader) setOrigin(m stableMarshaler) { func (r *responseVerificationHeader) setOrigin(m stableMarshaler) {
if m != nil { if m != nil {
r.SetOrigin(m.(*service.ResponseVerificationHeader)) r.SetOrigin(m.(*session.ResponseVerificationHeader))
} }
} }
@ -156,7 +155,7 @@ func SignServiceMessage(key *ecdsa.PrivateKey, msg interface{}) error {
case serviceRequest: case serviceRequest:
body = serviceMessageBody(v) body = serviceMessageBody(v)
meta = v.GetMetaHeader() meta = v.GetMetaHeader()
verifyHdr = &requestVerificationHeader{new(service.RequestVerificationHeader)} verifyHdr = &requestVerificationHeader{new(session.RequestVerificationHeader)}
verifyHdrSetter = func(h verificationHeader) { verifyHdrSetter = func(h verificationHeader) {
v.SetVerificationHeader(h.(*requestVerificationHeader).RequestVerificationHeader) v.SetVerificationHeader(h.(*requestVerificationHeader).RequestVerificationHeader)
} }
@ -167,7 +166,7 @@ func SignServiceMessage(key *ecdsa.PrivateKey, msg interface{}) error {
case serviceResponse: case serviceResponse:
body = serviceMessageBody(v) body = serviceMessageBody(v)
meta = v.GetMetaHeader() meta = v.GetMetaHeader()
verifyHdr = &responseVerificationHeader{new(service.ResponseVerificationHeader)} verifyHdr = &responseVerificationHeader{new(session.ResponseVerificationHeader)}
verifyHdrSetter = func(h verificationHeader) { verifyHdrSetter = func(h verificationHeader) {
v.SetVerificationHeader(h.(*responseVerificationHeader).ResponseVerificationHeader) v.SetVerificationHeader(h.(*responseVerificationHeader).ResponseVerificationHeader)
} }
@ -176,11 +175,11 @@ func SignServiceMessage(key *ecdsa.PrivateKey, msg interface{}) error {
verifyOrigin = h verifyOrigin = h
} }
default: default:
panic(fmt.Sprintf("unsupported service message %T", v)) panic(fmt.Sprintf("unsupported session message %T", v))
} }
if verifyOrigin == nil { if verifyOrigin == nil {
// sign service message body // sign session message body
if err := signServiceMessagePart(key, body, verifyHdr.SetBodySignature); err != nil { if err := signServiceMessagePart(key, body, verifyHdr.SetBodySignature); err != nil {
return errors.Wrap(err, "could not sign body") return errors.Wrap(err, "could not sign body")
} }
@ -249,7 +248,7 @@ func VerifyServiceMessage(msg interface{}) error {
ResponseVerificationHeader: v.GetVerificationHeader(), ResponseVerificationHeader: v.GetVerificationHeader(),
} }
default: default:
panic(fmt.Sprintf("unsupported service message %T", v)) panic(fmt.Sprintf("unsupported session message %T", v))
} }
return verifyMatryoshkaLevel(serviceMessageBody(msg), meta, verify) return verifyMatryoshkaLevel(serviceMessageBody(msg), meta, verify)
@ -291,7 +290,7 @@ func verifyServiceMessagePart(part stableMarshaler, sigRdr func() *refs.Signatur
func serviceMessageBody(req interface{}) stableMarshaler { func serviceMessageBody(req interface{}) stableMarshaler {
switch v := req.(type) { switch v := req.(type) {
default: default:
panic(fmt.Sprintf("unsupported service message %T", req)) panic(fmt.Sprintf("unsupported session message %T", req))
/* Accounting */ /* Accounting */
case *accounting.BalanceRequest: case *accounting.BalanceRequest:

View file

@ -4,7 +4,7 @@ import (
"testing" "testing"
"github.com/nspcc-dev/neofs-api-go/v2/accounting" "github.com/nspcc-dev/neofs-api-go/v2/accounting"
"github.com/nspcc-dev/neofs-api-go/v2/service" "github.com/nspcc-dev/neofs-api-go/v2/session"
crypto "github.com/nspcc-dev/neofs-crypto" crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
@ -16,7 +16,7 @@ func TestBalanceResponse(t *testing.T) {
body := new(accounting.BalanceResponseBody) body := new(accounting.BalanceResponseBody)
body.SetBalance(dec) body.SetBalance(dec)
meta := new(service.ResponseMetaHeader) meta := new(session.ResponseMetaHeader)
meta.SetTTL(1) meta.SetTTL(1)
req := new(accounting.BalanceResponse) req := new(accounting.BalanceResponse)
@ -36,7 +36,7 @@ func TestBalanceResponse(t *testing.T) {
require.NoError(t, VerifyServiceMessage(req)) require.NoError(t, VerifyServiceMessage(req))
// add level to meta header matryoshka // add level to meta header matryoshka
meta = new(service.ResponseMetaHeader) meta = new(session.ResponseMetaHeader)
meta.SetOrigin(req.GetMetaHeader()) meta.SetOrigin(req.GetMetaHeader())
req.SetMetaHeader(meta) req.SetMetaHeader(meta)