Documentation
¶
Index ¶
- Constants
- Variables
- func AddSignatureWithKey(key *ecdsa.PrivateKey, v DataWithSignKeyAccumulator) error
- func DataSignature(key *ecdsa.PrivateKey, src SignedDataSource) ([]byte, error)
- func ProcessRequestTTL(req TTLContainer, cond ...TTLCondition) error
- func SignRequestData(key *ecdsa.PrivateKey, src RequestSignedData) error
- func SignedDataFromReader(r SignedDataReader) ([]byte, error)
- func VerifyAccumulatedSignatures(src DataWithSignKeySource) error
- func VerifyRequestData(src RequestVerifyData) error
- func VerifySignatureWithKey(key *ecdsa.PublicKey, src DataWithSignature) error
- func VerifySignatures(src SignedDataSource, items ...SignKeyPair) error
- type ACLRulesContainer
- type ACLRulesSource
- type Address
- type AddressContainer
- type BearerToken
- type BearerTokenInfo
- type BearerTokenMsg
- func (*BearerTokenMsg) Descriptor() ([]byte, []int)
- func (m *BearerTokenMsg) GetOwnerKey() []byte
- func (m *BearerTokenMsg) GetSignature() []byte
- func (m *BearerTokenMsg) Marshal() (dAtA []byte, err error)
- func (m *BearerTokenMsg) MarshalTo(dAtA []byte) (int, error)
- func (m *BearerTokenMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BearerTokenMsg) ProtoMessage()
- func (m *BearerTokenMsg) Reset()
- func (m *BearerTokenMsg) SetOwnerKey(v []byte)
- func (m *BearerTokenMsg) SetSignature(v []byte)
- func (m *BearerTokenMsg) Size() (n int)
- func (m *BearerTokenMsg) String() string
- func (m *BearerTokenMsg) Unmarshal(dAtA []byte) error
- func (m *BearerTokenMsg) XXX_DiscardUnknown()
- func (m *BearerTokenMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BearerTokenMsg) XXX_Merge(src proto.Message)
- func (m *BearerTokenMsg) XXX_Size() int
- func (m *BearerTokenMsg) XXX_Unmarshal(b []byte) error
- type BearerTokenMsg_Info
- func (*BearerTokenMsg_Info) Descriptor() ([]byte, []int)
- func (m BearerTokenMsg_Info) ExpirationEpoch() uint64
- func (m *BearerTokenMsg_Info) GetACLRules() []byte
- func (m BearerTokenMsg_Info) GetOwnerID() OwnerID
- func (m *BearerTokenMsg_Info) GetValidUntil() uint64
- func (m *BearerTokenMsg_Info) Marshal() (dAtA []byte, err error)
- func (m *BearerTokenMsg_Info) MarshalTo(dAtA []byte) (int, error)
- func (m *BearerTokenMsg_Info) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BearerTokenMsg_Info) ProtoMessage()
- func (m *BearerTokenMsg_Info) Reset()
- func (m *BearerTokenMsg_Info) SetACLRules(v []byte)
- func (m *BearerTokenMsg_Info) SetExpirationEpoch(v uint64)
- func (m *BearerTokenMsg_Info) SetOwnerID(v OwnerID)
- func (m *BearerTokenMsg_Info) SetValidUntil(v uint64)
- func (m *BearerTokenMsg_Info) Size() (n int)
- func (m *BearerTokenMsg_Info) String() string
- func (m *BearerTokenMsg_Info) Unmarshal(dAtA []byte) error
- func (m *BearerTokenMsg_Info) XXX_DiscardUnknown()
- func (m *BearerTokenMsg_Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BearerTokenMsg_Info) XXX_Merge(src proto.Message)
- func (m *BearerTokenMsg_Info) XXX_Size() int
- func (m *BearerTokenMsg_Info) XXX_Unmarshal(b []byte) error
- type BearerTokenSource
- type CreationEpochContainer
- type CreationEpochSource
- type DataWithSignKeyAccumulator
- type DataWithSignKeySource
- type DataWithSignature
- type EpochContainer
- type EpochSource
- type ExpirationEpochContainer
- type ExpirationEpochSource
- type ExtendedHeader
- type ExtendedHeadersSource
- type LifetimeContainer
- type LifetimeSource
- type NodeRole
- type OwnerID
- type OwnerIDContainer
- type OwnerKeyContainer
- type OwnerKeySource
- type RawContainer
- type RawSource
- type RequestData
- type RequestExtendedHeader
- func (*RequestExtendedHeader) Descriptor() ([]byte, []int)
- func (m RequestExtendedHeader) ExtendedHeaders() []ExtendedHeader
- func (m *RequestExtendedHeader) GetHeaders() []RequestExtendedHeader_KV
- func (m *RequestExtendedHeader) Marshal() (dAtA []byte, err error)
- func (m *RequestExtendedHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *RequestExtendedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RequestExtendedHeader) ProtoMessage()
- func (m *RequestExtendedHeader) Reset()
- func (m *RequestExtendedHeader) SetHeaders(v []RequestExtendedHeader_KV)
- func (m *RequestExtendedHeader) Size() (n int)
- func (m *RequestExtendedHeader) String() string
- func (m *RequestExtendedHeader) Unmarshal(dAtA []byte) error
- func (m *RequestExtendedHeader) XXX_DiscardUnknown()
- func (m *RequestExtendedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RequestExtendedHeader) XXX_Merge(src proto.Message)
- func (m *RequestExtendedHeader) XXX_Size() int
- func (m *RequestExtendedHeader) XXX_Unmarshal(b []byte) error
- type RequestExtendedHeader_KV
- func (*RequestExtendedHeader_KV) Descriptor() ([]byte, []int)
- func (m *RequestExtendedHeader_KV) GetK() string
- func (m *RequestExtendedHeader_KV) GetV() string
- func (m *RequestExtendedHeader_KV) Marshal() (dAtA []byte, err error)
- func (m *RequestExtendedHeader_KV) MarshalTo(dAtA []byte) (int, error)
- func (m *RequestExtendedHeader_KV) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RequestExtendedHeader_KV) ProtoMessage()
- func (m *RequestExtendedHeader_KV) Reset()
- func (m *RequestExtendedHeader_KV) SetK(v string)
- func (m *RequestExtendedHeader_KV) SetV(v string)
- func (m *RequestExtendedHeader_KV) Size() (n int)
- func (m *RequestExtendedHeader_KV) String() string
- func (m *RequestExtendedHeader_KV) Unmarshal(dAtA []byte) error
- func (m *RequestExtendedHeader_KV) XXX_DiscardUnknown()
- func (m *RequestExtendedHeader_KV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RequestExtendedHeader_KV) XXX_Merge(src proto.Message)
- func (m *RequestExtendedHeader_KV) XXX_Size() int
- func (m *RequestExtendedHeader_KV) XXX_Unmarshal(b []byte) error
- type RequestMetaContainer
- type RequestMetaHeader
- func (m *RequestMetaHeader) CutMeta() RequestMetaHeader
- func (*RequestMetaHeader) Descriptor() ([]byte, []int)
- func (m *RequestMetaHeader) GetEpoch() uint64
- func (m *RequestMetaHeader) GetRaw() bool
- func (m *RequestMetaHeader) GetTTL() uint32
- func (m *RequestMetaHeader) GetVersion() uint32
- func (m *RequestMetaHeader) Marshal() (dAtA []byte, err error)
- func (m *RequestMetaHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *RequestMetaHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RequestMetaHeader) ProtoMessage()
- func (m *RequestMetaHeader) Reset()
- func (m *RequestMetaHeader) RestoreMeta(v RequestMetaHeader)
- func (m *RequestMetaHeader) SetEpoch(v uint64)
- func (m *RequestMetaHeader) SetRaw(raw bool)
- func (m *RequestMetaHeader) SetTTL(v uint32)
- func (m *RequestMetaHeader) SetVersion(v uint32)
- func (m *RequestMetaHeader) Size() (n int)
- func (m *RequestMetaHeader) String() string
- func (m *RequestMetaHeader) Unmarshal(dAtA []byte) error
- func (m *RequestMetaHeader) XXX_DiscardUnknown()
- func (m *RequestMetaHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RequestMetaHeader) XXX_Merge(src proto.Message)
- func (m *RequestMetaHeader) XXX_Size() int
- func (m *RequestMetaHeader) XXX_Unmarshal(b []byte) error
- type RequestSignedData
- type RequestVerificationHeader
- func (m *RequestVerificationHeader) AddSignKey(sign []byte, key *ecdsa.PublicKey)
- func (*RequestVerificationHeader) Descriptor() ([]byte, []int)
- func (m *RequestVerificationHeader) GetBearer() *BearerTokenMsg
- func (m RequestVerificationHeader) GetBearerToken() BearerToken
- func (m RequestVerificationHeader) GetSessionToken() SessionToken
- func (m RequestVerificationHeader) GetSignKeyPairs() []SignKeyPair
- func (m *RequestVerificationHeader) GetSignatures() []*RequestVerificationHeader_Signature
- func (m *RequestVerificationHeader) GetToken() *Token
- func (m *RequestVerificationHeader) Marshal() (dAtA []byte, err error)
- func (m *RequestVerificationHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *RequestVerificationHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RequestVerificationHeader) ProtoMessage()
- func (m *RequestVerificationHeader) Reset()
- func (m *RequestVerificationHeader) SetBearer(v *BearerTokenMsg)
- func (m *RequestVerificationHeader) SetSignatures(signatures []*RequestVerificationHeader_Signature)
- func (m *RequestVerificationHeader) SetToken(token *Token)
- func (m *RequestVerificationHeader) Size() (n int)
- func (m *RequestVerificationHeader) String() string
- func (m *RequestVerificationHeader) Unmarshal(dAtA []byte) error
- func (m *RequestVerificationHeader) XXX_DiscardUnknown()
- func (m *RequestVerificationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RequestVerificationHeader) XXX_Merge(src proto.Message)
- func (m *RequestVerificationHeader) XXX_Size() int
- func (m *RequestVerificationHeader) XXX_Unmarshal(b []byte) error
- type RequestVerificationHeader_Signature
- func (*RequestVerificationHeader_Signature) Descriptor() ([]byte, []int)
- func (m *RequestVerificationHeader_Signature) GetPeer() []byte
- func (m RequestVerificationHeader_Signature) GetPublicKey() *ecdsa.PublicKey
- func (m *RequestVerificationHeader_Signature) GetSign() []byte
- func (m RequestVerificationHeader_Signature) GetSignature() []byte
- func (m *RequestVerificationHeader_Signature) Marshal() (dAtA []byte, err error)
- func (m *RequestVerificationHeader_Signature) MarshalTo(dAtA []byte) (int, error)
- func (m *RequestVerificationHeader_Signature) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RequestVerificationHeader_Signature) ProtoMessage()
- func (m *RequestVerificationHeader_Signature) Reset()
- func (m *RequestVerificationHeader_Signature) Size() (n int)
- func (m *RequestVerificationHeader_Signature) String() string
- func (m *RequestVerificationHeader_Signature) Unmarshal(dAtA []byte) error
- func (m *RequestVerificationHeader_Signature) XXX_DiscardUnknown()
- func (m *RequestVerificationHeader_Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RequestVerificationHeader_Signature) XXX_Merge(src proto.Message)
- func (m *RequestVerificationHeader_Signature) XXX_Size() int
- func (m *RequestVerificationHeader_Signature) XXX_Unmarshal(b []byte) error
- type RequestVerifyData
- type ResponseMetaHeader
- func (*ResponseMetaHeader) Descriptor() ([]byte, []int)
- func (m *ResponseMetaHeader) GetEpoch() uint64
- func (m *ResponseMetaHeader) GetVersion() uint32
- func (m *ResponseMetaHeader) Marshal() (dAtA []byte, err error)
- func (m *ResponseMetaHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *ResponseMetaHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ResponseMetaHeader) ProtoMessage()
- func (m *ResponseMetaHeader) Reset()
- func (m *ResponseMetaHeader) SetEpoch(v uint64)
- func (m *ResponseMetaHeader) SetVersion(v uint32)
- func (m *ResponseMetaHeader) Size() (n int)
- func (m *ResponseMetaHeader) String() string
- func (m *ResponseMetaHeader) Unmarshal(dAtA []byte) error
- func (m *ResponseMetaHeader) XXX_DiscardUnknown()
- func (m *ResponseMetaHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResponseMetaHeader) XXX_Merge(src proto.Message)
- func (m *ResponseMetaHeader) XXX_Size() int
- func (m *ResponseMetaHeader) XXX_Unmarshal(b []byte) error
- type SeizedMetaHeaderContainer
- type SeizedRequestMetaContainer
- type SessionKeyContainer
- type SessionKeySource
- type SessionToken
- type SessionTokenInfo
- type SessionTokenSource
- type SignKeyPair
- type SignKeyPairAccumulator
- type SignKeyPairSource
- type SignatureContainer
- type SignatureSource
- type SignedDataReader
- type SignedDataSource
- type TTLCondition
- type TTLContainer
- type TTLSource
- type TestRequest
- func (*TestRequest) Descriptor() ([]byte, []int)
- func (m *TestRequest) GetBytesField() []byte
- func (m *TestRequest) GetIntField() int32
- func (m *TestRequest) GetStringField() string
- func (m *TestRequest) Marshal() (dAtA []byte, err error)
- func (m *TestRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TestRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TestRequest) ProtoMessage()
- func (m *TestRequest) Reset()
- func (m *TestRequest) Size() (n int)
- func (m *TestRequest) String() string
- func (m *TestRequest) Unmarshal(dAtA []byte) error
- func (m *TestRequest) XXX_DiscardUnknown()
- func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TestRequest) XXX_Merge(src proto.Message)
- func (m *TestRequest) XXX_Size() int
- func (m *TestRequest) XXX_Unmarshal(b []byte) error
- type Token
- func (*Token) Descriptor() ([]byte, []int)
- func (m *Token) GetSignature() []byte
- func (m *Token) Marshal() (dAtA []byte, err error)
- func (m *Token) MarshalTo(dAtA []byte) (int, error)
- func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Token) ProtoMessage()
- func (m *Token) Reset()
- func (m *Token) SetSignature(sig []byte)
- func (m *Token) Size() (n int)
- func (m *Token) String() string
- func (m *Token) Unmarshal(dAtA []byte) error
- func (m *Token) XXX_DiscardUnknown()
- func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Token) XXX_Merge(src proto.Message)
- func (m *Token) XXX_Size() int
- func (m *Token) XXX_Unmarshal(b []byte) error
- type TokenID
- type TokenIDContainer
- type TokenIDSource
- type TokenLifetime
- func (m TokenLifetime) CreationEpoch() uint64
- func (*TokenLifetime) Descriptor() ([]byte, []int)
- func (m TokenLifetime) ExpirationEpoch() uint64
- func (m *TokenLifetime) GetCreated() uint64
- func (m *TokenLifetime) GetValidUntil() uint64
- func (m *TokenLifetime) Marshal() (dAtA []byte, err error)
- func (m *TokenLifetime) MarshalTo(dAtA []byte) (int, error)
- func (m *TokenLifetime) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TokenLifetime) ProtoMessage()
- func (m *TokenLifetime) Reset()
- func (m *TokenLifetime) SetCreationEpoch(e uint64)
- func (m *TokenLifetime) SetExpirationEpoch(e uint64)
- func (m *TokenLifetime) Size() (n int)
- func (m *TokenLifetime) String() string
- func (m *TokenLifetime) Unmarshal(dAtA []byte) error
- func (m *TokenLifetime) XXX_DiscardUnknown()
- func (m *TokenLifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TokenLifetime) XXX_Merge(src proto.Message)
- func (m *TokenLifetime) XXX_Size() int
- func (m *TokenLifetime) XXX_Unmarshal(b []byte) error
- type Token_Info
- func (*Token_Info) Descriptor() ([]byte, []int)
- func (m Token_Info) GetAddress() Address
- func (m Token_Info) GetID() TokenID
- func (m Token_Info) GetOwnerID() OwnerID
- func (m *Token_Info) GetOwnerKey() []byte
- func (m *Token_Info) GetSessionKey() []byte
- func (m *Token_Info) GetVerb() Token_Info_Verb
- func (m *Token_Info) Marshal() (dAtA []byte, err error)
- func (m *Token_Info) MarshalTo(dAtA []byte) (int, error)
- func (m *Token_Info) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Token_Info) ProtoMessage()
- func (m *Token_Info) Reset()
- func (m *Token_Info) SetAddress(addr Address)
- func (m *Token_Info) SetID(id TokenID)
- func (m *Token_Info) SetOwnerID(id OwnerID)
- func (m *Token_Info) SetOwnerKey(key []byte)
- func (m *Token_Info) SetSessionKey(key []byte)
- func (m *Token_Info) SetVerb(verb Token_Info_Verb)
- func (m *Token_Info) Size() (n int)
- func (m *Token_Info) String() string
- func (m *Token_Info) Unmarshal(dAtA []byte) error
- func (m *Token_Info) XXX_DiscardUnknown()
- func (m *Token_Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Token_Info) XXX_Merge(src proto.Message)
- func (m *Token_Info) XXX_Size() int
- func (m *Token_Info) XXX_Unmarshal(b []byte) error
- type Token_Info_Verb
- type VerbContainer
- type VerbSource
- type VersionContainer
- type VersionSource
Constants ¶
const ( // ZeroTTL is an upper bound of invalid TTL values. ZeroTTL = iota // NonForwardingTTL is a TTL value that does not imply a request forwarding. NonForwardingTTL // SingleForwardingTTL is a TTL value that imply potential forwarding with NonForwardingTTL. SingleForwardingTTL )
TTL constants.
const ErrCannotFindOwner = internal.Error("cannot find owner public key")
ErrCannotFindOwner is raised when signatures empty in GetOwner.
const ErrEmptyDataWithSignature = internal.Error("empty data with signature")
ErrEmptyDataWithSignature is returned by functions that expect a non-nil DataWithSignature, but received nil.
const ErrInvalidPublicKeyBytes = internal.Error("cannot load public key")
ErrInvalidPublicKeyBytes means that the public key could not be unmarshaled.
const ErrInvalidTTL = internal.Error("invalid TTL value")
ErrInvalidTTL means that the TTL value does not satisfy a specific criterion.
const ErrNegativeLength = internal.Error("negative slice length")
ErrNegativeLength is returned by functions that received negative length for slice allocation.
const ErrNilRequestSignedData = internal.Error("request signed data is nil")
ErrNilRequestSignedData is returned by functions that expect a non-nil RequestSignedData, but received nil.
const ErrNilRequestVerifyData = internal.Error("request verification data is nil")
ErrNilRequestVerifyData is returned by functions that expect a non-nil RequestVerifyData, but received nil.
const ErrNilSignKeyPairAccumulator = internal.Error("signature-key pair accumulator is nil")
ErrNilSignKeyPairAccumulator is returned by functions that expect a non-nil SignKeyPairAccumulator, but received nil.
const ErrNilSignatureKeySource = internal.Error("empty key-signature source")
ErrNilSignatureKeySource is returned by functions that expect a non-nil SignatureKeySource, but received nil.
const ErrNilSignedDataReader = internal.Error("signed data reader is nil")
ErrNilSignedDataReader is returned by functions that expect a non-nil SignedDataReader, but received nil.
const ErrNilSignedDataSource = internal.Error("signed data source is nil")
ErrNilSignedDataSource returned by functions that expect a non-nil SignedDataSource, but received nil.
const ErrNilToken = internal.Error("token is nil")
ErrNilToken is returned by functions that expect a non-nil token argument, but received nil.
const ErrWrongOwner = internal.Error("wrong owner")
ErrWrongOwner is raised when passed OwnerID not equal to present PublicKey
Variables ¶
var ( ErrInvalidLengthMeta = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMeta = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMeta = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthVerify = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVerify = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupVerify = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthVerifyTest = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVerifyTest = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupVerifyTest = fmt.Errorf("proto: unexpected end of group") )
var Token_Info_Verb_name = map[int32]string{
0: "Put",
1: "Get",
2: "Head",
3: "Search",
4: "Delete",
5: "Range",
6: "RangeHash",
}
var Token_Info_Verb_value = map[string]int32{
"Put": 0,
"Get": 1,
"Head": 2,
"Search": 3,
"Delete": 4,
"Range": 5,
"RangeHash": 6,
}
Functions ¶
func AddSignatureWithKey ¶ added in v0.7.4
func AddSignatureWithKey(key *ecdsa.PrivateKey, v DataWithSignKeyAccumulator) error
AddSignatureWithKey calculates the data signature and adds it to accumulator with public key.
Any change of data provoke signature breakdown.
Returns signing errors only.
func DataSignature ¶ added in v0.7.4
func DataSignature(key *ecdsa.PrivateKey, src SignedDataSource) ([]byte, error)
DataSignature returns the signature of data obtained using the private key.
If passed data container is nil, ErrNilSignedDataSource returns. If passed private key is nil, crypto.ErrEmptyPrivateKey returns. If the data container or the signature function returns an error, it is returned directly.
func ProcessRequestTTL ¶
func ProcessRequestTTL(req TTLContainer, cond ...TTLCondition) error
ProcessRequestTTL validates and updates requests with TTL.
func SignRequestData ¶ added in v1.1.0
func SignRequestData(key *ecdsa.PrivateKey, src RequestSignedData) error
SignRequestData calculates request data signature and adds it to accumulator.
Any change of request data provoke signature breakdown.
If passed private key is nil, crypto.ErrEmptyPrivateKey returns. If passed RequestSignedData is nil, ErrNilRequestSignedData returns.
func SignedDataFromReader ¶ added in v0.7.4
func SignedDataFromReader(r SignedDataReader) ([]byte, error)
SignedDataFromReader allocates buffer and reads bytes from passed reader to it.
If passed SignedDataReader is nil, ErrNilSignedDataReader returns.
func VerifyAccumulatedSignatures ¶ added in v0.7.4
func VerifyAccumulatedSignatures(src DataWithSignKeySource) error
VerifyAccumulatedSignatures checks if accumulated key-signature pairs are valid.
Behaves like VerifySignatures. If passed key-signature source is empty, ErrNilSignatureKeySource returns.
func VerifyRequestData ¶ added in v1.1.0
func VerifyRequestData(src RequestVerifyData) error
VerifyRequestData checks if accumulated key-signature pairs of data with token are valid.
If passed RequestVerifyData is nil, ErrNilRequestVerifyData returns.
func VerifySignatureWithKey ¶ added in v0.7.4
func VerifySignatureWithKey(key *ecdsa.PublicKey, src DataWithSignature) error
VerifySignatureWithKey checks data signature from the passed container with passed key.
If passed data with signature is nil, ErrEmptyDataWithSignature returns. If passed key is nil, crypto.ErrEmptyPublicKey returns. A non-nil error returns if and only if the signature does not pass verification.
func VerifySignatures ¶ added in v0.7.4
func VerifySignatures(src SignedDataSource, items ...SignKeyPair) error
VerifySignatures checks passed key-signature pairs for data from the passed container.
If passed data source is nil, ErrNilSignedDataSource returns. If check data is not ready, corresponding error returns. If at least one of the pairs is invalid, an error returns.
Types ¶
type ACLRulesContainer ¶ added in v1.1.0
type ACLRulesContainer interface {
ACLRulesSource
SetACLRules([]byte)
}
ACLRulesContainer is an interface of the container of binary extended ACL rules.
type ACLRulesSource ¶ added in v1.1.0
type ACLRulesSource interface {
GetACLRules() []byte
}
ACLRulesSource is an interface of the container of binary extended ACL rules with read access.
type AddressContainer ¶ added in v0.7.4
type AddressContainer = refs.AddressContainer
AddressContainer is a type alias of refs.AddressContainer.
type BearerToken ¶ added in v1.1.0
type BearerToken interface {
BearerTokenInfo
OwnerKeyContainer
SignatureContainer
}
BearerToken is an interface of Bearer token information and key-signature pair.
type BearerTokenInfo ¶ added in v1.1.0
type BearerTokenInfo interface {
ACLRulesContainer
ExpirationEpochContainer
OwnerIDContainer
}
BearerTokenInfo is an interface of a fixed set of Bearer token information value containers. Contains: - binary extended ACL rules; - expiration epoch number; - ID of the token's owner.
type BearerTokenMsg ¶ added in v1.1.0
type BearerTokenMsg struct {
// TokenInfo is a grouped information about token
BearerTokenMsg_Info `protobuf:"bytes,1,opt,name=TokenInfo,proto3,embedded=TokenInfo" json:"TokenInfo"`
// OwnerKey is a public key of the token owner
OwnerKey []byte `protobuf:"bytes,2,opt,name=OwnerKey,proto3" json:"OwnerKey,omitempty"`
// Signature is a signature of token information
Signature []byte `protobuf:"bytes,3,opt,name=Signature,proto3" json:"Signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
BearerTokenMsg carries information about request ACL rules with limited lifetime
func (*BearerTokenMsg) Descriptor ¶ added in v1.1.0
func (*BearerTokenMsg) Descriptor() ([]byte, []int)
func (*BearerTokenMsg) GetOwnerKey ¶ added in v1.1.0
func (m *BearerTokenMsg) GetOwnerKey() []byte
func (*BearerTokenMsg) GetSignature ¶ added in v1.1.0
func (m *BearerTokenMsg) GetSignature() []byte
func (*BearerTokenMsg) Marshal ¶ added in v1.1.0
func (m *BearerTokenMsg) Marshal() (dAtA []byte, err error)
func (*BearerTokenMsg) MarshalTo ¶ added in v1.1.0
func (m *BearerTokenMsg) MarshalTo(dAtA []byte) (int, error)
func (*BearerTokenMsg) MarshalToSizedBuffer ¶ added in v1.1.0
func (m *BearerTokenMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BearerTokenMsg) ProtoMessage ¶ added in v1.1.0
func (*BearerTokenMsg) ProtoMessage()
func (*BearerTokenMsg) Reset ¶ added in v1.1.0
func (m *BearerTokenMsg) Reset()
func (*BearerTokenMsg) SetOwnerKey ¶ added in v1.1.0
func (m *BearerTokenMsg) SetOwnerKey(v []byte)
SetOwnerKey is an OwnerKey field setter.
func (*BearerTokenMsg) SetSignature ¶ added in v1.1.0
func (m *BearerTokenMsg) SetSignature(v []byte)
SetSignature is a Signature field setter.
func (*BearerTokenMsg) Size ¶ added in v1.1.0
func (m *BearerTokenMsg) Size() (n int)
func (*BearerTokenMsg) String ¶ added in v1.1.0
func (m *BearerTokenMsg) String() string
func (*BearerTokenMsg) Unmarshal ¶ added in v1.1.0
func (m *BearerTokenMsg) Unmarshal(dAtA []byte) error
func (*BearerTokenMsg) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *BearerTokenMsg) XXX_DiscardUnknown()
func (*BearerTokenMsg) XXX_Marshal ¶ added in v1.1.0
func (m *BearerTokenMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BearerTokenMsg) XXX_Merge ¶ added in v1.1.0
func (m *BearerTokenMsg) XXX_Merge(src proto.Message)
func (*BearerTokenMsg) XXX_Size ¶ added in v1.1.0
func (m *BearerTokenMsg) XXX_Size() int
func (*BearerTokenMsg) XXX_Unmarshal ¶ added in v1.1.0
func (m *BearerTokenMsg) XXX_Unmarshal(b []byte) error
type BearerTokenMsg_Info ¶ added in v1.1.0
type BearerTokenMsg_Info struct {
// ACLRules carries a binary representation of the table of extended ACL rules
ACLRules []byte `protobuf:"bytes,1,opt,name=ACLRules,proto3" json:"ACLRules,omitempty"`
// OwnerID is an owner of token
OwnerID OwnerID `protobuf:"bytes,2,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
// ValidUntil carries a last epoch of token lifetime
ValidUntil uint64 `protobuf:"varint,3,opt,name=ValidUntil,proto3" json:"ValidUntil,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*BearerTokenMsg_Info) Descriptor ¶ added in v1.1.0
func (*BearerTokenMsg_Info) Descriptor() ([]byte, []int)
func (BearerTokenMsg_Info) ExpirationEpoch ¶ added in v1.1.0
func (m BearerTokenMsg_Info) ExpirationEpoch() uint64
ExpirationEpoch returns the result of ValidUntil field getter.
func (*BearerTokenMsg_Info) GetACLRules ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) GetACLRules() []byte
func (BearerTokenMsg_Info) GetOwnerID ¶ added in v1.1.0
func (m BearerTokenMsg_Info) GetOwnerID() OwnerID
GetOwnerID if an OwnerID field getter.
func (*BearerTokenMsg_Info) GetValidUntil ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) GetValidUntil() uint64
func (*BearerTokenMsg_Info) Marshal ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) Marshal() (dAtA []byte, err error)
func (*BearerTokenMsg_Info) MarshalTo ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) MarshalTo(dAtA []byte) (int, error)
func (*BearerTokenMsg_Info) MarshalToSizedBuffer ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BearerTokenMsg_Info) ProtoMessage ¶ added in v1.1.0
func (*BearerTokenMsg_Info) ProtoMessage()
func (*BearerTokenMsg_Info) Reset ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) Reset()
func (*BearerTokenMsg_Info) SetACLRules ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) SetACLRules(v []byte)
SetACLRules is an ACLRules field setter.
func (*BearerTokenMsg_Info) SetExpirationEpoch ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) SetExpirationEpoch(v uint64)
SetExpirationEpoch passes argument to ValidUntil field setter.
func (*BearerTokenMsg_Info) SetOwnerID ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) SetOwnerID(v OwnerID)
SetOwnerID is an OwnerID field setter.
func (*BearerTokenMsg_Info) SetValidUntil ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) SetValidUntil(v uint64)
SetValidUntil is a ValidUntil field setter.
func (*BearerTokenMsg_Info) Size ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) Size() (n int)
func (*BearerTokenMsg_Info) String ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) String() string
func (*BearerTokenMsg_Info) Unmarshal ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) Unmarshal(dAtA []byte) error
func (*BearerTokenMsg_Info) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) XXX_DiscardUnknown()
func (*BearerTokenMsg_Info) XXX_Marshal ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BearerTokenMsg_Info) XXX_Merge ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) XXX_Merge(src proto.Message)
func (*BearerTokenMsg_Info) XXX_Size ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) XXX_Size() int
func (*BearerTokenMsg_Info) XXX_Unmarshal ¶ added in v1.1.0
func (m *BearerTokenMsg_Info) XXX_Unmarshal(b []byte) error
type BearerTokenSource ¶ added in v1.1.0
type BearerTokenSource interface {
GetBearerToken() BearerToken
}
BearerTokenSource is an interface of the container of a BearerToken with read access.
type CreationEpochContainer ¶ added in v0.7.4
type CreationEpochContainer interface {
CreationEpochSource
SetCreationEpoch(uint64)
}
CreationEpochContainer is an interface of the container of a creation epoch number.
type CreationEpochSource ¶ added in v0.7.4
type CreationEpochSource interface {
CreationEpoch() uint64
}
CreationEpochSource is an interface of the container of a creation epoch number with read access.
type DataWithSignKeyAccumulator ¶ added in v0.7.4
type DataWithSignKeyAccumulator interface {
SignedDataSource
SignKeyPairAccumulator
}
DataWithSignKeyAccumulator is an interface of data and key-signature accumulator pair.
func GroupSignedPayloads ¶ added in v1.1.0
func GroupSignedPayloads(acc SignKeyPairAccumulator, sources ...SignedDataSource) (DataWithSignKeyAccumulator, error)
GroupSignedPayloads groups SignKeyPairAccumulator and SignedDataSource list to DataWithSignKeyAccumulator.
If passed SignKeyPairAccumulator is nil, ErrNilSignKeyPairAccumulator returns.
Signed payload of the result is a concatenation of payloads of list elements keeping order. Nil elements in list are ignored.
If all elements implement SignedDataReader, result implements it too.
func NewSignedBearerToken ¶ added in v1.1.0
func NewSignedBearerToken(token BearerToken) DataWithSignKeyAccumulator
NewSignedBearerToken wraps passed BearerToken in a component suitable for signing.
Result can be used in AddSignatureWithKey function.
func NewSignedSessionToken ¶ added in v0.7.5
func NewSignedSessionToken(token SessionToken) DataWithSignKeyAccumulator
NewSignedSessionToken wraps passed SessionToken in a component suitable for signing.
Result can be used in AddSignatureWithKey function.
type DataWithSignKeySource ¶ added in v0.7.4
type DataWithSignKeySource interface {
SignedDataSource
SignKeyPairSource
}
DataWithSignKeySource is an interface of data and key-signature source pair.
func GroupVerifyPayloads ¶ added in v1.1.0
func GroupVerifyPayloads(src SignKeyPairSource, sources ...SignedDataSource) (DataWithSignKeySource, error)
GroupVerifyPayloads groups SignKeyPairSource and SignedDataSource list to DataWithSignKeySource.
If passed SignKeyPairSource is nil, ErrNilSignatureKeySource returns.
Signed payload of the result is a concatenation of payloads of list elements keeping order. Nil elements in list are ignored.
If all elements implement SignedDataReader, result implements it too.
type DataWithSignature ¶ added in v0.7.4
type DataWithSignature interface {
SignedDataSource
SignatureSource
}
DataWithSignature is an interface of data-signature pair with read access.
func NewVerifiedBearerToken ¶ added in v1.1.0
func NewVerifiedBearerToken(token BearerToken) DataWithSignature
NewVerifiedBearerToken wraps passed SessionToken in a component suitable for signature verification.
Result can be used in VerifySignatureWithKey function.
func NewVerifiedSessionToken ¶ added in v0.7.5
func NewVerifiedSessionToken(token SessionToken) DataWithSignature
NewVerifiedSessionToken wraps passed SessionToken in a component suitable for signature verification.
Result can be used in VerifySignatureWithKey function.
type EpochContainer ¶ added in v0.7.4
type EpochContainer interface {
EpochSource
SetEpoch(uint64)
}
EpochContainer is an interface of the container of a NeoFS epoch number.
type EpochSource ¶ added in v0.7.4
type EpochSource interface {
GetEpoch() uint64
}
EpochSource is an interface of the container of a NeoFS epoch number with read access.
type ExpirationEpochContainer ¶ added in v0.7.4
type ExpirationEpochContainer interface {
ExpirationEpochSource
SetExpirationEpoch(uint64)
}
ExpirationEpochContainer is an interface of the container of an expiration epoch number.
type ExpirationEpochSource ¶ added in v0.7.4
type ExpirationEpochSource interface {
ExpirationEpoch() uint64
}
ExpirationEpochSource is an interface of the container of an expiration epoch number with read access.
type ExtendedHeader ¶ added in v1.1.0
ExtendedHeader is an interface of string key-value pair with read access.
type ExtendedHeadersSource ¶ added in v1.1.0
type ExtendedHeadersSource interface {
ExtendedHeaders() []ExtendedHeader
}
ExtendedHeadersSource is an interface of ExtendedHeader list with read access.
type LifetimeContainer ¶ added in v0.7.4
type LifetimeContainer interface {
CreationEpochContainer
ExpirationEpochContainer
}
LifetimeContainer is an interface of the container of creation-expiration epoch pair.
type LifetimeSource ¶ added in v0.7.4
type LifetimeSource interface {
CreationEpochSource
ExpirationEpochSource
}
LifetimeSource is an interface of the container of creation-expiration epoch pair with read access.
type NodeRole ¶
type NodeRole int32
NodeRole to identify in Bootstrap service.
const ( // InnerRingNode that work like IR node. InnerRingNode NodeRole // StorageNode that work like a storage node. StorageNode )
type OwnerIDContainer ¶ added in v0.7.4
type OwnerIDContainer = refs.OwnerIDContainer
OwnerIDContainer is a type alias of refs.OwnerIDContainer.
type OwnerKeyContainer ¶ added in v0.7.5
type OwnerKeyContainer interface {
OwnerKeySource
SetOwnerKey([]byte)
}
OwnerKeyContainer is an interface of the container of owner key bytes.
type OwnerKeySource ¶ added in v0.7.5
type OwnerKeySource interface {
GetOwnerKey() []byte
}
OwnerKeySource is an interface of the container of owner key bytes with read access.
type RawContainer ¶ added in v0.7.4
RawContainer is an interface of the container of a boolean Raw value.
type RawSource ¶ added in v0.7.4
type RawSource interface {
GetRaw() bool
}
RawSource is an interface of the container of a boolean Raw value with read access.
type RequestData ¶ added in v1.1.0
type RequestData interface {
SignedDataSource
SessionTokenSource
BearerTokenSource
ExtendedHeadersSource
}
RequestData is an interface of the request information with read access.
type RequestExtendedHeader ¶ added in v1.1.0
type RequestExtendedHeader struct {
// Headers carries list of key-value headers
Headers []RequestExtendedHeader_KV `protobuf:"bytes,1,rep,name=Headers,proto3" json:"Headers"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
RequestExtendedHeader contains extended headers of request
func (*RequestExtendedHeader) Descriptor ¶ added in v1.1.0
func (*RequestExtendedHeader) Descriptor() ([]byte, []int)
func (RequestExtendedHeader) ExtendedHeaders ¶ added in v1.1.0
func (m RequestExtendedHeader) ExtendedHeaders() []ExtendedHeader
ExtendedHeaders composes ExtendedHeader list from the Headers field getter result.
func (*RequestExtendedHeader) GetHeaders ¶ added in v1.1.0
func (m *RequestExtendedHeader) GetHeaders() []RequestExtendedHeader_KV
func (*RequestExtendedHeader) Marshal ¶ added in v1.1.0
func (m *RequestExtendedHeader) Marshal() (dAtA []byte, err error)
func (*RequestExtendedHeader) MarshalTo ¶ added in v1.1.0
func (m *RequestExtendedHeader) MarshalTo(dAtA []byte) (int, error)
func (*RequestExtendedHeader) MarshalToSizedBuffer ¶ added in v1.1.0
func (m *RequestExtendedHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RequestExtendedHeader) ProtoMessage ¶ added in v1.1.0
func (*RequestExtendedHeader) ProtoMessage()
func (*RequestExtendedHeader) Reset ¶ added in v1.1.0
func (m *RequestExtendedHeader) Reset()
func (*RequestExtendedHeader) SetHeaders ¶ added in v1.1.0
func (m *RequestExtendedHeader) SetHeaders(v []RequestExtendedHeader_KV)
SetHeaders is a Headers field setter.
func (*RequestExtendedHeader) Size ¶ added in v1.1.0
func (m *RequestExtendedHeader) Size() (n int)
func (*RequestExtendedHeader) String ¶ added in v1.1.0
func (m *RequestExtendedHeader) String() string
func (*RequestExtendedHeader) Unmarshal ¶ added in v1.1.0
func (m *RequestExtendedHeader) Unmarshal(dAtA []byte) error
func (*RequestExtendedHeader) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *RequestExtendedHeader) XXX_DiscardUnknown()
func (*RequestExtendedHeader) XXX_Marshal ¶ added in v1.1.0
func (m *RequestExtendedHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestExtendedHeader) XXX_Merge ¶ added in v1.1.0
func (m *RequestExtendedHeader) XXX_Merge(src proto.Message)
func (*RequestExtendedHeader) XXX_Size ¶ added in v1.1.0
func (m *RequestExtendedHeader) XXX_Size() int
func (*RequestExtendedHeader) XXX_Unmarshal ¶ added in v1.1.0
func (m *RequestExtendedHeader) XXX_Unmarshal(b []byte) error
type RequestExtendedHeader_KV ¶ added in v1.1.0
type RequestExtendedHeader_KV struct {
// K carries extended header key
K string `protobuf:"bytes,1,opt,name=K,proto3" json:"K,omitempty"`
// V carries extended header value
V string `protobuf:"bytes,2,opt,name=V,proto3" json:"V,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
KV contains string key-value pair
func (*RequestExtendedHeader_KV) Descriptor ¶ added in v1.1.0
func (*RequestExtendedHeader_KV) Descriptor() ([]byte, []int)
func (*RequestExtendedHeader_KV) GetK ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) GetK() string
func (*RequestExtendedHeader_KV) GetV ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) GetV() string
func (*RequestExtendedHeader_KV) Marshal ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) Marshal() (dAtA []byte, err error)
func (*RequestExtendedHeader_KV) MarshalTo ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) MarshalTo(dAtA []byte) (int, error)
func (*RequestExtendedHeader_KV) MarshalToSizedBuffer ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RequestExtendedHeader_KV) ProtoMessage ¶ added in v1.1.0
func (*RequestExtendedHeader_KV) ProtoMessage()
func (*RequestExtendedHeader_KV) Reset ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) Reset()
func (*RequestExtendedHeader_KV) SetK ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) SetK(v string)
SetK is a K field setter.
func (*RequestExtendedHeader_KV) SetV ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) SetV(v string)
SetV is a V field setter.
func (*RequestExtendedHeader_KV) Size ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) Size() (n int)
func (*RequestExtendedHeader_KV) String ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) String() string
func (*RequestExtendedHeader_KV) Unmarshal ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) Unmarshal(dAtA []byte) error
func (*RequestExtendedHeader_KV) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) XXX_DiscardUnknown()
func (*RequestExtendedHeader_KV) XXX_Marshal ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestExtendedHeader_KV) XXX_Merge ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) XXX_Merge(src proto.Message)
func (*RequestExtendedHeader_KV) XXX_Size ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) XXX_Size() int
func (*RequestExtendedHeader_KV) XXX_Unmarshal ¶ added in v1.1.0
func (m *RequestExtendedHeader_KV) XXX_Unmarshal(b []byte) error
type RequestMetaContainer ¶ added in v0.7.4
type RequestMetaContainer interface {
TTLContainer
EpochContainer
VersionContainer
RawContainer
}
RequestMetaContainer is an interface of a fixed set of request meta value containers. Contains: - TTL value; - NeoFS epoch number; - Protocol version; - Raw toggle option.
type RequestMetaHeader ¶
type RequestMetaHeader struct {
// TTL must be larger than zero, it decreased in every NeoFS Node
TTL uint32 `protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"`
// Epoch for user can be empty, because node sets epoch to the actual value
Epoch uint64 `protobuf:"varint,2,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
// Version defines protocol version
// TODO: not used for now, should be implemented in future
Version uint32 `protobuf:"varint,3,opt,name=Version,proto3" json:"Version,omitempty"`
// Raw determines whether the request is raw or not
Raw bool `protobuf:"varint,4,opt,name=Raw,proto3" json:"Raw,omitempty"`
// ExtendedHeader carries extended headers of the request
RequestExtendedHeader `protobuf:"bytes,5,opt,name=ExtendedHeader,proto3,embedded=ExtendedHeader" json:"ExtendedHeader"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
RequestMetaHeader contains information about request meta headers (should be embedded into message)
func (*RequestMetaHeader) CutMeta ¶ added in v0.7.4
func (m *RequestMetaHeader) CutMeta() RequestMetaHeader
CutMeta returns current value and sets RequestMetaHeader to empty value.
func (*RequestMetaHeader) Descriptor ¶
func (*RequestMetaHeader) Descriptor() ([]byte, []int)
func (*RequestMetaHeader) GetEpoch ¶
func (m *RequestMetaHeader) GetEpoch() uint64
func (*RequestMetaHeader) GetRaw ¶ added in v0.7.4
func (m *RequestMetaHeader) GetRaw() bool
func (*RequestMetaHeader) GetTTL ¶
func (m *RequestMetaHeader) GetTTL() uint32
func (*RequestMetaHeader) GetVersion ¶
func (m *RequestMetaHeader) GetVersion() uint32
func (*RequestMetaHeader) Marshal ¶
func (m *RequestMetaHeader) Marshal() (dAtA []byte, err error)
func (*RequestMetaHeader) MarshalTo ¶
func (m *RequestMetaHeader) MarshalTo(dAtA []byte) (int, error)
func (*RequestMetaHeader) MarshalToSizedBuffer ¶
func (m *RequestMetaHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RequestMetaHeader) ProtoMessage ¶
func (*RequestMetaHeader) ProtoMessage()
func (*RequestMetaHeader) Reset ¶
func (m *RequestMetaHeader) Reset()
func (*RequestMetaHeader) RestoreMeta ¶
func (m *RequestMetaHeader) RestoreMeta(v RequestMetaHeader)
RestoreMeta sets current RequestMetaHeader to passed value.
func (*RequestMetaHeader) SetEpoch ¶
func (m *RequestMetaHeader) SetEpoch(v uint64)
SetEpoch is an Epoch field setter.
func (*RequestMetaHeader) SetRaw ¶ added in v0.7.4
func (m *RequestMetaHeader) SetRaw(raw bool)
SetRaw is a Raw field setter.
func (*RequestMetaHeader) SetTTL ¶
func (m *RequestMetaHeader) SetTTL(v uint32)
SetTTL is a TTL field setter.
func (*RequestMetaHeader) SetVersion ¶
func (m *RequestMetaHeader) SetVersion(v uint32)
SetVersion is a Version field setter.
func (*RequestMetaHeader) Size ¶
func (m *RequestMetaHeader) Size() (n int)
func (*RequestMetaHeader) String ¶
func (m *RequestMetaHeader) String() string
func (*RequestMetaHeader) Unmarshal ¶
func (m *RequestMetaHeader) Unmarshal(dAtA []byte) error
func (*RequestMetaHeader) XXX_DiscardUnknown ¶
func (m *RequestMetaHeader) XXX_DiscardUnknown()
func (*RequestMetaHeader) XXX_Marshal ¶
func (m *RequestMetaHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestMetaHeader) XXX_Merge ¶
func (m *RequestMetaHeader) XXX_Merge(src proto.Message)
func (*RequestMetaHeader) XXX_Size ¶
func (m *RequestMetaHeader) XXX_Size() int
func (*RequestMetaHeader) XXX_Unmarshal ¶
func (m *RequestMetaHeader) XXX_Unmarshal(b []byte) error
type RequestSignedData ¶ added in v1.1.0
type RequestSignedData interface {
RequestData
SignKeyPairAccumulator
SignKeyPairSource
}
RequestSignedData is an interface of request information with signature write access.
type RequestVerificationHeader ¶
type RequestVerificationHeader struct {
// Signatures is a set of signatures of every passed NeoFS Node
Signatures []*RequestVerificationHeader_Signature `protobuf:"bytes,1,rep,name=Signatures,proto3" json:"Signatures,omitempty"`
// Token is a token of the session within which the request is sent
Token *Token `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"`
// Bearer is a Bearer token of the request
Bearer *BearerTokenMsg `protobuf:"bytes,3,opt,name=Bearer,proto3" json:"Bearer,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message).
func (*RequestVerificationHeader) AddSignKey ¶ added in v0.7.4
func (m *RequestVerificationHeader) AddSignKey(sign []byte, key *ecdsa.PublicKey)
AddSignKey adds new element to Signatures field.
Sets Sign field to passed sign. Set Peer field to marshaled passed key.
func (*RequestVerificationHeader) Descriptor ¶
func (*RequestVerificationHeader) Descriptor() ([]byte, []int)
func (*RequestVerificationHeader) GetBearer ¶ added in v1.1.0
func (m *RequestVerificationHeader) GetBearer() *BearerTokenMsg
func (RequestVerificationHeader) GetBearerToken ¶ added in v1.1.0
func (m RequestVerificationHeader) GetBearerToken() BearerToken
GetBearerToken wraps Bearer field and return BearerToken interface.
If Bearer field value is nil, nil returns.
func (RequestVerificationHeader) GetSessionToken ¶ added in v0.7.4
func (m RequestVerificationHeader) GetSessionToken() SessionToken
GetSessionToken returns SessionToken interface of Token field.
If token field value is nil, nil returns.
func (RequestVerificationHeader) GetSignKeyPairs ¶ added in v0.7.4
func (m RequestVerificationHeader) GetSignKeyPairs() []SignKeyPair
GetSignKeyPairs returns the elements of Signatures field as SignKeyPair slice.
func (*RequestVerificationHeader) GetSignatures ¶
func (m *RequestVerificationHeader) GetSignatures() []*RequestVerificationHeader_Signature
func (*RequestVerificationHeader) GetToken ¶ added in v0.7.4
func (m *RequestVerificationHeader) GetToken() *Token
func (*RequestVerificationHeader) Marshal ¶
func (m *RequestVerificationHeader) Marshal() (dAtA []byte, err error)
func (*RequestVerificationHeader) MarshalTo ¶
func (m *RequestVerificationHeader) MarshalTo(dAtA []byte) (int, error)
func (*RequestVerificationHeader) MarshalToSizedBuffer ¶
func (m *RequestVerificationHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RequestVerificationHeader) ProtoMessage ¶
func (*RequestVerificationHeader) ProtoMessage()
func (*RequestVerificationHeader) Reset ¶
func (m *RequestVerificationHeader) Reset()
func (*RequestVerificationHeader) SetBearer ¶ added in v1.1.0
func (m *RequestVerificationHeader) SetBearer(v *BearerTokenMsg)
SetBearer is a Bearer field setter.
func (*RequestVerificationHeader) SetSignatures ¶
func (m *RequestVerificationHeader) SetSignatures(signatures []*RequestVerificationHeader_Signature)
SetSignatures replaces signatures stored in RequestVerificationHeader.
func (*RequestVerificationHeader) SetToken ¶ added in v0.7.4
func (m *RequestVerificationHeader) SetToken(token *Token)
SetToken is a Token field setter.
func (*RequestVerificationHeader) Size ¶
func (m *RequestVerificationHeader) Size() (n int)
func (*RequestVerificationHeader) String ¶
func (m *RequestVerificationHeader) String() string
func (*RequestVerificationHeader) Unmarshal ¶
func (m *RequestVerificationHeader) Unmarshal(dAtA []byte) error
func (*RequestVerificationHeader) XXX_DiscardUnknown ¶
func (m *RequestVerificationHeader) XXX_DiscardUnknown()
func (*RequestVerificationHeader) XXX_Marshal ¶
func (m *RequestVerificationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestVerificationHeader) XXX_Merge ¶
func (m *RequestVerificationHeader) XXX_Merge(src proto.Message)
func (*RequestVerificationHeader) XXX_Size ¶
func (m *RequestVerificationHeader) XXX_Size() int
func (*RequestVerificationHeader) XXX_Unmarshal ¶
func (m *RequestVerificationHeader) XXX_Unmarshal(b []byte) error
type RequestVerificationHeader_Signature ¶
type RequestVerificationHeader_Signature struct {
// Sign is signature of the request or session key.
Sign []byte `protobuf:"bytes,1,opt,name=Sign,proto3" json:"Sign,omitempty"`
// Peer is compressed public key used for signature.
Peer []byte `protobuf:"bytes,2,opt,name=Peer,proto3" json:"Peer,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*RequestVerificationHeader_Signature) Descriptor ¶
func (*RequestVerificationHeader_Signature) Descriptor() ([]byte, []int)
func (*RequestVerificationHeader_Signature) GetPeer ¶ added in v0.7.4
func (m *RequestVerificationHeader_Signature) GetPeer() []byte
func (RequestVerificationHeader_Signature) GetPublicKey ¶ added in v0.7.4
func (m RequestVerificationHeader_Signature) GetPublicKey() *ecdsa.PublicKey
GetPublicKey unmarshals and returns the result of a Peer field getter.
func (*RequestVerificationHeader_Signature) GetSign ¶ added in v0.7.4
func (m *RequestVerificationHeader_Signature) GetSign() []byte
func (RequestVerificationHeader_Signature) GetSignature ¶ added in v0.7.4
func (m RequestVerificationHeader_Signature) GetSignature() []byte
GetSignature returns the result of a Sign field getter.
func (*RequestVerificationHeader_Signature) Marshal ¶
func (m *RequestVerificationHeader_Signature) Marshal() (dAtA []byte, err error)
func (*RequestVerificationHeader_Signature) MarshalTo ¶
func (m *RequestVerificationHeader_Signature) MarshalTo(dAtA []byte) (int, error)
func (*RequestVerificationHeader_Signature) MarshalToSizedBuffer ¶
func (m *RequestVerificationHeader_Signature) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RequestVerificationHeader_Signature) ProtoMessage ¶
func (*RequestVerificationHeader_Signature) ProtoMessage()
func (*RequestVerificationHeader_Signature) Reset ¶
func (m *RequestVerificationHeader_Signature) Reset()
func (*RequestVerificationHeader_Signature) Size ¶
func (m *RequestVerificationHeader_Signature) Size() (n int)
func (*RequestVerificationHeader_Signature) String ¶
func (m *RequestVerificationHeader_Signature) String() string
func (*RequestVerificationHeader_Signature) Unmarshal ¶
func (m *RequestVerificationHeader_Signature) Unmarshal(dAtA []byte) error
func (*RequestVerificationHeader_Signature) XXX_DiscardUnknown ¶
func (m *RequestVerificationHeader_Signature) XXX_DiscardUnknown()
func (*RequestVerificationHeader_Signature) XXX_Marshal ¶
func (m *RequestVerificationHeader_Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestVerificationHeader_Signature) XXX_Merge ¶
func (m *RequestVerificationHeader_Signature) XXX_Merge(src proto.Message)
func (*RequestVerificationHeader_Signature) XXX_Size ¶
func (m *RequestVerificationHeader_Signature) XXX_Size() int
func (*RequestVerificationHeader_Signature) XXX_Unmarshal ¶
func (m *RequestVerificationHeader_Signature) XXX_Unmarshal(b []byte) error
type RequestVerifyData ¶ added in v1.1.0
type RequestVerifyData interface {
RequestData
SignKeyPairSource
}
RequestVerifyData is an interface of request information with signature read access.
type ResponseMetaHeader ¶
type ResponseMetaHeader struct {
// Current NeoFS epoch on server
Epoch uint64 `protobuf:"varint,1,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
// Version defines protocol version
// TODO: not used for now, should be implemented in future
Version uint32 `protobuf:"varint,2,opt,name=Version,proto3" json:"Version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
ResponseMetaHeader contains meta information based on request processing by server (should be embedded into message)
func (*ResponseMetaHeader) Descriptor ¶
func (*ResponseMetaHeader) Descriptor() ([]byte, []int)
func (*ResponseMetaHeader) GetEpoch ¶
func (m *ResponseMetaHeader) GetEpoch() uint64
func (*ResponseMetaHeader) GetVersion ¶
func (m *ResponseMetaHeader) GetVersion() uint32
func (*ResponseMetaHeader) Marshal ¶
func (m *ResponseMetaHeader) Marshal() (dAtA []byte, err error)
func (*ResponseMetaHeader) MarshalTo ¶
func (m *ResponseMetaHeader) MarshalTo(dAtA []byte) (int, error)
func (*ResponseMetaHeader) MarshalToSizedBuffer ¶
func (m *ResponseMetaHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ResponseMetaHeader) ProtoMessage ¶
func (*ResponseMetaHeader) ProtoMessage()
func (*ResponseMetaHeader) Reset ¶
func (m *ResponseMetaHeader) Reset()
func (*ResponseMetaHeader) SetEpoch ¶
func (m *ResponseMetaHeader) SetEpoch(v uint64)
SetEpoch is an Epoch field setter.
func (*ResponseMetaHeader) SetVersion ¶
func (m *ResponseMetaHeader) SetVersion(v uint32)
SetVersion is a Version field setter.
func (*ResponseMetaHeader) Size ¶
func (m *ResponseMetaHeader) Size() (n int)
func (*ResponseMetaHeader) String ¶
func (m *ResponseMetaHeader) String() string
func (*ResponseMetaHeader) Unmarshal ¶
func (m *ResponseMetaHeader) Unmarshal(dAtA []byte) error
func (*ResponseMetaHeader) XXX_DiscardUnknown ¶
func (m *ResponseMetaHeader) XXX_DiscardUnknown()
func (*ResponseMetaHeader) XXX_Marshal ¶
func (m *ResponseMetaHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResponseMetaHeader) XXX_Merge ¶
func (m *ResponseMetaHeader) XXX_Merge(src proto.Message)
func (*ResponseMetaHeader) XXX_Size ¶
func (m *ResponseMetaHeader) XXX_Size() int
func (*ResponseMetaHeader) XXX_Unmarshal ¶
func (m *ResponseMetaHeader) XXX_Unmarshal(b []byte) error
type SeizedMetaHeaderContainer ¶ added in v0.7.4
type SeizedMetaHeaderContainer interface {
CutMeta() RequestMetaHeader
RestoreMeta(RequestMetaHeader)
}
SeizedMetaHeaderContainer is an interface of container of RequestMetaHeader that can be cut and restored.
type SeizedRequestMetaContainer ¶ added in v0.7.4
type SeizedRequestMetaContainer interface {
RequestMetaContainer
SeizedMetaHeaderContainer
}
SeizedRequestMetaContainer is a RequestMetaContainer with seized meta.
type SessionKeyContainer ¶ added in v0.7.4
type SessionKeyContainer interface {
SessionKeySource
SetSessionKey([]byte)
}
SessionKeyContainer is an interface of the container of public session key bytes.
type SessionKeySource ¶ added in v0.7.4
type SessionKeySource interface {
GetSessionKey() []byte
}
SessionKeySource is an interface of the container of session key bytes with read access.
type SessionToken ¶ added in v0.7.4
type SessionToken interface {
SessionTokenInfo
SignatureContainer
}
SessionToken is an interface of token information and signature pair.
type SessionTokenInfo ¶ added in v0.7.4
type SessionTokenInfo interface {
TokenIDContainer
OwnerIDContainer
VerbContainer
AddressContainer
LifetimeContainer
SessionKeyContainer
OwnerKeyContainer
}
SessionTokenInfo is an interface of a fixed set of token information value containers. Contains: - ID of the token; - ID of the token's owner; - verb of the session; - address of the session object; - token lifetime; - public session key bytes; - owner's public key bytes.
type SessionTokenSource ¶ added in v0.7.4
type SessionTokenSource interface {
GetSessionToken() SessionToken
}
SessionTokenSource is an interface of the container of a SessionToken with read access.
type SignKeyPair ¶ added in v0.7.4
type SignKeyPair interface {
SignatureSource
GetPublicKey() *ecdsa.PublicKey
}
SignKeyPair is an interface of key-signature pair with read access.
type SignKeyPairAccumulator ¶ added in v0.7.4
SignKeyPairAccumulator is an interface of a set of key-signature pairs with append access.
type SignKeyPairSource ¶ added in v0.7.4
type SignKeyPairSource interface {
GetSignKeyPairs() []SignKeyPair
}
SignKeyPairSource is an interface of a set of key-signature pairs with read access.
type SignatureContainer ¶ added in v0.7.4
type SignatureContainer interface {
SignatureSource
SetSignature([]byte)
}
SignatureContainer is an interface of the container of signature bytes.
type SignatureSource ¶ added in v0.7.4
type SignatureSource interface {
GetSignature() []byte
}
SignatureSource is an interface of the container of signature bytes with read access.
type SignedDataReader ¶ added in v0.7.4
type SignedDataReader interface {
// Must return the minimum length of the slice for full reading.
// Must return a negative value if the length cannot be calculated.
SignedDataSize() int
// Must behave like Read method of io.Reader and differ only in the reading of the signed data.
ReadSignedData([]byte) (int, error)
}
SignedDataReader is an interface of signed data reader.
type SignedDataSource ¶ added in v0.7.4
type SignedDataSource interface {
// Must return the required for signature byte slice.
// A non-nil error indicates that the data is not ready for signature.
SignedData() ([]byte, error)
}
SignedDataSource is an interface of the container of a data for signing.
func ExtendedHeadersSignedData ¶ added in v1.1.0
func ExtendedHeadersSignedData(headers ExtendedHeadersSource) SignedDataSource
ExtendedHeadersSignedData wraps passed ExtendedHeadersSource and returns SignedDataSource.
func SignKeyPairsSignedData ¶ added in v1.2.0
func SignKeyPairsSignedData(v ...SignKeyPair) SignedDataSource
SignKeyPairsSignedData wraps passed SignKeyPair slice and returns SignedDataSource interface.
type TTLCondition ¶
TTLCondition is a function type that used to verify that TTL values match a specific criterion. Nil error indicates compliance with the criterion.
func IRNonForwarding ¶
func IRNonForwarding(role NodeRole) TTLCondition
IRNonForwarding condition that allows NonForwardingTTL only for IR.
type TTLContainer ¶ added in v0.7.4
TTLContainer is an interface of the container of a numerical TTL value.
type TTLSource ¶ added in v0.7.4
type TTLSource interface {
GetTTL() uint32
}
TTLSource is an interface of the container of a numerical TTL value with read access.
type TestRequest ¶
type TestRequest struct {
IntField int32 `protobuf:"varint,1,opt,name=IntField,proto3" json:"IntField,omitempty"`
StringField string `protobuf:"bytes,2,opt,name=StringField,proto3" json:"StringField,omitempty"`
BytesField []byte `protobuf:"bytes,3,opt,name=BytesField,proto3" json:"BytesField,omitempty"`
CustomField *testCustomField `protobuf:"bytes,4,opt,name=CustomField,proto3,customtype=testCustomField" json:"CustomField,omitempty"`
RequestMetaHeader `protobuf:"bytes,98,opt,name=Meta,proto3,embedded=Meta" json:"Meta"`
RequestVerificationHeader `protobuf:"bytes,99,opt,name=Header,proto3,embedded=Header" json:"Header"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*TestRequest) Descriptor ¶
func (*TestRequest) Descriptor() ([]byte, []int)
func (*TestRequest) GetBytesField ¶
func (m *TestRequest) GetBytesField() []byte
func (*TestRequest) GetIntField ¶
func (m *TestRequest) GetIntField() int32
func (*TestRequest) GetStringField ¶
func (m *TestRequest) GetStringField() string
func (*TestRequest) Marshal ¶
func (m *TestRequest) Marshal() (dAtA []byte, err error)
func (*TestRequest) MarshalToSizedBuffer ¶
func (m *TestRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TestRequest) ProtoMessage ¶
func (*TestRequest) ProtoMessage()
func (*TestRequest) Reset ¶
func (m *TestRequest) Reset()
func (*TestRequest) Size ¶
func (m *TestRequest) Size() (n int)
func (*TestRequest) String ¶
func (m *TestRequest) String() string
func (*TestRequest) Unmarshal ¶
func (m *TestRequest) Unmarshal(dAtA []byte) error
func (*TestRequest) XXX_DiscardUnknown ¶
func (m *TestRequest) XXX_DiscardUnknown()
func (*TestRequest) XXX_Marshal ¶
func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TestRequest) XXX_Merge ¶
func (m *TestRequest) XXX_Merge(src proto.Message)
func (*TestRequest) XXX_Size ¶
func (m *TestRequest) XXX_Size() int
func (*TestRequest) XXX_Unmarshal ¶
func (m *TestRequest) XXX_Unmarshal(b []byte) error
type Token ¶ added in v0.7.4
type Token struct {
// TokenInfo is a grouped information about token
Token_Info `protobuf:"bytes,1,opt,name=TokenInfo,proto3,embedded=TokenInfo" json:"TokenInfo"`
// Signature is a signature of session token information
Signature []byte `protobuf:"bytes,8,opt,name=Signature,proto3" json:"Signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
User token granting rights for object manipulation
func (*Token) Descriptor ¶ added in v0.7.4
func (*Token) GetSignature ¶ added in v0.7.4
func (*Token) MarshalToSizedBuffer ¶ added in v0.7.4
func (*Token) ProtoMessage ¶ added in v0.7.4
func (*Token) ProtoMessage()
func (*Token) SetSignature ¶ added in v0.7.4
SetSignature is a Signature field setter.
func (*Token) XXX_DiscardUnknown ¶ added in v0.7.4
func (m *Token) XXX_DiscardUnknown()
func (*Token) XXX_Marshal ¶ added in v0.7.4
func (*Token) XXX_Unmarshal ¶ added in v0.7.4
type TokenIDContainer ¶ added in v0.7.4
type TokenIDContainer interface {
TokenIDSource
SetID(TokenID)
}
TokenIDContainer is an interface of the container of a token ID value.
type TokenIDSource ¶ added in v0.7.4
type TokenIDSource interface {
GetID() TokenID
}
TokenIDSource is an interface of the container of a token ID value with read access.
type TokenLifetime ¶ added in v0.7.4
type TokenLifetime struct {
// Created carries an initial epoch of token lifetime
Created uint64 `protobuf:"varint,1,opt,name=Created,proto3" json:"Created,omitempty"`
// ValidUntil carries a last epoch of token lifetime
ValidUntil uint64 `protobuf:"varint,2,opt,name=ValidUntil,proto3" json:"ValidUntil,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
TokenLifetime carries a group of lifetime parameters of the token
func (TokenLifetime) CreationEpoch ¶ added in v0.7.4
func (m TokenLifetime) CreationEpoch() uint64
CreationEpoch is a Created field getter.
func (*TokenLifetime) Descriptor ¶ added in v0.7.4
func (*TokenLifetime) Descriptor() ([]byte, []int)
func (TokenLifetime) ExpirationEpoch ¶ added in v0.7.4
func (m TokenLifetime) ExpirationEpoch() uint64
ExpirationEpoch is a ValidUntil field getter.
func (*TokenLifetime) GetCreated ¶ added in v0.7.4
func (m *TokenLifetime) GetCreated() uint64
func (*TokenLifetime) GetValidUntil ¶ added in v0.7.4
func (m *TokenLifetime) GetValidUntil() uint64
func (*TokenLifetime) Marshal ¶ added in v0.7.4
func (m *TokenLifetime) Marshal() (dAtA []byte, err error)
func (*TokenLifetime) MarshalTo ¶ added in v0.7.4
func (m *TokenLifetime) MarshalTo(dAtA []byte) (int, error)
func (*TokenLifetime) MarshalToSizedBuffer ¶ added in v0.7.4
func (m *TokenLifetime) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TokenLifetime) ProtoMessage ¶ added in v0.7.4
func (*TokenLifetime) ProtoMessage()
func (*TokenLifetime) Reset ¶ added in v0.7.4
func (m *TokenLifetime) Reset()
func (*TokenLifetime) SetCreationEpoch ¶ added in v0.7.4
func (m *TokenLifetime) SetCreationEpoch(e uint64)
SetCreationEpoch is a Created field setter.
func (*TokenLifetime) SetExpirationEpoch ¶ added in v0.7.4
func (m *TokenLifetime) SetExpirationEpoch(e uint64)
SetExpirationEpoch is a ValidUntil field setter.
func (*TokenLifetime) Size ¶ added in v0.7.4
func (m *TokenLifetime) Size() (n int)
func (*TokenLifetime) String ¶ added in v0.7.4
func (m *TokenLifetime) String() string
func (*TokenLifetime) Unmarshal ¶ added in v0.7.4
func (m *TokenLifetime) Unmarshal(dAtA []byte) error
func (*TokenLifetime) XXX_DiscardUnknown ¶ added in v0.7.4
func (m *TokenLifetime) XXX_DiscardUnknown()
func (*TokenLifetime) XXX_Marshal ¶ added in v0.7.4
func (m *TokenLifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TokenLifetime) XXX_Merge ¶ added in v0.7.4
func (m *TokenLifetime) XXX_Merge(src proto.Message)
func (*TokenLifetime) XXX_Size ¶ added in v0.7.4
func (m *TokenLifetime) XXX_Size() int
func (*TokenLifetime) XXX_Unmarshal ¶ added in v0.7.4
func (m *TokenLifetime) XXX_Unmarshal(b []byte) error
type Token_Info ¶ added in v0.7.4
type Token_Info struct {
// ID is a token identifier. valid UUIDv4 represented in bytes
ID TokenID `protobuf:"bytes,1,opt,name=ID,proto3,customtype=TokenID" json:"ID"`
// OwnerID is an owner of manipulation object
OwnerID OwnerID `protobuf:"bytes,2,opt,name=OwnerID,proto3,customtype=OwnerID" json:"OwnerID"`
// Verb is a type of request for which the token is issued
Verb Token_Info_Verb `protobuf:"varint,3,opt,name=verb,proto3,enum=service.Token_Info_Verb" json:"verb,omitempty"`
// Address is an object address for which token is issued
Address Address `protobuf:"bytes,4,opt,name=Address,proto3,customtype=Address" json:"Address"`
// Lifetime is a lifetime of the session
TokenLifetime `protobuf:"bytes,5,opt,name=Lifetime,proto3,embedded=Lifetime" json:"Lifetime"`
// SessionKey is a public key of session key
SessionKey []byte `protobuf:"bytes,6,opt,name=SessionKey,proto3" json:"SessionKey,omitempty"`
// OwnerKey is a public key of the token owner
OwnerKey []byte `protobuf:"bytes,7,opt,name=OwnerKey,proto3" json:"OwnerKey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Token_Info) Descriptor ¶ added in v0.7.4
func (*Token_Info) Descriptor() ([]byte, []int)
func (Token_Info) GetAddress ¶ added in v0.7.4
func (m Token_Info) GetAddress() Address
GetAddress is an Address field getter.
func (Token_Info) GetID ¶ added in v0.7.4
func (m Token_Info) GetID() TokenID
GetID is an ID field getter.
func (Token_Info) GetOwnerID ¶ added in v0.7.4
func (m Token_Info) GetOwnerID() OwnerID
GetOwnerID is an OwnerID field getter.
func (*Token_Info) GetOwnerKey ¶ added in v0.7.5
func (m *Token_Info) GetOwnerKey() []byte
func (*Token_Info) GetSessionKey ¶ added in v0.7.4
func (m *Token_Info) GetSessionKey() []byte
func (*Token_Info) GetVerb ¶ added in v0.7.4
func (m *Token_Info) GetVerb() Token_Info_Verb
func (*Token_Info) Marshal ¶ added in v0.7.4
func (m *Token_Info) Marshal() (dAtA []byte, err error)
func (*Token_Info) MarshalTo ¶ added in v0.7.4
func (m *Token_Info) MarshalTo(dAtA []byte) (int, error)
func (*Token_Info) MarshalToSizedBuffer ¶ added in v0.7.4
func (m *Token_Info) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Token_Info) ProtoMessage ¶ added in v0.7.4
func (*Token_Info) ProtoMessage()
func (*Token_Info) Reset ¶ added in v0.7.4
func (m *Token_Info) Reset()
func (*Token_Info) SetAddress ¶ added in v0.7.4
func (m *Token_Info) SetAddress(addr Address)
SetAddress is an Address field setter.
func (*Token_Info) SetID ¶ added in v0.7.4
func (m *Token_Info) SetID(id TokenID)
SetID is an ID field setter.
func (*Token_Info) SetOwnerID ¶ added in v0.7.4
func (m *Token_Info) SetOwnerID(id OwnerID)
SetOwnerID is an OwnerID field setter.
func (*Token_Info) SetOwnerKey ¶ added in v0.7.5
func (m *Token_Info) SetOwnerKey(key []byte)
SetOwnerKey is an OwnerKey field setter.
func (*Token_Info) SetSessionKey ¶ added in v0.7.4
func (m *Token_Info) SetSessionKey(key []byte)
SetSessionKey is a SessionKey field setter.
func (*Token_Info) SetVerb ¶ added in v0.7.4
func (m *Token_Info) SetVerb(verb Token_Info_Verb)
SetVerb is a Verb field setter.
func (*Token_Info) Size ¶ added in v0.7.4
func (m *Token_Info) Size() (n int)
func (*Token_Info) String ¶ added in v0.7.4
func (m *Token_Info) String() string
func (*Token_Info) Unmarshal ¶ added in v0.7.4
func (m *Token_Info) Unmarshal(dAtA []byte) error
func (*Token_Info) XXX_DiscardUnknown ¶ added in v0.7.4
func (m *Token_Info) XXX_DiscardUnknown()
func (*Token_Info) XXX_Marshal ¶ added in v0.7.4
func (m *Token_Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Token_Info) XXX_Merge ¶ added in v0.7.4
func (m *Token_Info) XXX_Merge(src proto.Message)
func (*Token_Info) XXX_Size ¶ added in v0.7.4
func (m *Token_Info) XXX_Size() int
func (*Token_Info) XXX_Unmarshal ¶ added in v0.7.4
func (m *Token_Info) XXX_Unmarshal(b []byte) error
type Token_Info_Verb ¶ added in v0.7.4
type Token_Info_Verb int32
Verb is an enumeration of session request types
const ( // Put refers to object.Put RPC call Token_Info_Put Token_Info_Verb = 0 // Get refers to object.Get RPC call Token_Info_Get Token_Info_Verb = 1 // Head refers to object.Head RPC call Token_Info_Head Token_Info_Verb = 2 // Search refers to object.Search RPC call Token_Info_Search Token_Info_Verb = 3 // Delete refers to object.Delete RPC call Token_Info_Delete Token_Info_Verb = 4 // Range refers to object.GetRange RPC call Token_Info_Range Token_Info_Verb = 5 // RangeHash refers to object.GetRangeHash RPC call Token_Info_RangeHash Token_Info_Verb = 6 )
func (Token_Info_Verb) Bytes ¶ added in v0.7.4
func (x Token_Info_Verb) Bytes() []byte
Bytes returns a binary representation of the verb.
func (Token_Info_Verb) EnumDescriptor ¶ added in v0.7.4
func (Token_Info_Verb) EnumDescriptor() ([]byte, []int)
func (Token_Info_Verb) Size ¶ added in v0.7.4
func (x Token_Info_Verb) Size() int
Size returns the size of a binary representation of the verb.
func (Token_Info_Verb) String ¶ added in v0.7.4
func (x Token_Info_Verb) String() string
type VerbContainer ¶ added in v0.7.4
type VerbContainer interface {
VerbSource
SetVerb(Token_Info_Verb)
}
VerbContainer is an interface of the container of a token verb value.
type VerbSource ¶ added in v0.7.4
type VerbSource interface {
GetVerb() Token_Info_Verb
}
VerbSource is an interface of the container of a token verb value with read access.
type VersionContainer ¶ added in v0.7.4
type VersionContainer interface {
VersionSource
SetVersion(uint32)
}
VersionContainer is an interface of the container of a numerical Version value.
type VersionSource ¶ added in v0.7.4
type VersionSource interface {
GetVersion() uint32
}
VersionSource is an interface of the container of a numerical Version value with read access.