Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetRule() *Config_Rule
- func (x *Config) GetToken() *Config_Token
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (m *Config) Validate() error
- func (m *Config) ValidateAll() error
- type ConfigMultiError
- type ConfigValidationError
- type Config_Rule
- func (*Config_Rule) Descriptor() ([]byte, []int)deprecated
- func (x *Config_Rule) GetModel() string
- func (x *Config_Rule) GetPolicy() string
- func (*Config_Rule) ProtoMessage()
- func (x *Config_Rule) ProtoReflect() protoreflect.Message
- func (x *Config_Rule) Reset()
- func (x *Config_Rule) String() string
- func (m *Config_Rule) Validate() error
- func (m *Config_Rule) ValidateAll() error
- type Config_RuleMultiError
- type Config_RuleValidationError
- func (e Config_RuleValidationError) Cause() error
- func (e Config_RuleValidationError) Error() string
- func (e Config_RuleValidationError) ErrorName() string
- func (e Config_RuleValidationError) Field() string
- func (e Config_RuleValidationError) Key() bool
- func (e Config_RuleValidationError) Reason() string
- type Config_Source
- func (Config_Source) Descriptor() protoreflect.EnumDescriptor
- func (x Config_Source) Enum() *Config_Source
- func (Config_Source) EnumDescriptor() ([]byte, []int)deprecated
- func (x Config_Source) Number() protoreflect.EnumNumber
- func (x Config_Source) String() string
- func (Config_Source) Type() protoreflect.EnumType
- type Config_Token
- func (*Config_Token) Descriptor() ([]byte, []int)deprecated
- func (x *Config_Token) GetName() string
- func (x *Config_Token) GetSource() Config_Source
- func (*Config_Token) ProtoMessage()
- func (x *Config_Token) ProtoReflect() protoreflect.Message
- func (x *Config_Token) Reset()
- func (x *Config_Token) String() string
- func (m *Config_Token) Validate() error
- func (m *Config_Token) ValidateAll() error
- type Config_TokenMultiError
- type Config_TokenValidationError
- func (e Config_TokenValidationError) Cause() error
- func (e Config_TokenValidationError) Error() string
- func (e Config_TokenValidationError) ErrorName() string
- func (e Config_TokenValidationError) Field() string
- func (e Config_TokenValidationError) Key() bool
- func (e Config_TokenValidationError) Reason() string
Constants ¶
const (
Name = "casbin"
)
Variables ¶
var ( Config_Source_name = map[int32]string{ 0: "HEADER", } Config_Source_value = map[string]int32{ "HEADER": 0, } )
Enum value maps for Config_Source.
var File_plugins_casbin_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Rule *Config_Rule `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"` Token *Config_Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetRule ¶
func (x *Config) GetRule() *Config_Rule
func (*Config) GetToken ¶
func (x *Config) GetToken() *Config_Token
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) Validate ¶
Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Config) ValidateAll ¶
ValidateAll checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigMultiError, or nil if none found.
type ConfigMultiError ¶
type ConfigMultiError []error
ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.
func (ConfigMultiError) AllErrors ¶
func (m ConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfigMultiError) Error ¶
func (m ConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfigValidationError ¶
type ConfigValidationError struct {
// contains filtered or unexported fields
}
ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.
func (ConfigValidationError) Cause ¶
func (e ConfigValidationError) Cause() error
Cause function returns cause value.
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
Error satisfies the builtin error interface
func (ConfigValidationError) ErrorName ¶
func (e ConfigValidationError) ErrorName() string
ErrorName returns error name.
func (ConfigValidationError) Field ¶
func (e ConfigValidationError) Field() string
Field function returns field value.
func (ConfigValidationError) Key ¶
func (e ConfigValidationError) Key() bool
Key function returns key value.
func (ConfigValidationError) Reason ¶
func (e ConfigValidationError) Reason() string
Reason function returns reason value.
type Config_Rule ¶
type Config_Rule struct { Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` Policy string `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` // contains filtered or unexported fields }
func (*Config_Rule) Descriptor
deprecated
func (*Config_Rule) Descriptor() ([]byte, []int)
Deprecated: Use Config_Rule.ProtoReflect.Descriptor instead.
func (*Config_Rule) GetModel ¶
func (x *Config_Rule) GetModel() string
func (*Config_Rule) GetPolicy ¶
func (x *Config_Rule) GetPolicy() string
func (*Config_Rule) ProtoMessage ¶
func (*Config_Rule) ProtoMessage()
func (*Config_Rule) ProtoReflect ¶
func (x *Config_Rule) ProtoReflect() protoreflect.Message
func (*Config_Rule) Reset ¶
func (x *Config_Rule) Reset()
func (*Config_Rule) String ¶
func (x *Config_Rule) String() string
func (*Config_Rule) Validate ¶
func (m *Config_Rule) Validate() error
Validate checks the field values on Config_Rule with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Config_Rule) ValidateAll ¶
func (m *Config_Rule) ValidateAll() error
ValidateAll checks the field values on Config_Rule with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in Config_RuleMultiError, or nil if none found.
type Config_RuleMultiError ¶
type Config_RuleMultiError []error
Config_RuleMultiError is an error wrapping multiple validation errors returned by Config_Rule.ValidateAll() if the designated constraints aren't met.
func (Config_RuleMultiError) AllErrors ¶
func (m Config_RuleMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (Config_RuleMultiError) Error ¶
func (m Config_RuleMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type Config_RuleValidationError ¶
type Config_RuleValidationError struct {
// contains filtered or unexported fields
}
Config_RuleValidationError is the validation error returned by Config_Rule.Validate if the designated constraints aren't met.
func (Config_RuleValidationError) Cause ¶
func (e Config_RuleValidationError) Cause() error
Cause function returns cause value.
func (Config_RuleValidationError) Error ¶
func (e Config_RuleValidationError) Error() string
Error satisfies the builtin error interface
func (Config_RuleValidationError) ErrorName ¶
func (e Config_RuleValidationError) ErrorName() string
ErrorName returns error name.
func (Config_RuleValidationError) Field ¶
func (e Config_RuleValidationError) Field() string
Field function returns field value.
func (Config_RuleValidationError) Key ¶
func (e Config_RuleValidationError) Key() bool
Key function returns key value.
func (Config_RuleValidationError) Reason ¶
func (e Config_RuleValidationError) Reason() string
Reason function returns reason value.
type Config_Source ¶
type Config_Source int32
const (
Config_HEADER Config_Source = 0
)
func (Config_Source) Descriptor ¶
func (Config_Source) Descriptor() protoreflect.EnumDescriptor
func (Config_Source) Enum ¶
func (x Config_Source) Enum() *Config_Source
func (Config_Source) EnumDescriptor
deprecated
func (Config_Source) EnumDescriptor() ([]byte, []int)
Deprecated: Use Config_Source.Descriptor instead.
func (Config_Source) Number ¶
func (x Config_Source) Number() protoreflect.EnumNumber
func (Config_Source) String ¶
func (x Config_Source) String() string
func (Config_Source) Type ¶
func (Config_Source) Type() protoreflect.EnumType
type Config_Token ¶
type Config_Token struct { Source Config_Source `protobuf:"varint,1,opt,name=source,proto3,enum=plugins.casbin.Config_Source" json:"source,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Config_Token) Descriptor
deprecated
func (*Config_Token) Descriptor() ([]byte, []int)
Deprecated: Use Config_Token.ProtoReflect.Descriptor instead.
func (*Config_Token) GetName ¶
func (x *Config_Token) GetName() string
func (*Config_Token) GetSource ¶
func (x *Config_Token) GetSource() Config_Source
func (*Config_Token) ProtoMessage ¶
func (*Config_Token) ProtoMessage()
func (*Config_Token) ProtoReflect ¶
func (x *Config_Token) ProtoReflect() protoreflect.Message
func (*Config_Token) Reset ¶
func (x *Config_Token) Reset()
func (*Config_Token) String ¶
func (x *Config_Token) String() string
func (*Config_Token) Validate ¶
func (m *Config_Token) Validate() error
Validate checks the field values on Config_Token with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Config_Token) ValidateAll ¶
func (m *Config_Token) ValidateAll() error
ValidateAll checks the field values on Config_Token with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in Config_TokenMultiError, or nil if none found.
type Config_TokenMultiError ¶
type Config_TokenMultiError []error
Config_TokenMultiError is an error wrapping multiple validation errors returned by Config_Token.ValidateAll() if the designated constraints aren't met.
func (Config_TokenMultiError) AllErrors ¶
func (m Config_TokenMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (Config_TokenMultiError) Error ¶
func (m Config_TokenMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type Config_TokenValidationError ¶
type Config_TokenValidationError struct {
// contains filtered or unexported fields
}
Config_TokenValidationError is the validation error returned by Config_Token.Validate if the designated constraints aren't met.
func (Config_TokenValidationError) Cause ¶
func (e Config_TokenValidationError) Cause() error
Cause function returns cause value.
func (Config_TokenValidationError) Error ¶
func (e Config_TokenValidationError) Error() string
Error satisfies the builtin error interface
func (Config_TokenValidationError) ErrorName ¶
func (e Config_TokenValidationError) ErrorName() string
ErrorName returns error name.
func (Config_TokenValidationError) Field ¶
func (e Config_TokenValidationError) Field() string
Field function returns field value.
func (Config_TokenValidationError) Key ¶
func (e Config_TokenValidationError) Key() bool
Key function returns key value.
func (Config_TokenValidationError) Reason ¶
func (e Config_TokenValidationError) Reason() string
Reason function returns reason value.