session

package
v0.0.0-...-afdc2d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
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
)
View Source
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"
)
View Source
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"
)
View Source
const ReservedXHeaderPrefix = "__SYSTEM__"

ReservedXHeaderPrefix is a prefix of keys to "well-known" X-headers.

View Source
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 GlobalizeFail

func GlobalizeFail(c *status.Code)

GlobalizeFail globalizes local code of session failure.

Arg must not be nil.

func LocalizeFailStatus

func LocalizeFailStatus(c *status.Code) bool

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 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

func XHeadersToGRPC(xs []XHeader) (res []session.XHeader)

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

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

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 (*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 (*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 (*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 (*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 (*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 (*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 (*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) FromGRPCMessage

func (t *Token) FromGRPCMessage(m grpc.Message) error

func (*Token) GetBody

func (t *Token) GetBody() *TokenBody

func (*Token) GetSignature

func (t *Token) GetSignature() *refs.Signature

func (*Token) MarshalJSON

func (t *Token) MarshalJSON() ([]byte, error)

func (*Token) SetBody

func (t *Token) SetBody(v *TokenBody)

func (*Token) SetSignature

func (t *Token) SetSignature(v *refs.Signature)

func (*Token) StableMarshal

func (t *Token) StableMarshal(buf []byte) []byte

func (*Token) StableSize

func (t *Token) StableSize() (size int)

func (*Token) ToGRPCMessage

func (t *Token) ToGRPCMessage() grpc.Message

func (*Token) Unmarshal

func (t *Token) Unmarshal(data []byte) error

func (*Token) UnmarshalJSON

func (t *Token) UnmarshalJSON(data []byte) error

type TokenBody

type TokenBody struct {
	// contains filtered or unexported fields
}

func (*TokenBody) FromGRPCMessage

func (t *TokenBody) FromGRPCMessage(m grpc.Message) error

func (*TokenBody) GetContext

func (t *TokenBody) GetContext() TokenContext

func (*TokenBody) GetID

func (t *TokenBody) GetID() []byte

func (*TokenBody) GetLifetime

func (t *TokenBody) GetLifetime() *TokenLifetime

func (*TokenBody) GetOwnerID

func (t *TokenBody) GetOwnerID() *refs.OwnerID

func (*TokenBody) GetSessionKey

func (t *TokenBody) GetSessionKey() []byte

func (*TokenBody) MarshalJSON

func (t *TokenBody) MarshalJSON() ([]byte, error)

func (*TokenBody) SetContext

func (t *TokenBody) SetContext(v TokenContext)

func (*TokenBody) SetID

func (t *TokenBody) SetID(v []byte)

func (*TokenBody) SetLifetime

func (t *TokenBody) SetLifetime(v *TokenLifetime)

func (*TokenBody) SetOwnerID

func (t *TokenBody) SetOwnerID(v *refs.OwnerID)

func (*TokenBody) SetSessionKey

func (t *TokenBody) SetSessionKey(v []byte)

func (*TokenBody) StableMarshal

func (t *TokenBody) StableMarshal(buf []byte) []byte

func (*TokenBody) StableSize

func (t *TokenBody) StableSize() (size int)

func (*TokenBody) ToGRPCMessage

func (t *TokenBody) ToGRPCMessage() grpc.Message

func (*TokenBody) Unmarshal

func (t *TokenBody) Unmarshal(data []byte) error

func (*TokenBody) UnmarshalJSON

func (t *TokenBody) UnmarshalJSON(data []byte) error

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
}

func XHeadersFromGRPC

func XHeadersFromGRPC(xs []session.XHeader) (res []XHeader, err error)

func (*XHeader) FromGRPCMessage

func (x *XHeader) FromGRPCMessage(m grpc.Message) error

func (*XHeader) GetKey

func (x *XHeader) GetKey() string

func (*XHeader) GetValue

func (x *XHeader) GetValue() string

func (*XHeader) MarshalJSON

func (x *XHeader) MarshalJSON() ([]byte, error)

func (*XHeader) SetKey

func (x *XHeader) SetKey(v string)

func (*XHeader) SetValue

func (x *XHeader) SetValue(v string)

func (*XHeader) StableMarshal

func (x *XHeader) StableMarshal(buf []byte) []byte

func (*XHeader) StableSize

func (x *XHeader) StableSize() (size int)

func (*XHeader) ToGRPCMessage

func (x *XHeader) ToGRPCMessage() grpc.Message

func (*XHeader) Unmarshal

func (x *XHeader) Unmarshal(data []byte) error

func (*XHeader) UnmarshalJSON

func (x *XHeader) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL