consumer_restriction

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "consumerRestriction"
)

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetAllow

func (x *Config) GetAllow() *Rules

func (*Config) GetConfigType

func (m *Config) GetConfigType() isConfig_ConfigType

func (*Config) GetDeny

func (x *Config) GetDeny() *Rules

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

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

func (m *Config) ValidateAll() error

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) Descriptor() ([]byte, []int)

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetName

func (x *Rule) GetName() string

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

func (x *Rule) ProtoReflect() protoreflect.Message

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

func (*Rule) Validate

func (m *Rule) Validate() error

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

func (m *Rule) ValidateAll() error

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) Descriptor() ([]byte, []int)

Deprecated: Use Rules.ProtoReflect.Descriptor instead.

func (*Rules) GetRules

func (x *Rules) GetRules() []*Rule

func (*Rules) ProtoMessage

func (*Rules) ProtoMessage()

func (*Rules) ProtoReflect

func (x *Rules) ProtoReflect() protoreflect.Message

func (*Rules) Reset

func (x *Rules) Reset()

func (*Rules) String

func (x *Rules) String() string

func (*Rules) Validate

func (m *Rules) Validate() error

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

func (m *Rules) ValidateAll() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL