Documentation ¶
Index ¶
- Variables
- type Capabilities
- func (x *Capabilities) AsBits() int64
- func (*Capabilities) Descriptor() ([]byte, []int)deprecated
- func (x *Capabilities) GetDelegate() bool
- func (x *Capabilities) GetFetch() bool
- func (x *Capabilities) GetPii() bool
- func (x *Capabilities) GetRead() bool
- func (x *Capabilities) GetWrite() bool
- func (x *Capabilities) IsSubsetOf(other *Capabilities) bool
- func (x *Capabilities) Pretty() string
- func (*Capabilities) ProtoMessage()
- func (x *Capabilities) ProtoReflect() protoreflect.Message
- func (x *Capabilities) Reset()
- func (x *Capabilities) Scan(v interface{}) error
- func (x *Capabilities) String() string
- func (x *Capabilities) Value() (driver.Value, error)
- func (x *Capabilities) Zero() bool
- type ContextReference
- func (ContextReference) Descriptor() protoreflect.EnumDescriptor
- func (x ContextReference) Enum() *ContextReference
- func (ContextReference) EnumDescriptor() ([]byte, []int)deprecated
- func (x ContextReference) Number() protoreflect.EnumNumber
- func (x ContextReference) String() string
- func (ContextReference) Type() protoreflect.EnumType
- type Direction
- type LocationReference
- func (*LocationReference) Descriptor() ([]byte, []int)deprecated
- func (x *LocationReference) GetPath() *Reference
- func (x *LocationReference) GetTenantId() *Reference
- func (*LocationReference) ProtoMessage()
- func (x *LocationReference) ProtoReflect() protoreflect.Message
- func (x *LocationReference) Reset()
- func (x *LocationReference) String() string
- type Reference
- func (*Reference) Descriptor() ([]byte, []int)deprecated
- func (x *Reference) GetContext() ContextReference
- func (x *Reference) GetField() int32
- func (m *Reference) GetKind() isReference_Kind
- func (x *Reference) GetStringValue() string
- func (*Reference) ProtoMessage()
- func (x *Reference) ProtoReflect() protoreflect.Message
- func (x *Reference) Reset()
- func (x *Reference) String() string
- type Reference_Context
- type Reference_Field
- type Reference_StringValue
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)deprecated
- func (x *Rule) GetAnd() *Rule_And
- func (x *Rule) GetAuthStatus() Rule_AuthStatus
- func (x *Rule) GetDirection() Direction
- func (x *Rule) GetEq() *Rule_Eq
- func (x *Rule) GetIsSubset() bool
- func (m *Rule) GetKind() isRule_Kind
- func (x *Rule) GetMay() *SessionReference
- func (x *Rule) GetMessage() string
- func (x *Rule) GetNever() bool
- func (x *Rule) GetNot() *Rule
- func (x *Rule) GetOr() *Rule_Or
- func (*Rule) ProtoMessage()
- func (x *Rule) ProtoReflect() protoreflect.Message
- func (x *Rule) Reset()
- func (x *Rule) String() string
- type Rule_And
- type Rule_And_
- type Rule_AuthStatus
- func (Rule_AuthStatus) Descriptor() protoreflect.EnumDescriptor
- func (x Rule_AuthStatus) Enum() *Rule_AuthStatus
- func (Rule_AuthStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x Rule_AuthStatus) Number() protoreflect.EnumNumber
- func (x Rule_AuthStatus) String() string
- func (Rule_AuthStatus) Type() protoreflect.EnumType
- type Rule_AuthStatus_
- type Rule_Direction
- type Rule_Eq
- type Rule_Eq_
- type Rule_IsSubset
- type Rule_May
- type Rule_Never
- type Rule_Not
- type Rule_Or
- type Rule_Or_
- type ScopeReference
- func (*ScopeReference) Descriptor() ([]byte, []int)deprecated
- func (m *ScopeReference) GetKind() isScopeReference_Kind
- func (x *ScopeReference) GetOnLocation() *LocationReference
- func (x *ScopeReference) GetOnPrincipal() *Reference
- func (x *ScopeReference) GetSuperToken() bool
- func (*ScopeReference) ProtoMessage()
- func (x *ScopeReference) ProtoReflect() protoreflect.Message
- func (x *ScopeReference) Reset()
- func (x *ScopeReference) String() string
- type ScopeReference_OnLocation
- type ScopeReference_OnPrincipal
- type ScopeReference_SuperToken
- type SessionReference
- func (*SessionReference) Descriptor() ([]byte, []int)deprecated
- func (x *SessionReference) GetCapabilities() *Capabilities
- func (x *SessionReference) GetScope() *ScopeReference
- func (*SessionReference) ProtoMessage()
- func (x *SessionReference) ProtoReflect() protoreflect.Message
- func (x *SessionReference) Reset()
- func (x *SessionReference) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Direction_name = map[int32]string{ 0: "INVALID_DIRECTION", 1: "REQUEST", 2: "RESPONSE", } Direction_value = map[string]int32{ "INVALID_DIRECTION": 0, "REQUEST": 1, "RESPONSE": 2, } )
Enum value maps for Direction.
var ( ContextReference_name = map[int32]string{ 0: "INVALID_CONTEXT", 1: "SESSION_PRINCIPAL", 2: "SCOPE_TENANT", 3: "SCOPE_PRINCIPAL", 4: "UNAUTHENTICATED_PRINCIPAL", 5: "VHOST_TENANT", } ContextReference_value = map[string]int32{ "INVALID_CONTEXT": 0, "SESSION_PRINCIPAL": 1, "SCOPE_TENANT": 2, "SCOPE_PRINCIPAL": 3, "UNAUTHENTICATED_PRINCIPAL": 4, "VHOST_TENANT": 5, } )
Enum value maps for ContextReference.
var ( Rule_AuthStatus_name = map[int32]string{ 0: "LOGGED_IN", 1: "PUBLIC", 2: "SUPER", } Rule_AuthStatus_value = map[string]int32{ "LOGGED_IN": 0, "PUBLIC": 1, "SUPER": 2, } )
Enum value maps for Rule_AuthStatus.
var ( // Applies the given requirements if the field is set. // // optional cacheroach.capabilities.Rule field_rule = 55123; E_FieldRule = &file_capabilities_proto_extTypes[1] )
Extension fields to descriptorpb.FieldOptions.
var (
// optional cacheroach.capabilities.Rule method_rule = 55123;
E_MethodRule = &file_capabilities_proto_extTypes[2]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional cacheroach.capabilities.Rule msg_rule = 55123;
E_MsgRule = &file_capabilities_proto_extTypes[0]
)
Extension fields to descriptorpb.MessageOptions.
var File_capabilities_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct { // General model property access. Read bool `protobuf:"varint,1,opt,name=read,proto3" json:"read,omitempty"` // General model property access. Write bool `protobuf:"varint,2,opt,name=write,proto3" json:"write,omitempty"` // Grants the ability to create additional access tokens. Delegate bool `protobuf:"varint,3,opt,name=delegate,proto3" json:"delegate,omitempty"` // Grants access to personally-identifying information. Pii bool `protobuf:"varint,4,opt,name=pii,proto3" json:"pii,omitempty"` // Grants access to the server-side fetch API. Fetch bool `protobuf:"varint,5,opt,name=fetch,proto3" json:"fetch,omitempty"` // contains filtered or unexported fields }
func Parse ¶
func Parse(x []string) (*Capabilities, error)
Parse will return a capabilities with the request field names set. The value "all" will return All().
func (*Capabilities) AsBits ¶
func (x *Capabilities) AsBits() int64
AsBits expresses the bool fields of the message as a bit-field, using the message field numbers as the bit.
func (*Capabilities) Descriptor
deprecated
func (*Capabilities) Descriptor() ([]byte, []int)
Deprecated: Use Capabilities.ProtoReflect.Descriptor instead.
func (*Capabilities) GetDelegate ¶
func (x *Capabilities) GetDelegate() bool
func (*Capabilities) GetFetch ¶
func (x *Capabilities) GetFetch() bool
func (*Capabilities) GetPii ¶
func (x *Capabilities) GetPii() bool
func (*Capabilities) GetRead ¶
func (x *Capabilities) GetRead() bool
func (*Capabilities) GetWrite ¶
func (x *Capabilities) GetWrite() bool
func (*Capabilities) IsSubsetOf ¶
func (x *Capabilities) IsSubsetOf(other *Capabilities) bool
IsSubsetOf returns true if the target Capabilities are a subset of or equal to another Capabilities.
func (*Capabilities) Pretty ¶
func (x *Capabilities) Pretty() string
Pretty returns a pretty-printable value that Parse will understand.
func (*Capabilities) ProtoMessage ¶
func (*Capabilities) ProtoMessage()
func (*Capabilities) ProtoReflect ¶
func (x *Capabilities) ProtoReflect() protoreflect.Message
func (*Capabilities) Reset ¶
func (x *Capabilities) Reset()
func (*Capabilities) Scan ¶
func (x *Capabilities) Scan(v interface{}) error
Scan implements sql.Scanner.
func (*Capabilities) String ¶
func (x *Capabilities) String() string
func (*Capabilities) Value ¶
func (x *Capabilities) Value() (driver.Value, error)
Value implements driver.Valuer.
func (*Capabilities) Zero ¶
func (x *Capabilities) Zero() bool
Zero returns true if no capabilities are set.
type ContextReference ¶
type ContextReference int32
const ( ContextReference_INVALID_CONTEXT ContextReference = 0 ContextReference_SESSION_PRINCIPAL ContextReference = 1 // The principal that is making the request. ContextReference_SCOPE_TENANT ContextReference = 2 // The tenant that is embedded in the session's scope. ContextReference_SCOPE_PRINCIPAL ContextReference = 3 // The principal embedded in the session's scope. ContextReference_UNAUTHENTICATED_PRINCIPAL ContextReference = 4 // A well-known ID for an unauthorized request. ContextReference_VHOST_TENANT ContextReference = 5 // The tenant associated with a virtual-host. )
func (ContextReference) Descriptor ¶
func (ContextReference) Descriptor() protoreflect.EnumDescriptor
func (ContextReference) Enum ¶
func (x ContextReference) Enum() *ContextReference
func (ContextReference) EnumDescriptor
deprecated
func (ContextReference) EnumDescriptor() ([]byte, []int)
Deprecated: Use ContextReference.Descriptor instead.
func (ContextReference) Number ¶
func (x ContextReference) Number() protoreflect.EnumNumber
func (ContextReference) String ¶
func (x ContextReference) String() string
func (ContextReference) Type ¶
func (ContextReference) Type() protoreflect.EnumType
type Direction ¶
type Direction int32
func (Direction) Descriptor ¶
func (Direction) Descriptor() protoreflect.EnumDescriptor
func (Direction) EnumDescriptor
deprecated
func (Direction) Number ¶
func (x Direction) Number() protoreflect.EnumNumber
func (Direction) Type ¶
func (Direction) Type() protoreflect.EnumType
type LocationReference ¶
type LocationReference struct { TenantId *Reference `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"` Path *Reference `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
Analog of session.Location.
func (*LocationReference) Descriptor
deprecated
func (*LocationReference) Descriptor() ([]byte, []int)
Deprecated: Use LocationReference.ProtoReflect.Descriptor instead.
func (*LocationReference) GetPath ¶
func (x *LocationReference) GetPath() *Reference
func (*LocationReference) GetTenantId ¶
func (x *LocationReference) GetTenantId() *Reference
func (*LocationReference) ProtoMessage ¶
func (*LocationReference) ProtoMessage()
func (*LocationReference) ProtoReflect ¶
func (x *LocationReference) ProtoReflect() protoreflect.Message
func (*LocationReference) Reset ¶
func (x *LocationReference) Reset()
func (*LocationReference) String ¶
func (x *LocationReference) String() string
type Reference ¶
type Reference struct { // Types that are assignable to Kind: // *Reference_Context // *Reference_Field // *Reference_StringValue Kind isReference_Kind `protobuf_oneof:"Kind"` // contains filtered or unexported fields }
Reference to an ID.
func (*Reference) Descriptor
deprecated
func (*Reference) GetContext ¶
func (x *Reference) GetContext() ContextReference
func (*Reference) GetStringValue ¶
func (*Reference) ProtoMessage ¶
func (*Reference) ProtoMessage()
func (*Reference) ProtoReflect ¶
func (x *Reference) ProtoReflect() protoreflect.Message
type Reference_Context ¶
type Reference_Context struct {
Context ContextReference `protobuf:"varint,1,opt,name=context,proto3,enum=cacheroach.capabilities.ContextReference,oneof"`
}
type Reference_Field ¶
type Reference_Field struct {
Field int32 `protobuf:"varint,2,opt,name=field,proto3,oneof"`
}
type Reference_StringValue ¶
type Reference_StringValue struct { // A literal string value. StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` }
type Rule ¶
type Rule struct { // Types that are assignable to Kind: // *Rule_Eq_ // *Rule_Not // *Rule_Never // *Rule_And_ // *Rule_Or_ // *Rule_AuthStatus_ // *Rule_May // *Rule_Direction // *Rule_IsSubset Kind isRule_Kind `protobuf_oneof:"Kind"` // A message to be returned to the user explaining the rule. Message string `protobuf:"bytes,15,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) GetAuthStatus ¶
func (x *Rule) GetAuthStatus() Rule_AuthStatus
func (*Rule) GetDirection ¶
func (*Rule) GetIsSubset ¶
func (*Rule) GetMay ¶
func (x *Rule) GetMay() *SessionReference
func (*Rule) GetMessage ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type Rule_And ¶
type Rule_And struct { Rule []*Rule `protobuf:"bytes,1,rep,name=rule,proto3" json:"rule,omitempty"` // contains filtered or unexported fields }
func (*Rule_And) Descriptor
deprecated
func (*Rule_And) ProtoMessage ¶
func (*Rule_And) ProtoMessage()
func (*Rule_And) ProtoReflect ¶
func (x *Rule_And) ProtoReflect() protoreflect.Message
type Rule_And_ ¶
type Rule_And_ struct { // Conjunction. And *Rule_And `protobuf:"bytes,4,opt,name=and,proto3,oneof"` }
type Rule_AuthStatus ¶
type Rule_AuthStatus int32
const ( // Require credentials. Rule_LOGGED_IN Rule_AuthStatus = 0 // Always allow access, even to unauthenticated callers. Rule_PUBLIC Rule_AuthStatus = 1 // Require super-token access. This is the default. Rule_SUPER Rule_AuthStatus = 2 )
func (Rule_AuthStatus) Descriptor ¶
func (Rule_AuthStatus) Descriptor() protoreflect.EnumDescriptor
func (Rule_AuthStatus) Enum ¶
func (x Rule_AuthStatus) Enum() *Rule_AuthStatus
func (Rule_AuthStatus) EnumDescriptor
deprecated
func (Rule_AuthStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use Rule_AuthStatus.Descriptor instead.
func (Rule_AuthStatus) Number ¶
func (x Rule_AuthStatus) Number() protoreflect.EnumNumber
func (Rule_AuthStatus) String ¶
func (x Rule_AuthStatus) String() string
func (Rule_AuthStatus) Type ¶
func (Rule_AuthStatus) Type() protoreflect.EnumType
type Rule_AuthStatus_ ¶
type Rule_AuthStatus_ struct { // General authentication status. AuthStatus Rule_AuthStatus `protobuf:"varint,6,opt,name=auth_status,json=authStatus,proto3,enum=cacheroach.capabilities.Rule_AuthStatus,oneof"` }
type Rule_Direction ¶
type Rule_Direction struct { // The request direction. Direction Direction `protobuf:"varint,8,opt,name=direction,proto3,enum=cacheroach.capabilities.Direction,oneof"` }
type Rule_Eq ¶
type Rule_Eq struct { A *Reference `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"` B *Reference `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*Rule_Eq) Descriptor
deprecated
func (*Rule_Eq) ProtoMessage ¶
func (*Rule_Eq) ProtoMessage()
func (*Rule_Eq) ProtoReflect ¶
func (x *Rule_Eq) ProtoReflect() protoreflect.Message
type Rule_Eq_ ¶
type Rule_Eq_ struct { // Requires equality. Eq *Rule_Eq `protobuf:"bytes,1,opt,name=eq,proto3,oneof"` }
type Rule_IsSubset ¶
type Rule_IsSubset struct { // Applies to session.Session; indicates that the session must be a // subset of the principal's scopes. IsSubset bool `protobuf:"varint,9,opt,name=is_subset,json=isSubset,proto3,oneof"` }
type Rule_May ¶
type Rule_May struct {
May *SessionReference `protobuf:"bytes,7,opt,name=may,proto3,oneof"`
}
type Rule_Never ¶
type Rule_Never struct { // A rule that never matches. Never bool `protobuf:"varint,3,opt,name=never,proto3,oneof"` }
type Rule_Not ¶
type Rule_Not struct { // Inverts the enclosed rule. Not *Rule `protobuf:"bytes,2,opt,name=not,proto3,oneof"` }
type Rule_Or ¶
type Rule_Or struct { Rule []*Rule `protobuf:"bytes,1,rep,name=rule,proto3" json:"rule,omitempty"` // contains filtered or unexported fields }
func (*Rule_Or) Descriptor
deprecated
func (*Rule_Or) ProtoMessage ¶
func (*Rule_Or) ProtoMessage()
func (*Rule_Or) ProtoReflect ¶
func (x *Rule_Or) ProtoReflect() protoreflect.Message
type Rule_Or_ ¶
type Rule_Or_ struct { // Disjunction. Or *Rule_Or `protobuf:"bytes,5,opt,name=or,proto3,oneof"` }
type ScopeReference ¶
type ScopeReference struct { // Types that are assignable to Kind: // *ScopeReference_SuperToken // *ScopeReference_OnPrincipal // *ScopeReference_OnLocation Kind isScopeReference_Kind `protobuf_oneof:"Kind"` // contains filtered or unexported fields }
Analog of session.Scope.
func (*ScopeReference) Descriptor
deprecated
func (*ScopeReference) Descriptor() ([]byte, []int)
Deprecated: Use ScopeReference.ProtoReflect.Descriptor instead.
func (*ScopeReference) GetKind ¶
func (m *ScopeReference) GetKind() isScopeReference_Kind
func (*ScopeReference) GetOnLocation ¶
func (x *ScopeReference) GetOnLocation() *LocationReference
func (*ScopeReference) GetOnPrincipal ¶
func (x *ScopeReference) GetOnPrincipal() *Reference
func (*ScopeReference) GetSuperToken ¶
func (x *ScopeReference) GetSuperToken() bool
func (*ScopeReference) ProtoMessage ¶
func (*ScopeReference) ProtoMessage()
func (*ScopeReference) ProtoReflect ¶
func (x *ScopeReference) ProtoReflect() protoreflect.Message
func (*ScopeReference) Reset ¶
func (x *ScopeReference) Reset()
func (*ScopeReference) String ¶
func (x *ScopeReference) String() string
type ScopeReference_OnLocation ¶
type ScopeReference_OnLocation struct {
OnLocation *LocationReference `protobuf:"bytes,3,opt,name=on_location,json=onLocation,proto3,oneof"`
}
type ScopeReference_OnPrincipal ¶
type ScopeReference_OnPrincipal struct {
OnPrincipal *Reference `protobuf:"bytes,2,opt,name=on_principal,json=onPrincipal,proto3,oneof"`
}
type ScopeReference_SuperToken ¶
type ScopeReference_SuperToken struct {
SuperToken bool `protobuf:"varint,1,opt,name=super_token,json=superToken,proto3,oneof"`
}
type SessionReference ¶
type SessionReference struct { Capabilities *Capabilities `protobuf:"bytes,2,opt,name=capabilities,proto3" json:"capabilities,omitempty"` Scope *ScopeReference `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"` // contains filtered or unexported fields }
Analog of session.Session.
func (*SessionReference) Descriptor
deprecated
func (*SessionReference) Descriptor() ([]byte, []int)
Deprecated: Use SessionReference.ProtoReflect.Descriptor instead.
func (*SessionReference) GetCapabilities ¶
func (x *SessionReference) GetCapabilities() *Capabilities
func (*SessionReference) GetScope ¶
func (x *SessionReference) GetScope() *ScopeReference
func (*SessionReference) ProtoMessage ¶
func (*SessionReference) ProtoMessage()
func (*SessionReference) ProtoReflect ¶
func (x *SessionReference) ProtoReflect() protoreflect.Message
func (*SessionReference) Reset ¶
func (x *SessionReference) Reset()
func (*SessionReference) String ¶
func (x *SessionReference) String() string