Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetAllow() *Rules
- func (m *Config) GetConfigType() isConfig_ConfigType
- func (x *Config) GetDeny() *Rules
- 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_Allow
- type Config_Deny
- type Rule
- type RuleMultiError
- type RuleValidationError
- type Rules
- type RulesMultiError
- type RulesValidationError
Constants ¶
const (
Name = "consumerRestriction"
)
Variables ¶
var File_plugins_consumer_restriction_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Types that are assignable to ConfigType: // // *Config_Allow // *Config_Deny ConfigType isConfig_ConfigType `protobuf_oneof:"config_type"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetConfigType ¶
func (m *Config) GetConfigType() isConfig_ConfigType
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_Allow ¶
type Config_Allow struct {
Allow *Rules `protobuf:"bytes,1,opt,name=allow,proto3,oneof"`
}
type Config_Deny ¶
type Config_Deny struct {
Deny *Rules `protobuf:"bytes,2,opt,name=deny,proto3,oneof"`
}
type Rule ¶
type Rule struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // we can put other fields like methods here // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
func (*Rule) Validate ¶
Validate checks the field values on 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 (*Rule) ValidateAll ¶
ValidateAll checks the field values on 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 RuleMultiError, or nil if none found.
type RuleMultiError ¶
type RuleMultiError []error
RuleMultiError is an error wrapping multiple validation errors returned by Rule.ValidateAll() if the designated constraints aren't met.
func (RuleMultiError) AllErrors ¶
func (m RuleMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RuleMultiError) Error ¶
func (m RuleMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RuleValidationError ¶
type RuleValidationError struct {
// contains filtered or unexported fields
}
RuleValidationError is the validation error returned by Rule.Validate if the designated constraints aren't met.
func (RuleValidationError) Cause ¶
func (e RuleValidationError) Cause() error
Cause function returns cause value.
func (RuleValidationError) Error ¶
func (e RuleValidationError) Error() string
Error satisfies the builtin error interface
func (RuleValidationError) ErrorName ¶
func (e RuleValidationError) ErrorName() string
ErrorName returns error name.
func (RuleValidationError) Field ¶
func (e RuleValidationError) Field() string
Field function returns field value.
func (RuleValidationError) Key ¶
func (e RuleValidationError) Key() bool
Key function returns key value.
func (RuleValidationError) Reason ¶
func (e RuleValidationError) Reason() string
Reason function returns reason value.
type Rules ¶
type Rules struct { Rules []*Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // contains filtered or unexported fields }
This message is used to wrap a list of rules because protobuf doesn't support oneof repeated.
func (*Rules) Descriptor
deprecated
func (*Rules) ProtoMessage ¶
func (*Rules) ProtoMessage()
func (*Rules) ProtoReflect ¶
func (x *Rules) ProtoReflect() protoreflect.Message
func (*Rules) Validate ¶
Validate checks the field values on Rules 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 (*Rules) ValidateAll ¶
ValidateAll checks the field values on Rules 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 RulesMultiError, or nil if none found.
type RulesMultiError ¶
type RulesMultiError []error
RulesMultiError is an error wrapping multiple validation errors returned by Rules.ValidateAll() if the designated constraints aren't met.
func (RulesMultiError) AllErrors ¶
func (m RulesMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RulesMultiError) Error ¶
func (m RulesMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RulesValidationError ¶
type RulesValidationError struct {
// contains filtered or unexported fields
}
RulesValidationError is the validation error returned by Rules.Validate if the designated constraints aren't met.
func (RulesValidationError) Cause ¶
func (e RulesValidationError) Cause() error
Cause function returns cause value.
func (RulesValidationError) Error ¶
func (e RulesValidationError) Error() string
Error satisfies the builtin error interface
func (RulesValidationError) ErrorName ¶
func (e RulesValidationError) ErrorName() string
ErrorName returns error name.
func (RulesValidationError) Field ¶
func (e RulesValidationError) Field() string
Field function returns field value.
func (RulesValidationError) Key ¶
func (e RulesValidationError) Key() bool
Key function returns key value.
func (RulesValidationError) Reason ¶
func (e RulesValidationError) Reason() string
Reason function returns reason value.