Documentation ¶
Index ¶
- Constants
- func ActionToGRPCField(t Action) acl.Action
- func HeaderFiltersToGRPC(fs []HeaderFilter) (res []*acl.EACLRecord_Filter)
- func HeaderTypeToGRPCField(t HeaderType) acl.HeaderType
- func MatchTypeToGRPCField(t MatchType) acl.MatchType
- func OperationToGRPCField(t Operation) acl.Operation
- func RecordsToGRPC(ts []Record) (res []*acl.EACLRecord)
- func RoleToGRPCField(t Role) acl.Role
- func TargetsToGRPC(ts []Target) (res []*acl.EACLRecord_Target)
- type Action
- type BearerToken
- func (bt *BearerToken) FromGRPCMessage(m grpc.Message) error
- func (bt *BearerToken) GetBody() *BearerTokenBody
- func (bt *BearerToken) GetSignature() *refs.Signature
- func (bt *BearerToken) MarshalJSON() ([]byte, error)
- func (bt *BearerToken) SetBody(v *BearerTokenBody)
- func (bt *BearerToken) SetSignature(v *refs.Signature)
- func (bt *BearerToken) StableMarshal(buf []byte) []byte
- func (bt *BearerToken) StableSize() (size int)
- func (bt *BearerToken) ToGRPCMessage() grpc.Message
- func (bt *BearerToken) Unmarshal(data []byte) error
- func (bt *BearerToken) UnmarshalJSON(data []byte) error
- type BearerTokenBody
- func (bt *BearerTokenBody) FromGRPCMessage(m grpc.Message) error
- func (bt *BearerTokenBody) GetEACL() *Table
- func (bt *BearerTokenBody) GetIssuer() *refs.OwnerID
- func (bt *BearerTokenBody) GetLifetime() *TokenLifetime
- func (bt *BearerTokenBody) GetOwnerID() *refs.OwnerID
- func (bt *BearerTokenBody) MarshalJSON() ([]byte, error)
- func (bt *BearerTokenBody) SetEACL(v *Table)
- func (bt *BearerTokenBody) SetIssuer(v *refs.OwnerID)
- func (bt *BearerTokenBody) SetLifetime(v *TokenLifetime)
- func (bt *BearerTokenBody) SetOwnerID(v *refs.OwnerID)
- func (bt *BearerTokenBody) StableMarshal(buf []byte) []byte
- func (bt *BearerTokenBody) StableSize() (size int)
- func (bt *BearerTokenBody) ToGRPCMessage() grpc.Message
- func (bt *BearerTokenBody) Unmarshal(data []byte) error
- func (bt *BearerTokenBody) UnmarshalJSON(data []byte) error
- type HeaderFilter
- func (f *HeaderFilter) FromGRPCMessage(m grpc.Message) error
- func (f *HeaderFilter) GetHeaderType() HeaderType
- func (f *HeaderFilter) GetKey() string
- func (f *HeaderFilter) GetMatchType() MatchType
- func (f *HeaderFilter) GetValue() string
- func (f *HeaderFilter) MarshalJSON() ([]byte, error)
- func (f *HeaderFilter) SetHeaderType(v HeaderType)
- func (f *HeaderFilter) SetKey(v string)
- func (f *HeaderFilter) SetMatchType(v MatchType)
- func (f *HeaderFilter) SetValue(v string)
- func (f *HeaderFilter) StableMarshal(buf []byte) []byte
- func (f *HeaderFilter) StableSize() (size int)
- func (f *HeaderFilter) ToGRPCMessage() grpc.Message
- func (f *HeaderFilter) Unmarshal(data []byte) error
- func (f *HeaderFilter) UnmarshalJSON(data []byte) error
- type HeaderType
- type MatchType
- type Operation
- type Record
- func (r *Record) FromGRPCMessage(m grpc.Message) error
- func (r *Record) GetAction() Action
- func (r *Record) GetFilters() []HeaderFilter
- func (r *Record) GetOperation() Operation
- func (r *Record) GetTargets() []Target
- func (r *Record) MarshalJSON() ([]byte, error)
- func (r *Record) SetAction(v Action)
- func (r *Record) SetFilters(v []HeaderFilter)
- func (r *Record) SetOperation(v Operation)
- func (r *Record) SetTargets(v []Target)
- func (r *Record) StableMarshal(buf []byte) []byte
- func (r *Record) StableSize() (size int)
- func (r *Record) ToGRPCMessage() grpc.Message
- func (r *Record) Unmarshal(data []byte) error
- func (r *Record) UnmarshalJSON(data []byte) error
- type Role
- type Table
- func (t *Table) FromGRPCMessage(m grpc.Message) error
- func (t *Table) GetContainerID() *refs.ContainerID
- func (t *Table) GetRecords() []Record
- func (t *Table) GetVersion() *refs.Version
- func (t *Table) MarshalJSON() ([]byte, error)
- func (t *Table) SetContainerID(v *refs.ContainerID)
- func (t *Table) SetRecords(v []Record)
- func (t *Table) SetVersion(v *refs.Version)
- func (t *Table) StableMarshal(buf []byte) []byte
- func (t *Table) StableSize() (size int)
- func (t *Table) ToGRPCMessage() grpc.Message
- func (t *Table) Unmarshal(data []byte) error
- func (t *Table) UnmarshalJSON(data []byte) error
- type Target
- func (t *Target) FromGRPCMessage(m grpc.Message) error
- func (t *Target) GetKeys() [][]byte
- func (t *Target) GetRole() Role
- func (t *Target) MarshalJSON() ([]byte, error)
- func (t *Target) SetKeys(v [][]byte)
- func (t *Target) SetRole(v Role)
- func (t *Target) StableMarshal(buf []byte) []byte
- func (t *Target) StableSize() (size int)
- func (t *Target) ToGRPCMessage() grpc.Message
- func (t *Target) Unmarshal(data []byte) error
- func (t *Target) UnmarshalJSON(data []byte) error
- type TokenLifetime
- func (l *TokenLifetime) FromGRPCMessage(m grpc.Message) error
- func (l *TokenLifetime) GetExp() uint64
- func (l *TokenLifetime) GetIat() uint64
- func (l *TokenLifetime) GetNbf() uint64
- func (l *TokenLifetime) MarshalJSON() ([]byte, error)
- func (l *TokenLifetime) SetExp(v uint64)
- func (l *TokenLifetime) SetIat(v uint64)
- func (l *TokenLifetime) SetNbf(v uint64)
- func (l *TokenLifetime) StableMarshal(buf []byte) []byte
- func (l *TokenLifetime) StableSize() (size int)
- func (l *TokenLifetime) ToGRPCMessage() grpc.Message
- func (l *TokenLifetime) Unmarshal(data []byte) error
- func (l *TokenLifetime) UnmarshalJSON(data []byte) error
Constants ¶
const ( // FilterObjectVersion is a filter key to "version" field of the object header. FilterObjectVersion = ObjectFilterPrefix + "version" // FilterObjectID is a filter key to "object_id" field of the object. FilterObjectID = ObjectFilterPrefix + "objectID" // FilterObjectContainerID is a filter key to "container_id" field of the object header. FilterObjectContainerID = ObjectFilterPrefix + "containerID" // FilterObjectOwnerID is a filter key to "owner_id" field of the object header. FilterObjectOwnerID = ObjectFilterPrefix + "ownerID" // FilterObjectCreationEpoch is a filter key to "creation_epoch" field of the object header. FilterObjectCreationEpoch = ObjectFilterPrefix + "creationEpoch" // FilterObjectPayloadLength is a filter key to "payload_length" field of the object header. FilterObjectPayloadLength = ObjectFilterPrefix + "payloadLength" // FilterObjectPayloadHash is a filter key to "payload_hash" field of the object header. FilterObjectPayloadHash = ObjectFilterPrefix + "payloadHash" // FilterObjectType is a filter key to "object_type" field of the object header. FilterObjectType = ObjectFilterPrefix + "objectType" // FilterObjectHomomorphicHash is a filter key to "homomorphic_hash" field of the object header. FilterObjectHomomorphicHash = ObjectFilterPrefix + "homomorphicHash" )
const ObjectFilterPrefix = "$Object:"
ObjectFilterPrefix is a prefix of key to object header value or property.
Variables ¶
This section is empty.
Functions ¶
func ActionToGRPCField ¶
ActionToGRPCField converts unified action enum into grpc enum.
func HeaderFiltersToGRPC ¶
func HeaderFiltersToGRPC(fs []HeaderFilter) (res []*acl.EACLRecord_Filter)
func HeaderTypeToGRPCField ¶
func HeaderTypeToGRPCField(t HeaderType) acl.HeaderType
HeaderTypeToGRPCField converts unified header type enum into grpc enum.
func MatchTypeToGRPCField ¶
MatchTypeToGRPCField converts unified match type enum into grpc enum.
func OperationToGRPCField ¶
OperationToGRPCField converts unified operation enum into grpc enum.
func RecordsToGRPC ¶
func RecordsToGRPC(ts []Record) (res []*acl.EACLRecord)
func RoleToGRPCField ¶
RoleToGRPCField converts unified role enum into grpc enum.
func TargetsToGRPC ¶
func TargetsToGRPC(ts []Target) (res []*acl.EACLRecord_Target)
Types ¶
type Action ¶
type Action uint32
Action is a unified enum of Action enum from proto definition.
func ActionFromGRPCField ¶
ActionFromGRPCField converts grpc enum into unified action enum.
func (*Action) FromString ¶
FromString parses Action from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
type BearerToken ¶
type BearerToken struct {
// contains filtered or unexported fields
}
func (*BearerToken) FromGRPCMessage ¶
func (bt *BearerToken) FromGRPCMessage(m grpc.Message) error
func (*BearerToken) GetBody ¶
func (bt *BearerToken) GetBody() *BearerTokenBody
func (*BearerToken) GetSignature ¶
func (bt *BearerToken) GetSignature() *refs.Signature
func (*BearerToken) MarshalJSON ¶
func (bt *BearerToken) MarshalJSON() ([]byte, error)
func (*BearerToken) SetBody ¶
func (bt *BearerToken) SetBody(v *BearerTokenBody)
func (*BearerToken) SetSignature ¶
func (bt *BearerToken) SetSignature(v *refs.Signature)
func (*BearerToken) StableMarshal ¶
func (bt *BearerToken) StableMarshal(buf []byte) []byte
func (*BearerToken) StableSize ¶
func (bt *BearerToken) StableSize() (size int)
func (*BearerToken) ToGRPCMessage ¶
func (bt *BearerToken) ToGRPCMessage() grpc.Message
func (*BearerToken) Unmarshal ¶
func (bt *BearerToken) Unmarshal(data []byte) error
func (*BearerToken) UnmarshalJSON ¶
func (bt *BearerToken) UnmarshalJSON(data []byte) error
type BearerTokenBody ¶
type BearerTokenBody struct {
// contains filtered or unexported fields
}
func (*BearerTokenBody) FromGRPCMessage ¶
func (bt *BearerTokenBody) FromGRPCMessage(m grpc.Message) error
func (*BearerTokenBody) GetEACL ¶
func (bt *BearerTokenBody) GetEACL() *Table
func (*BearerTokenBody) GetIssuer ¶
func (bt *BearerTokenBody) GetIssuer() *refs.OwnerID
func (*BearerTokenBody) GetLifetime ¶
func (bt *BearerTokenBody) GetLifetime() *TokenLifetime
func (*BearerTokenBody) GetOwnerID ¶
func (bt *BearerTokenBody) GetOwnerID() *refs.OwnerID
func (*BearerTokenBody) MarshalJSON ¶
func (bt *BearerTokenBody) MarshalJSON() ([]byte, error)
func (*BearerTokenBody) SetEACL ¶
func (bt *BearerTokenBody) SetEACL(v *Table)
func (*BearerTokenBody) SetIssuer ¶
func (bt *BearerTokenBody) SetIssuer(v *refs.OwnerID)
func (*BearerTokenBody) SetLifetime ¶
func (bt *BearerTokenBody) SetLifetime(v *TokenLifetime)
func (*BearerTokenBody) SetOwnerID ¶
func (bt *BearerTokenBody) SetOwnerID(v *refs.OwnerID)
func (*BearerTokenBody) StableMarshal ¶
func (bt *BearerTokenBody) StableMarshal(buf []byte) []byte
func (*BearerTokenBody) StableSize ¶
func (bt *BearerTokenBody) StableSize() (size int)
func (*BearerTokenBody) ToGRPCMessage ¶
func (bt *BearerTokenBody) ToGRPCMessage() grpc.Message
func (*BearerTokenBody) Unmarshal ¶
func (bt *BearerTokenBody) Unmarshal(data []byte) error
func (*BearerTokenBody) UnmarshalJSON ¶
func (bt *BearerTokenBody) UnmarshalJSON(data []byte) error
type HeaderFilter ¶
type HeaderFilter struct {
// contains filtered or unexported fields
}
HeaderFilter is a unified structure of FilterInfo message from proto definition.
func HeaderFiltersFromGRPC ¶
func HeaderFiltersFromGRPC(fs []*acl.EACLRecord_Filter) (res []HeaderFilter, err error)
func (*HeaderFilter) FromGRPCMessage ¶
func (f *HeaderFilter) FromGRPCMessage(m grpc.Message) error
func (*HeaderFilter) GetHeaderType ¶
func (f *HeaderFilter) GetHeaderType() HeaderType
func (*HeaderFilter) GetKey ¶
func (f *HeaderFilter) GetKey() string
func (*HeaderFilter) GetMatchType ¶
func (f *HeaderFilter) GetMatchType() MatchType
func (*HeaderFilter) GetValue ¶
func (f *HeaderFilter) GetValue() string
func (*HeaderFilter) MarshalJSON ¶
func (f *HeaderFilter) MarshalJSON() ([]byte, error)
func (*HeaderFilter) SetHeaderType ¶
func (f *HeaderFilter) SetHeaderType(v HeaderType)
func (*HeaderFilter) SetKey ¶
func (f *HeaderFilter) SetKey(v string)
func (*HeaderFilter) SetMatchType ¶
func (f *HeaderFilter) SetMatchType(v MatchType)
func (*HeaderFilter) SetValue ¶
func (f *HeaderFilter) SetValue(v string)
func (*HeaderFilter) StableMarshal ¶
func (f *HeaderFilter) StableMarshal(buf []byte) []byte
StableMarshal marshals unified header filter structure in a protobuf compatible way without field order shuffle.
func (*HeaderFilter) StableSize ¶
func (f *HeaderFilter) StableSize() (size int)
StableSize of header filter structure marshalled by StableMarshal function.
func (*HeaderFilter) ToGRPCMessage ¶
func (f *HeaderFilter) ToGRPCMessage() grpc.Message
func (*HeaderFilter) Unmarshal ¶
func (f *HeaderFilter) Unmarshal(data []byte) error
func (*HeaderFilter) UnmarshalJSON ¶
func (f *HeaderFilter) UnmarshalJSON(data []byte) error
type HeaderType ¶
type HeaderType uint32
HeaderType is a unified enum of HeaderType enum from proto definition.
const ( HeaderTypeUnknown HeaderType = iota HeaderTypeRequest HeaderTypeObject HeaderTypeService )
func HeaderTypeFromGRPCField ¶
func HeaderTypeFromGRPCField(t acl.HeaderType) HeaderType
HeaderTypeFromGRPCField converts grpc enum into unified header type enum.
func (*HeaderType) FromString ¶
func (x *HeaderType) FromString(s string) bool
FromString parses HeaderType from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
func (HeaderType) String ¶
func (x HeaderType) String() string
String returns string representation of HeaderType.
type MatchType ¶
type MatchType uint32
Target is a unified enum of MatchType enum from proto definition.
func MatchTypeFromGRPCField ¶
MatchTypeFromGRPCField converts grpc enum into unified match type enum.
func (*MatchType) FromString ¶
FromString parses MatchType from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
type Operation ¶
type Operation uint32
Operation is a unified enum of Operation enum from proto definition.
func OperationFromGRPCField ¶
OperationFromGRPCField converts grpc enum into unified operation enum.
func (*Operation) FromString ¶
FromString parses Operation from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record is a unified structure of EACLRecord message from proto definition.
func RecordsFromGRPC ¶
func RecordsFromGRPC(fs []*acl.EACLRecord) (res []Record, err error)
func (*Record) GetFilters ¶
func (r *Record) GetFilters() []HeaderFilter
func (*Record) GetOperation ¶
func (*Record) GetTargets ¶
func (*Record) MarshalJSON ¶
func (*Record) SetFilters ¶
func (r *Record) SetFilters(v []HeaderFilter)
func (*Record) SetOperation ¶
func (*Record) SetTargets ¶
func (*Record) StableMarshal ¶
StableMarshal marshals unified acl record structure in a protobuf compatible way without field order shuffle.
func (*Record) StableSize ¶
StableSize of acl record structure marshalled by StableMarshal function.
func (*Record) ToGRPCMessage ¶
func (*Record) UnmarshalJSON ¶
type Role ¶
type Role uint32
Role is a unified enum of Role enum from proto definition.
func RoleFromGRPCField ¶
RoleFromGRPCField converts grpc enum into unified role enum.
func (*Role) FromString ¶
FromString parses Role from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table is a unified structure of EACLTable message from proto definition.
func (*Table) GetContainerID ¶
func (t *Table) GetContainerID() *refs.ContainerID
func (*Table) GetRecords ¶
func (*Table) GetVersion ¶
func (*Table) MarshalJSON ¶
func (*Table) SetContainerID ¶
func (t *Table) SetContainerID(v *refs.ContainerID)
func (*Table) SetRecords ¶
func (*Table) SetVersion ¶
func (*Table) StableMarshal ¶
StableMarshal marshals unified acl table structure in a protobuf compatible way without field order shuffle.
func (*Table) StableSize ¶
StableSize of acl table structure marshalled by StableMarshal function.
func (*Table) ToGRPCMessage ¶
func (*Table) UnmarshalJSON ¶
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target is a unified structure of Target message from proto definition.
func TargetsFromGRPC ¶
func TargetsFromGRPC(fs []*acl.EACLRecord_Target) (res []Target, err error)
func (*Target) MarshalJSON ¶
func (*Target) StableMarshal ¶
StableMarshal marshals unified role info structure in a protobuf compatible way without field order shuffle.
func (*Target) StableSize ¶
StableSize of role info structure marshalled by StableMarshal function.
func (*Target) ToGRPCMessage ¶
func (*Target) UnmarshalJSON ¶
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