Documentation ¶
Index ¶
- Constants
- func ContainerSessionVerbToGRPCField(v ContainerSessionVerb) session.ContainerSessionContext_Verb
- func GlobalizeFail(c *status.Code)
- func LocalizeFailStatus(c *status.Code) bool
- func ObjectSessionVerbToGRPCField(v ObjectSessionVerb) session.ObjectSessionContext_Verb
- func SetStatus(msg interface{ ... }, st *status.Status)
- func XHeadersToGRPC(xs []XHeader) (res []session.XHeader)
- type ContainerSessionContext
- func (x *ContainerSessionContext) ContainerID() *refs.ContainerID
- func (x *ContainerSessionContext) FromGRPCMessage(m grpc.Message) error
- func (x *ContainerSessionContext) MarshalJSON() ([]byte, error)
- func (x *ContainerSessionContext) SetContainerID(v *refs.ContainerID)
- func (x *ContainerSessionContext) SetVerb(v ContainerSessionVerb)
- func (x *ContainerSessionContext) SetWildcard(v bool)
- func (x *ContainerSessionContext) StableMarshal(buf []byte) []byte
- func (x *ContainerSessionContext) StableSize() (size int)
- func (x *ContainerSessionContext) ToGRPCMessage() grpc.Message
- func (x *ContainerSessionContext) Unmarshal(data []byte) error
- func (x *ContainerSessionContext) UnmarshalJSON(data []byte) error
- func (x *ContainerSessionContext) Verb() ContainerSessionVerb
- func (x *ContainerSessionContext) Wildcard() bool
- type ContainerSessionVerb
- type CreateRequest
- func (c *CreateRequest) FromGRPCMessage(m grpc.Message) error
- func (c *CreateRequest) GetBody() *CreateRequestBody
- func (c *CreateRequest) GetMetaHeader() *RequestMetaHeader
- func (c *CreateRequest) GetVerificationHeader() *RequestVerificationHeader
- func (c *CreateRequest) SetBody(v *CreateRequestBody)
- func (c *CreateRequest) SetMetaHeader(v *RequestMetaHeader)
- func (c *CreateRequest) SetVerificationHeader(v *RequestVerificationHeader)
- func (c *CreateRequest) ToGRPCMessage() grpc.Message
- type CreateRequestBody
- func (c *CreateRequestBody) FromGRPCMessage(m grpc.Message) error
- func (c *CreateRequestBody) GetExpiration() uint64
- func (c *CreateRequestBody) GetOwnerID() *refs.OwnerID
- func (c *CreateRequestBody) SetExpiration(v uint64)
- func (c *CreateRequestBody) SetOwnerID(v *refs.OwnerID)
- func (c *CreateRequestBody) StableMarshal(buf []byte) []byte
- func (c *CreateRequestBody) StableSize() (size int)
- func (c *CreateRequestBody) ToGRPCMessage() grpc.Message
- func (c *CreateRequestBody) Unmarshal(data []byte) error
- type CreateResponse
- func (c *CreateResponse) FromGRPCMessage(m grpc.Message) error
- func (c *CreateResponse) GetBody() *CreateResponseBody
- func (c *CreateResponse) GetMetaHeader() *ResponseMetaHeader
- func (c *CreateResponse) GetVerificationHeader() *ResponseVerificationHeader
- func (c *CreateResponse) SetBody(v *CreateResponseBody)
- func (c *CreateResponse) SetMetaHeader(v *ResponseMetaHeader)
- func (c *CreateResponse) SetVerificationHeader(v *ResponseVerificationHeader)
- func (c *CreateResponse) ToGRPCMessage() grpc.Message
- type CreateResponseBody
- func (c *CreateResponseBody) FromGRPCMessage(m grpc.Message) error
- func (c *CreateResponseBody) GetID() []byte
- func (c *CreateResponseBody) GetSessionKey() []byte
- func (c *CreateResponseBody) SetID(v []byte)
- func (c *CreateResponseBody) SetSessionKey(v []byte)
- func (c *CreateResponseBody) StableMarshal(buf []byte) []byte
- func (c *CreateResponseBody) StableSize() (size int)
- func (c *CreateResponseBody) ToGRPCMessage() grpc.Message
- func (c *CreateResponseBody) Unmarshal(data []byte) error
- type ObjectSessionContext
- func (c *ObjectSessionContext) FromGRPCMessage(m grpc.Message) error
- func (c *ObjectSessionContext) GetContainer() *refs.ContainerID
- func (c *ObjectSessionContext) GetObjects() []refs.ObjectID
- func (c *ObjectSessionContext) GetVerb() ObjectSessionVerb
- func (c *ObjectSessionContext) MarshalJSON() ([]byte, error)
- func (c *ObjectSessionContext) SetTarget(cnr *refs.ContainerID, objs ...refs.ObjectID)
- func (c *ObjectSessionContext) SetVerb(v ObjectSessionVerb)
- func (c *ObjectSessionContext) StableMarshal(buf []byte) []byte
- func (c *ObjectSessionContext) StableSize() (size int)
- func (c *ObjectSessionContext) ToGRPCMessage() grpc.Message
- func (c *ObjectSessionContext) Unmarshal(data []byte) error
- func (c *ObjectSessionContext) UnmarshalJSON(data []byte) error
- type ObjectSessionVerb
- type RequestHeaders
- func (c *RequestHeaders) FromMessage(m interface{ ... }) error
- func (c *RequestHeaders) GetMetaHeader() *RequestMetaHeader
- func (c *RequestHeaders) GetVerificationHeader() *RequestVerificationHeader
- func (c *RequestHeaders) SetMetaHeader(v *RequestMetaHeader)
- func (c *RequestHeaders) SetVerificationHeader(v *RequestVerificationHeader)
- func (c *RequestHeaders) ToMessage(m interface{ ... })
- type RequestMetaHeader
- func (r *RequestMetaHeader) FromGRPCMessage(m grpc.Message) error
- func (r *RequestMetaHeader) GetBearerToken() *acl.BearerToken
- func (r *RequestMetaHeader) GetEpoch() uint64
- func (r *RequestMetaHeader) GetNetworkMagic() uint64
- func (r *RequestMetaHeader) GetOrigin() *RequestMetaHeader
- func (r *RequestMetaHeader) GetSessionToken() *Token
- func (r *RequestMetaHeader) GetTTL() uint32
- func (r *RequestMetaHeader) GetVersion() *refs.Version
- func (r *RequestMetaHeader) GetXHeaders() []XHeader
- func (r *RequestMetaHeader) MarshalJSON() ([]byte, error)
- func (r *RequestMetaHeader) SetBearerToken(v *acl.BearerToken)
- func (r *RequestMetaHeader) SetEpoch(v uint64)
- func (r *RequestMetaHeader) SetNetworkMagic(v uint64)
- func (r *RequestMetaHeader) SetOrigin(v *RequestMetaHeader)
- func (r *RequestMetaHeader) SetSessionToken(v *Token)
- func (r *RequestMetaHeader) SetTTL(v uint32)
- func (r *RequestMetaHeader) SetVersion(v *refs.Version)
- func (r *RequestMetaHeader) SetXHeaders(v []XHeader)
- func (r *RequestMetaHeader) StableMarshal(buf []byte) []byte
- func (r *RequestMetaHeader) StableSize() (size int)
- func (r *RequestMetaHeader) ToGRPCMessage() grpc.Message
- func (r *RequestMetaHeader) Unmarshal(data []byte) error
- func (r *RequestMetaHeader) UnmarshalJSON(data []byte) error
- type RequestVerificationHeader
- func (r *RequestVerificationHeader) FromGRPCMessage(m grpc.Message) error
- func (r *RequestVerificationHeader) GetBodySignature() *refs.Signature
- func (r *RequestVerificationHeader) GetMetaSignature() *refs.Signature
- func (r *RequestVerificationHeader) GetOrigin() *RequestVerificationHeader
- func (r *RequestVerificationHeader) GetOriginSignature() *refs.Signature
- func (r *RequestVerificationHeader) MarshalJSON() ([]byte, error)
- func (r *RequestVerificationHeader) SetBodySignature(v *refs.Signature)
- func (r *RequestVerificationHeader) SetMetaSignature(v *refs.Signature)
- func (r *RequestVerificationHeader) SetOrigin(v *RequestVerificationHeader)
- func (r *RequestVerificationHeader) SetOriginSignature(v *refs.Signature)
- func (r *RequestVerificationHeader) StableMarshal(buf []byte) []byte
- func (r *RequestVerificationHeader) StableSize() (size int)
- func (r *RequestVerificationHeader) ToGRPCMessage() grpc.Message
- func (r *RequestVerificationHeader) Unmarshal(data []byte) error
- func (r *RequestVerificationHeader) UnmarshalJSON(data []byte) error
- type ResponseHeaders
- func (c *ResponseHeaders) FromMessage(m interface{ ... }) error
- func (c *ResponseHeaders) GetMetaHeader() *ResponseMetaHeader
- func (c *ResponseHeaders) GetVerificationHeader() *ResponseVerificationHeader
- func (c *ResponseHeaders) SetMetaHeader(v *ResponseMetaHeader)
- func (c *ResponseHeaders) SetVerificationHeader(v *ResponseVerificationHeader)
- func (c *ResponseHeaders) ToMessage(m interface{ ... })
- type ResponseMetaHeader
- func (r *ResponseMetaHeader) FromGRPCMessage(m grpc.Message) error
- func (r *ResponseMetaHeader) GetEpoch() uint64
- func (r *ResponseMetaHeader) GetOrigin() *ResponseMetaHeader
- func (r *ResponseMetaHeader) GetStatus() *status.Status
- func (r *ResponseMetaHeader) GetTTL() uint32
- func (r *ResponseMetaHeader) GetVersion() *refs.Version
- func (r *ResponseMetaHeader) GetXHeaders() []XHeader
- func (r *ResponseMetaHeader) MarshalJSON() ([]byte, error)
- func (r *ResponseMetaHeader) SetEpoch(v uint64)
- func (r *ResponseMetaHeader) SetOrigin(v *ResponseMetaHeader)
- func (r *ResponseMetaHeader) SetStatus(v *status.Status)
- func (r *ResponseMetaHeader) SetTTL(v uint32)
- func (r *ResponseMetaHeader) SetVersion(v *refs.Version)
- func (r *ResponseMetaHeader) SetXHeaders(v []XHeader)
- func (r *ResponseMetaHeader) StableMarshal(buf []byte) []byte
- func (r *ResponseMetaHeader) StableSize() (size int)
- func (r *ResponseMetaHeader) ToGRPCMessage() grpc.Message
- func (r *ResponseMetaHeader) Unmarshal(data []byte) error
- func (r *ResponseMetaHeader) UnmarshalJSON(data []byte) error
- type ResponseVerificationHeader
- func (r *ResponseVerificationHeader) FromGRPCMessage(m grpc.Message) error
- func (r *ResponseVerificationHeader) GetBodySignature() *refs.Signature
- func (r *ResponseVerificationHeader) GetMetaSignature() *refs.Signature
- func (r *ResponseVerificationHeader) GetOrigin() *ResponseVerificationHeader
- func (r *ResponseVerificationHeader) GetOriginSignature() *refs.Signature
- func (r *ResponseVerificationHeader) MarshalJSON() ([]byte, error)
- func (r *ResponseVerificationHeader) SetBodySignature(v *refs.Signature)
- func (r *ResponseVerificationHeader) SetMetaSignature(v *refs.Signature)
- func (r *ResponseVerificationHeader) SetOrigin(v *ResponseVerificationHeader)
- func (r *ResponseVerificationHeader) SetOriginSignature(v *refs.Signature)
- func (r *ResponseVerificationHeader) StableMarshal(buf []byte) []byte
- func (r *ResponseVerificationHeader) StableSize() (size int)
- func (r *ResponseVerificationHeader) ToGRPCMessage() grpc.Message
- func (r *ResponseVerificationHeader) Unmarshal(data []byte) error
- func (r *ResponseVerificationHeader) UnmarshalJSON(data []byte) error
- type SessionTokendeprecated
- type SessionTokenBodydeprecated
- type SessionTokenContextdeprecated
- type Token
- func (t *Token) FromGRPCMessage(m grpc.Message) error
- func (t *Token) GetBody() *TokenBody
- func (t *Token) GetSignature() *refs.Signature
- func (t *Token) MarshalJSON() ([]byte, error)
- func (t *Token) SetBody(v *TokenBody)
- func (t *Token) SetSignature(v *refs.Signature)
- func (t *Token) StableMarshal(buf []byte) []byte
- func (t *Token) StableSize() (size int)
- func (t *Token) ToGRPCMessage() grpc.Message
- func (t *Token) Unmarshal(data []byte) error
- func (t *Token) UnmarshalJSON(data []byte) error
- type TokenBody
- func (t *TokenBody) FromGRPCMessage(m grpc.Message) error
- func (t *TokenBody) GetContext() TokenContext
- func (t *TokenBody) GetID() []byte
- func (t *TokenBody) GetLifetime() *TokenLifetime
- func (t *TokenBody) GetOwnerID() *refs.OwnerID
- func (t *TokenBody) GetSessionKey() []byte
- func (t *TokenBody) MarshalJSON() ([]byte, error)
- func (t *TokenBody) SetContext(v TokenContext)
- func (t *TokenBody) SetID(v []byte)
- func (t *TokenBody) SetLifetime(v *TokenLifetime)
- func (t *TokenBody) SetOwnerID(v *refs.OwnerID)
- func (t *TokenBody) SetSessionKey(v []byte)
- func (t *TokenBody) StableMarshal(buf []byte) []byte
- func (t *TokenBody) StableSize() (size int)
- func (t *TokenBody) ToGRPCMessage() grpc.Message
- func (t *TokenBody) Unmarshal(data []byte) error
- func (t *TokenBody) UnmarshalJSON(data []byte) error
- type TokenContext
- type TokenLifetime
- func (l *TokenLifetime) FromGRPCMessage(m grpc.Message) error
- func (l *TokenLifetime) GetExp() uint64
- func (l *TokenLifetime) GetIat() uint64
- func (l *TokenLifetime) GetNbf() uint64
- func (l *TokenLifetime) MarshalJSON() ([]byte, error)
- func (l *TokenLifetime) SetExp(v uint64)
- func (l *TokenLifetime) SetIat(v uint64)
- func (l *TokenLifetime) SetNbf(v uint64)
- func (l *TokenLifetime) StableMarshal(buf []byte) []byte
- func (l *TokenLifetime) StableSize() (size int)
- func (l *TokenLifetime) ToGRPCMessage() grpc.Message
- func (l *TokenLifetime) Unmarshal(data []byte) error
- func (l *TokenLifetime) UnmarshalJSON(data []byte) error
- type XHeader
- func (x *XHeader) FromGRPCMessage(m grpc.Message) error
- func (x *XHeader) GetKey() string
- func (x *XHeader) GetValue() string
- func (x *XHeader) MarshalJSON() ([]byte, error)
- func (x *XHeader) SetKey(v string)
- func (x *XHeader) SetValue(v string)
- func (x *XHeader) StableMarshal(buf []byte) []byte
- func (x *XHeader) StableSize() (size int)
- func (x *XHeader) ToGRPCMessage() grpc.Message
- func (x *XHeader) Unmarshal(data []byte) error
- func (x *XHeader) UnmarshalJSON(data []byte) error
Constants ¶
const ( // StatusTokenNotFound is a local status.Code value for // TOKEN_NOT_FOUND session failure. StatusTokenNotFound status.Code = iota // StatusTokenExpired is a local status.Code value for // TOKEN_EXPIRED session failure. StatusTokenExpired )
const ( // XHeaderNetmapEpoch is a key to the reserved X-header that specifies netmap epoch // to use for object placement calculation. If set to '0' or not set, the current // epoch only will be used. XHeaderNetmapEpoch = ReservedXHeaderPrefix + "NETMAP_EPOCH" // XHeaderNetmapLookupDepth is a key to the reserved X-header that limits // how many past epochs back the node will can lookup. If set to '0' or not // set, the current epoch only will be used. XHeaderNetmapLookupDepth = ReservedXHeaderPrefix + "NETMAP_LOOKUP_DEPTH" )
const ( // XHeaderNetmapEpochNeoFS is a key to the reserved X-header that specifies netmap epoch // to use for object placement calculation. If set to '0' or not set, the current // epoch only will be used. // Deprecated: use XHeaderNetmapEpoch. XHeaderNetmapEpochNeoFS = ReservedXHeaderPrefixNeoFS + "NETMAP_EPOCH" // XHeaderNetmapLookupDepthNeoFS is a key to the reserved X-header that limits // how many past epochs back the node will can lookup. If set to '0' or not // set, the current epoch only will be used. // Deprecated: use XHeaderNetmapLookupDepth. XHeaderNetmapLookupDepthNeoFS = ReservedXHeaderPrefixNeoFS + "NETMAP_LOOKUP_DEPTH" )
const ReservedXHeaderPrefix = "__SYSTEM__"
ReservedXHeaderPrefix is a prefix of keys to "well-known" X-headers.
const ReservedXHeaderPrefixNeoFS = "__NEOFS__"
ReservedXHeaderPrefixNeoFS is a prefix of keys to "well-known" X-headers. Deprecated: use ReservedXHeaderPrefix.
Variables ¶
This section is empty.
Functions ¶
func ContainerSessionVerbToGRPCField ¶
func ContainerSessionVerbToGRPCField(v ContainerSessionVerb) session.ContainerSessionContext_Verb
ContainerSessionVerbToGRPCField converts ContainerSessionVerb to gRPC-generated session.ContainerSessionContext_Verb.
If v is outside of the ContainerSessionVerb enum, session.ContainerSessionContext_VERB_UNSPECIFIED is returned.
func LocalizeFailStatus ¶
LocalizeFailStatus checks if passed global status.Code is related to session failure and:
then localizes the code and returns true, else leaves the code unchanged and returns false.
Arg must not be nil.
func ObjectSessionVerbToGRPCField ¶
func ObjectSessionVerbToGRPCField(v ObjectSessionVerb) session.ObjectSessionContext_Verb
func SetStatus ¶
func SetStatus(msg interface { GetMetaHeader() *ResponseMetaHeader SetMetaHeader(*ResponseMetaHeader) }, st *status.Status, )
SetStatus sets status of the message which can carry ResponseMetaHeader.
Sets status field on the "highest" level of meta headers. If meta header is missing in message, it is allocated.
func XHeadersToGRPC ¶
Types ¶
type ContainerSessionContext ¶
type ContainerSessionContext struct {
// contains filtered or unexported fields
}
ContainerSessionContext represents structure of the NeoFS API v2 session.ContainerSessionContext message.
func (*ContainerSessionContext) ContainerID ¶
func (x *ContainerSessionContext) ContainerID() *refs.ContainerID
ContainerID returns identifier of the container related to the session.
func (*ContainerSessionContext) FromGRPCMessage ¶
func (x *ContainerSessionContext) FromGRPCMessage(m grpc.Message) error
FromGRPCMessage tries to restore ContainerSessionContext from grpc.Message.
Returns message.ErrUnexpectedMessageType if m is not a gRPC-generated session.ContainerSessionContext message.
func (*ContainerSessionContext) MarshalJSON ¶
func (x *ContainerSessionContext) MarshalJSON() ([]byte, error)
func (*ContainerSessionContext) SetContainerID ¶
func (x *ContainerSessionContext) SetContainerID(v *refs.ContainerID)
SetContainerID sets identifier of the container related to the session.
func (*ContainerSessionContext) SetVerb ¶
func (x *ContainerSessionContext) SetVerb(v ContainerSessionVerb)
SetVerb sets type of request for which the token is issued.
func (*ContainerSessionContext) SetWildcard ¶
func (x *ContainerSessionContext) SetWildcard(v bool)
SetWildcard sets wildcard flag of the container session.
func (*ContainerSessionContext) StableMarshal ¶
func (x *ContainerSessionContext) StableMarshal(buf []byte) []byte
func (*ContainerSessionContext) StableSize ¶
func (x *ContainerSessionContext) StableSize() (size int)
func (*ContainerSessionContext) ToGRPCMessage ¶
func (x *ContainerSessionContext) ToGRPCMessage() grpc.Message
ToGRPCMessage converts ContainerSessionContext to gRPC-generated session.ContainerSessionContext message.
func (*ContainerSessionContext) Unmarshal ¶
func (x *ContainerSessionContext) Unmarshal(data []byte) error
func (*ContainerSessionContext) UnmarshalJSON ¶
func (x *ContainerSessionContext) UnmarshalJSON(data []byte) error
func (*ContainerSessionContext) Verb ¶
func (x *ContainerSessionContext) Verb() ContainerSessionVerb
Verb returns type of request for which the token is issued.
func (*ContainerSessionContext) Wildcard ¶
func (x *ContainerSessionContext) Wildcard() bool
Wildcard returns wildcard flag of the container session.
type ContainerSessionVerb ¶
type ContainerSessionVerb uint32
ContainerSessionVerb represents NeoFS API v2 session.ContainerSessionContext.Verb enumeration.
const ( // ContainerVerbUnknown corresponds to VERB_UNSPECIFIED enum value. ContainerVerbUnknown ContainerSessionVerb = iota // ContainerVerbPut corresponds to PUT enum value. ContainerVerbPut // ContainerVerbDelete corresponds to DELETE enum value. ContainerVerbDelete // ContainerVerbSetEACL corresponds to SETEACL enum value. ContainerVerbSetEACL )
func ContainerSessionVerbFromGRPCField ¶
func ContainerSessionVerbFromGRPCField(v session.ContainerSessionContext_Verb) ContainerSessionVerb
ContainerSessionVerbFromGRPCField converts gRPC-generated session.ContainerSessionContext_Verb to ContainerSessionVerb.
If v is outside of the session.ContainerSessionContext_Verb enum, ContainerVerbUnknown is returned.
func (*ContainerSessionVerb) FromString ¶
func (x *ContainerSessionVerb) FromString(s string) bool
FromString parses ContainerSessionVerb from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
func (ContainerSessionVerb) String ¶
func (x ContainerSessionVerb) String() string
String returns string representation of ContainerSessionVerb.
type CreateRequest ¶
type CreateRequest struct { RequestHeaders // contains filtered or unexported fields }
func (*CreateRequest) FromGRPCMessage ¶
func (c *CreateRequest) FromGRPCMessage(m grpc.Message) error
func (*CreateRequest) GetBody ¶
func (c *CreateRequest) GetBody() *CreateRequestBody
func (*CreateRequest) GetMetaHeader ¶
func (c *CreateRequest) GetMetaHeader() *RequestMetaHeader
func (*CreateRequest) GetVerificationHeader ¶
func (c *CreateRequest) GetVerificationHeader() *RequestVerificationHeader
func (*CreateRequest) SetBody ¶
func (c *CreateRequest) SetBody(v *CreateRequestBody)
func (*CreateRequest) SetMetaHeader ¶
func (c *CreateRequest) SetMetaHeader(v *RequestMetaHeader)
func (*CreateRequest) SetVerificationHeader ¶
func (c *CreateRequest) SetVerificationHeader(v *RequestVerificationHeader)
func (*CreateRequest) ToGRPCMessage ¶
func (c *CreateRequest) ToGRPCMessage() grpc.Message
type CreateRequestBody ¶
type CreateRequestBody struct {
// contains filtered or unexported fields
}
func (*CreateRequestBody) FromGRPCMessage ¶
func (c *CreateRequestBody) FromGRPCMessage(m grpc.Message) error
func (*CreateRequestBody) GetExpiration ¶
func (c *CreateRequestBody) GetExpiration() uint64
func (*CreateRequestBody) GetOwnerID ¶
func (c *CreateRequestBody) GetOwnerID() *refs.OwnerID
func (*CreateRequestBody) SetExpiration ¶
func (c *CreateRequestBody) SetExpiration(v uint64)
func (*CreateRequestBody) SetOwnerID ¶
func (c *CreateRequestBody) SetOwnerID(v *refs.OwnerID)
func (*CreateRequestBody) StableMarshal ¶
func (c *CreateRequestBody) StableMarshal(buf []byte) []byte
func (*CreateRequestBody) StableSize ¶
func (c *CreateRequestBody) StableSize() (size int)
func (*CreateRequestBody) ToGRPCMessage ¶
func (c *CreateRequestBody) ToGRPCMessage() grpc.Message
func (*CreateRequestBody) Unmarshal ¶
func (c *CreateRequestBody) Unmarshal(data []byte) error
type CreateResponse ¶
type CreateResponse struct { ResponseHeaders // contains filtered or unexported fields }
func (*CreateResponse) FromGRPCMessage ¶
func (c *CreateResponse) FromGRPCMessage(m grpc.Message) error
func (*CreateResponse) GetBody ¶
func (c *CreateResponse) GetBody() *CreateResponseBody
func (*CreateResponse) GetMetaHeader ¶
func (c *CreateResponse) GetMetaHeader() *ResponseMetaHeader
func (*CreateResponse) GetVerificationHeader ¶
func (c *CreateResponse) GetVerificationHeader() *ResponseVerificationHeader
func (*CreateResponse) SetBody ¶
func (c *CreateResponse) SetBody(v *CreateResponseBody)
func (*CreateResponse) SetMetaHeader ¶
func (c *CreateResponse) SetMetaHeader(v *ResponseMetaHeader)
func (*CreateResponse) SetVerificationHeader ¶
func (c *CreateResponse) SetVerificationHeader(v *ResponseVerificationHeader)
func (*CreateResponse) ToGRPCMessage ¶
func (c *CreateResponse) ToGRPCMessage() grpc.Message
type CreateResponseBody ¶
type CreateResponseBody struct {
// contains filtered or unexported fields
}
func (*CreateResponseBody) FromGRPCMessage ¶
func (c *CreateResponseBody) FromGRPCMessage(m grpc.Message) error
func (*CreateResponseBody) GetID ¶
func (c *CreateResponseBody) GetID() []byte
func (*CreateResponseBody) GetSessionKey ¶
func (c *CreateResponseBody) GetSessionKey() []byte
func (*CreateResponseBody) SetID ¶
func (c *CreateResponseBody) SetID(v []byte)
func (*CreateResponseBody) SetSessionKey ¶
func (c *CreateResponseBody) SetSessionKey(v []byte)
func (*CreateResponseBody) StableMarshal ¶
func (c *CreateResponseBody) StableMarshal(buf []byte) []byte
func (*CreateResponseBody) StableSize ¶
func (c *CreateResponseBody) StableSize() (size int)
func (*CreateResponseBody) ToGRPCMessage ¶
func (c *CreateResponseBody) ToGRPCMessage() grpc.Message
func (*CreateResponseBody) Unmarshal ¶
func (c *CreateResponseBody) Unmarshal(data []byte) error
type ObjectSessionContext ¶
type ObjectSessionContext struct {
// contains filtered or unexported fields
}
func (*ObjectSessionContext) FromGRPCMessage ¶
func (c *ObjectSessionContext) FromGRPCMessage(m grpc.Message) error
func (*ObjectSessionContext) GetContainer ¶
func (c *ObjectSessionContext) GetContainer() *refs.ContainerID
func (*ObjectSessionContext) GetObjects ¶
func (c *ObjectSessionContext) GetObjects() []refs.ObjectID
func (*ObjectSessionContext) GetVerb ¶
func (c *ObjectSessionContext) GetVerb() ObjectSessionVerb
func (*ObjectSessionContext) MarshalJSON ¶
func (c *ObjectSessionContext) MarshalJSON() ([]byte, error)
func (*ObjectSessionContext) SetTarget ¶
func (c *ObjectSessionContext) SetTarget(cnr *refs.ContainerID, objs ...refs.ObjectID)
func (*ObjectSessionContext) SetVerb ¶
func (c *ObjectSessionContext) SetVerb(v ObjectSessionVerb)
func (*ObjectSessionContext) StableMarshal ¶
func (c *ObjectSessionContext) StableMarshal(buf []byte) []byte
func (*ObjectSessionContext) StableSize ¶
func (c *ObjectSessionContext) StableSize() (size int)
func (*ObjectSessionContext) ToGRPCMessage ¶
func (c *ObjectSessionContext) ToGRPCMessage() grpc.Message
func (*ObjectSessionContext) Unmarshal ¶
func (c *ObjectSessionContext) Unmarshal(data []byte) error
func (*ObjectSessionContext) UnmarshalJSON ¶
func (c *ObjectSessionContext) UnmarshalJSON(data []byte) error
type ObjectSessionVerb ¶
type ObjectSessionVerb uint32
const ( ObjectVerbUnknown ObjectSessionVerb = iota ObjectVerbPut ObjectVerbGet ObjectVerbHead ObjectVerbSearch ObjectVerbDelete ObjectVerbRange ObjectVerbRangeHash ObjectVerbPatch )
func ObjectSessionVerbFromGRPCField ¶
func ObjectSessionVerbFromGRPCField(v session.ObjectSessionContext_Verb) ObjectSessionVerb
func (*ObjectSessionVerb) FromString ¶
func (x *ObjectSessionVerb) FromString(s string) bool
FromString parses ObjectSessionVerb from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
func (ObjectSessionVerb) String ¶
func (x ObjectSessionVerb) String() string
String returns string representation of ObjectSessionVerb.
type RequestHeaders ¶
type RequestHeaders struct {
// contains filtered or unexported fields
}
RequestHeaders represents common part of all NeoFS requests including headers.
func (*RequestHeaders) FromMessage ¶
func (c *RequestHeaders) FromMessage(m interface { GetMetaHeader() *session.RequestMetaHeader GetVerifyHeader() *session.RequestVerificationHeader }, ) error
func (*RequestHeaders) GetMetaHeader ¶
func (c *RequestHeaders) GetMetaHeader() *RequestMetaHeader
GetMetaHeader returns meta header of the request.
func (*RequestHeaders) GetVerificationHeader ¶
func (c *RequestHeaders) GetVerificationHeader() *RequestVerificationHeader
GetVerificationHeader returns verification header of the request.
func (*RequestHeaders) SetMetaHeader ¶
func (c *RequestHeaders) SetMetaHeader(v *RequestMetaHeader)
SetMetaHeader sets meta header of the request.
func (*RequestHeaders) SetVerificationHeader ¶
func (c *RequestHeaders) SetVerificationHeader(v *RequestVerificationHeader)
SetVerificationHeader sets verification header of the request.
func (*RequestHeaders) ToMessage ¶
func (c *RequestHeaders) ToMessage(m interface { SetMetaHeader(*session.RequestMetaHeader) SetVerifyHeader(*session.RequestVerificationHeader) }, )
type RequestMetaHeader ¶
type RequestMetaHeader struct {
// contains filtered or unexported fields
}
func (*RequestMetaHeader) FromGRPCMessage ¶
func (r *RequestMetaHeader) FromGRPCMessage(m grpc.Message) error
func (*RequestMetaHeader) GetBearerToken ¶
func (r *RequestMetaHeader) GetBearerToken() *acl.BearerToken
func (*RequestMetaHeader) GetEpoch ¶
func (r *RequestMetaHeader) GetEpoch() uint64
func (*RequestMetaHeader) GetNetworkMagic ¶
func (r *RequestMetaHeader) GetNetworkMagic() uint64
GetNetworkMagic returns NeoFS network magic.
func (*RequestMetaHeader) GetOrigin ¶
func (r *RequestMetaHeader) GetOrigin() *RequestMetaHeader
func (*RequestMetaHeader) GetSessionToken ¶
func (r *RequestMetaHeader) GetSessionToken() *Token
func (*RequestMetaHeader) GetTTL ¶
func (r *RequestMetaHeader) GetTTL() uint32
func (*RequestMetaHeader) GetVersion ¶
func (r *RequestMetaHeader) GetVersion() *refs.Version
func (*RequestMetaHeader) GetXHeaders ¶
func (r *RequestMetaHeader) GetXHeaders() []XHeader
func (*RequestMetaHeader) MarshalJSON ¶
func (r *RequestMetaHeader) MarshalJSON() ([]byte, error)
func (*RequestMetaHeader) SetBearerToken ¶
func (r *RequestMetaHeader) SetBearerToken(v *acl.BearerToken)
func (*RequestMetaHeader) SetEpoch ¶
func (r *RequestMetaHeader) SetEpoch(v uint64)
func (*RequestMetaHeader) SetNetworkMagic ¶
func (r *RequestMetaHeader) SetNetworkMagic(v uint64)
SetNetworkMagic sets NeoFS network magic.
func (*RequestMetaHeader) SetOrigin ¶
func (r *RequestMetaHeader) SetOrigin(v *RequestMetaHeader)
func (*RequestMetaHeader) SetSessionToken ¶
func (r *RequestMetaHeader) SetSessionToken(v *Token)
func (*RequestMetaHeader) SetTTL ¶
func (r *RequestMetaHeader) SetTTL(v uint32)
func (*RequestMetaHeader) SetVersion ¶
func (r *RequestMetaHeader) SetVersion(v *refs.Version)
func (*RequestMetaHeader) SetXHeaders ¶
func (r *RequestMetaHeader) SetXHeaders(v []XHeader)
func (*RequestMetaHeader) StableMarshal ¶
func (r *RequestMetaHeader) StableMarshal(buf []byte) []byte
func (*RequestMetaHeader) StableSize ¶
func (r *RequestMetaHeader) StableSize() (size int)
func (*RequestMetaHeader) ToGRPCMessage ¶
func (r *RequestMetaHeader) ToGRPCMessage() grpc.Message
func (*RequestMetaHeader) Unmarshal ¶
func (r *RequestMetaHeader) Unmarshal(data []byte) error
func (*RequestMetaHeader) UnmarshalJSON ¶
func (r *RequestMetaHeader) UnmarshalJSON(data []byte) error
type RequestVerificationHeader ¶
type RequestVerificationHeader struct {
// contains filtered or unexported fields
}
func (*RequestVerificationHeader) FromGRPCMessage ¶
func (r *RequestVerificationHeader) FromGRPCMessage(m grpc.Message) error
func (*RequestVerificationHeader) GetBodySignature ¶
func (r *RequestVerificationHeader) GetBodySignature() *refs.Signature
func (*RequestVerificationHeader) GetMetaSignature ¶
func (r *RequestVerificationHeader) GetMetaSignature() *refs.Signature
func (*RequestVerificationHeader) GetOrigin ¶
func (r *RequestVerificationHeader) GetOrigin() *RequestVerificationHeader
func (*RequestVerificationHeader) GetOriginSignature ¶
func (r *RequestVerificationHeader) GetOriginSignature() *refs.Signature
func (*RequestVerificationHeader) MarshalJSON ¶
func (r *RequestVerificationHeader) MarshalJSON() ([]byte, error)
func (*RequestVerificationHeader) SetBodySignature ¶
func (r *RequestVerificationHeader) SetBodySignature(v *refs.Signature)
func (*RequestVerificationHeader) SetMetaSignature ¶
func (r *RequestVerificationHeader) SetMetaSignature(v *refs.Signature)
func (*RequestVerificationHeader) SetOrigin ¶
func (r *RequestVerificationHeader) SetOrigin(v *RequestVerificationHeader)
func (*RequestVerificationHeader) SetOriginSignature ¶
func (r *RequestVerificationHeader) SetOriginSignature(v *refs.Signature)
func (*RequestVerificationHeader) StableMarshal ¶
func (r *RequestVerificationHeader) StableMarshal(buf []byte) []byte
func (*RequestVerificationHeader) StableSize ¶
func (r *RequestVerificationHeader) StableSize() (size int)
func (*RequestVerificationHeader) ToGRPCMessage ¶
func (r *RequestVerificationHeader) ToGRPCMessage() grpc.Message
func (*RequestVerificationHeader) Unmarshal ¶
func (r *RequestVerificationHeader) Unmarshal(data []byte) error
func (*RequestVerificationHeader) UnmarshalJSON ¶
func (r *RequestVerificationHeader) UnmarshalJSON(data []byte) error
type ResponseHeaders ¶
type ResponseHeaders struct {
// contains filtered or unexported fields
}
ResponseHeaders represents common part of all NeoFS responses including headers.
func (*ResponseHeaders) FromMessage ¶
func (c *ResponseHeaders) FromMessage(m interface { GetMetaHeader() *session.ResponseMetaHeader GetVerifyHeader() *session.ResponseVerificationHeader }, ) error
func (*ResponseHeaders) GetMetaHeader ¶
func (c *ResponseHeaders) GetMetaHeader() *ResponseMetaHeader
GetMetaHeader returns meta header of the response.
func (*ResponseHeaders) GetVerificationHeader ¶
func (c *ResponseHeaders) GetVerificationHeader() *ResponseVerificationHeader
GetVerificationHeader returns verification header of the response.
func (*ResponseHeaders) SetMetaHeader ¶
func (c *ResponseHeaders) SetMetaHeader(v *ResponseMetaHeader)
SetMetaHeader sets meta header of the response.
func (*ResponseHeaders) SetVerificationHeader ¶
func (c *ResponseHeaders) SetVerificationHeader(v *ResponseVerificationHeader)
SetVerificationHeader sets verification header of the response.
func (*ResponseHeaders) ToMessage ¶
func (c *ResponseHeaders) ToMessage(m interface { SetMetaHeader(*session.ResponseMetaHeader) SetVerifyHeader(*session.ResponseVerificationHeader) }, )
type ResponseMetaHeader ¶
type ResponseMetaHeader struct {
// contains filtered or unexported fields
}
func (*ResponseMetaHeader) FromGRPCMessage ¶
func (r *ResponseMetaHeader) FromGRPCMessage(m grpc.Message) error
func (*ResponseMetaHeader) GetEpoch ¶
func (r *ResponseMetaHeader) GetEpoch() uint64
func (*ResponseMetaHeader) GetOrigin ¶
func (r *ResponseMetaHeader) GetOrigin() *ResponseMetaHeader
func (*ResponseMetaHeader) GetStatus ¶
func (r *ResponseMetaHeader) GetStatus() *status.Status
GetStatus returns response status.
func (*ResponseMetaHeader) GetTTL ¶
func (r *ResponseMetaHeader) GetTTL() uint32
func (*ResponseMetaHeader) GetVersion ¶
func (r *ResponseMetaHeader) GetVersion() *refs.Version
func (*ResponseMetaHeader) GetXHeaders ¶
func (r *ResponseMetaHeader) GetXHeaders() []XHeader
func (*ResponseMetaHeader) MarshalJSON ¶
func (r *ResponseMetaHeader) MarshalJSON() ([]byte, error)
func (*ResponseMetaHeader) SetEpoch ¶
func (r *ResponseMetaHeader) SetEpoch(v uint64)
func (*ResponseMetaHeader) SetOrigin ¶
func (r *ResponseMetaHeader) SetOrigin(v *ResponseMetaHeader)
func (*ResponseMetaHeader) SetStatus ¶
func (r *ResponseMetaHeader) SetStatus(v *status.Status)
SetStatus sets response status.
func (*ResponseMetaHeader) SetTTL ¶
func (r *ResponseMetaHeader) SetTTL(v uint32)
func (*ResponseMetaHeader) SetVersion ¶
func (r *ResponseMetaHeader) SetVersion(v *refs.Version)
func (*ResponseMetaHeader) SetXHeaders ¶
func (r *ResponseMetaHeader) SetXHeaders(v []XHeader)
func (*ResponseMetaHeader) StableMarshal ¶
func (r *ResponseMetaHeader) StableMarshal(buf []byte) []byte
func (*ResponseMetaHeader) StableSize ¶
func (r *ResponseMetaHeader) StableSize() (size int)
func (*ResponseMetaHeader) ToGRPCMessage ¶
func (r *ResponseMetaHeader) ToGRPCMessage() grpc.Message
func (*ResponseMetaHeader) Unmarshal ¶
func (r *ResponseMetaHeader) Unmarshal(data []byte) error
func (*ResponseMetaHeader) UnmarshalJSON ¶
func (r *ResponseMetaHeader) UnmarshalJSON(data []byte) error
type ResponseVerificationHeader ¶
type ResponseVerificationHeader struct {
// contains filtered or unexported fields
}
func (*ResponseVerificationHeader) FromGRPCMessage ¶
func (r *ResponseVerificationHeader) FromGRPCMessage(m grpc.Message) error
func (*ResponseVerificationHeader) GetBodySignature ¶
func (r *ResponseVerificationHeader) GetBodySignature() *refs.Signature
func (*ResponseVerificationHeader) GetMetaSignature ¶
func (r *ResponseVerificationHeader) GetMetaSignature() *refs.Signature
func (*ResponseVerificationHeader) GetOrigin ¶
func (r *ResponseVerificationHeader) GetOrigin() *ResponseVerificationHeader
func (*ResponseVerificationHeader) GetOriginSignature ¶
func (r *ResponseVerificationHeader) GetOriginSignature() *refs.Signature
func (*ResponseVerificationHeader) MarshalJSON ¶
func (r *ResponseVerificationHeader) MarshalJSON() ([]byte, error)
func (*ResponseVerificationHeader) SetBodySignature ¶
func (r *ResponseVerificationHeader) SetBodySignature(v *refs.Signature)
func (*ResponseVerificationHeader) SetMetaSignature ¶
func (r *ResponseVerificationHeader) SetMetaSignature(v *refs.Signature)
func (*ResponseVerificationHeader) SetOrigin ¶
func (r *ResponseVerificationHeader) SetOrigin(v *ResponseVerificationHeader)
func (*ResponseVerificationHeader) SetOriginSignature ¶
func (r *ResponseVerificationHeader) SetOriginSignature(v *refs.Signature)
func (*ResponseVerificationHeader) StableMarshal ¶
func (r *ResponseVerificationHeader) StableMarshal(buf []byte) []byte
func (*ResponseVerificationHeader) StableSize ¶
func (r *ResponseVerificationHeader) StableSize() (size int)
func (*ResponseVerificationHeader) ToGRPCMessage ¶
func (r *ResponseVerificationHeader) ToGRPCMessage() grpc.Message
func (*ResponseVerificationHeader) Unmarshal ¶
func (r *ResponseVerificationHeader) Unmarshal(data []byte) error
func (*ResponseVerificationHeader) UnmarshalJSON ¶
func (r *ResponseVerificationHeader) UnmarshalJSON(data []byte) error
type SessionToken
deprecated
type SessionToken = Token
Deprecated: use Token instead.
type SessionTokenBody
deprecated
type SessionTokenBody = TokenBody
Deprecated: use TokenBody instead.
type SessionTokenContext
deprecated
type SessionTokenContext = TokenContext
Deprecated: use TokenContext instead.
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) GetSignature ¶
func (*Token) MarshalJSON ¶
func (*Token) SetSignature ¶
func (*Token) StableMarshal ¶
func (*Token) StableSize ¶
func (*Token) ToGRPCMessage ¶
func (*Token) UnmarshalJSON ¶
type TokenBody ¶
type TokenBody struct {
// contains filtered or unexported fields
}
func (*TokenBody) GetContext ¶
func (t *TokenBody) GetContext() TokenContext
func (*TokenBody) GetLifetime ¶
func (t *TokenBody) GetLifetime() *TokenLifetime
func (*TokenBody) GetOwnerID ¶
func (*TokenBody) GetSessionKey ¶
func (*TokenBody) MarshalJSON ¶
func (*TokenBody) SetContext ¶
func (t *TokenBody) SetContext(v TokenContext)
func (*TokenBody) SetLifetime ¶
func (t *TokenBody) SetLifetime(v *TokenLifetime)
func (*TokenBody) SetOwnerID ¶
func (*TokenBody) SetSessionKey ¶
func (*TokenBody) StableMarshal ¶
func (*TokenBody) StableSize ¶
func (*TokenBody) ToGRPCMessage ¶
func (*TokenBody) UnmarshalJSON ¶
type TokenContext ¶
type TokenContext interface {
// contains filtered or unexported methods
}
type TokenLifetime ¶
type TokenLifetime struct {
// contains filtered or unexported fields
}
func (*TokenLifetime) FromGRPCMessage ¶
func (l *TokenLifetime) FromGRPCMessage(m grpc.Message) error
func (*TokenLifetime) GetExp ¶
func (l *TokenLifetime) GetExp() uint64
func (*TokenLifetime) GetIat ¶
func (l *TokenLifetime) GetIat() uint64
func (*TokenLifetime) GetNbf ¶
func (l *TokenLifetime) GetNbf() uint64
func (*TokenLifetime) MarshalJSON ¶
func (l *TokenLifetime) MarshalJSON() ([]byte, error)
func (*TokenLifetime) SetExp ¶
func (l *TokenLifetime) SetExp(v uint64)
func (*TokenLifetime) SetIat ¶
func (l *TokenLifetime) SetIat(v uint64)
func (*TokenLifetime) SetNbf ¶
func (l *TokenLifetime) SetNbf(v uint64)
func (*TokenLifetime) StableMarshal ¶
func (l *TokenLifetime) StableMarshal(buf []byte) []byte
func (*TokenLifetime) StableSize ¶
func (l *TokenLifetime) StableSize() (size int)
func (*TokenLifetime) ToGRPCMessage ¶
func (l *TokenLifetime) ToGRPCMessage() grpc.Message
func (*TokenLifetime) Unmarshal ¶
func (l *TokenLifetime) Unmarshal(data []byte) error
func (*TokenLifetime) UnmarshalJSON ¶
func (l *TokenLifetime) UnmarshalJSON(data []byte) error
type XHeader ¶
type XHeader struct {
// contains filtered or unexported fields
}