v1

package
v0.0.0-...-2911148 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ratelimit_config_v1_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	Domain      string        `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	Descriptors []*Descriptor `protobuf:"bytes,2,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
	// contains filtered or unexported fields
}

This is the proto representaion of https://github.com/envoyproxy/ratelimit/blob/8d6488ead8618ce49a492858321dae946f2d97bc/src/config/config_impl.go#L16-L33. This is manually syncronized. TODO(dio): Parse https://github.com/envoyproxy/ratelimit/blob/main/src/config/config_impl.go and generate this message (always to sync with main).

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetDescriptors

func (x *Config) GetDescriptors() []*Descriptor

func (*Config) GetDomain

func (x *Config) GetDomain() string

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 Descriptor

type Descriptor struct {
	Key         string        `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value       string        `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	RateLimit   *RateLimit    `protobuf:"bytes,3,opt,name=rate_limit,json=rateLimit,proto3" json:"rate_limit,omitempty"`
	Descriptors []*Descriptor `protobuf:"bytes,4,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
	ShadowMode  bool          `protobuf:"varint,5,opt,name=shadow_mode,json=shadowMode,proto3" json:"shadow_mode,omitempty"`
	// contains filtered or unexported fields
}

func (*Descriptor) Descriptor deprecated

func (*Descriptor) Descriptor() ([]byte, []int)

Deprecated: Use Descriptor.ProtoReflect.Descriptor instead.

func (*Descriptor) GetDescriptors

func (x *Descriptor) GetDescriptors() []*Descriptor

func (*Descriptor) GetKey

func (x *Descriptor) GetKey() string

func (*Descriptor) GetRateLimit

func (x *Descriptor) GetRateLimit() *RateLimit

func (*Descriptor) GetShadowMode

func (x *Descriptor) GetShadowMode() bool

func (*Descriptor) GetValue

func (x *Descriptor) GetValue() string

func (*Descriptor) ProtoMessage

func (*Descriptor) ProtoMessage()

func (*Descriptor) ProtoReflect

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

func (*Descriptor) Reset

func (x *Descriptor) Reset()

func (*Descriptor) String

func (x *Descriptor) String() string

func (*Descriptor) Validate

func (m *Descriptor) Validate() error

Validate checks the field values on Descriptor 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 (*Descriptor) ValidateAll

func (m *Descriptor) ValidateAll() error

ValidateAll checks the field values on Descriptor 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 DescriptorMultiError, or nil if none found.

type DescriptorMultiError

type DescriptorMultiError []error

DescriptorMultiError is an error wrapping multiple validation errors returned by Descriptor.ValidateAll() if the designated constraints aren't met.

func (DescriptorMultiError) AllErrors

func (m DescriptorMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DescriptorMultiError) Error

func (m DescriptorMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DescriptorValidationError

type DescriptorValidationError struct {
	// contains filtered or unexported fields
}

DescriptorValidationError is the validation error returned by Descriptor.Validate if the designated constraints aren't met.

func (DescriptorValidationError) Cause

func (e DescriptorValidationError) Cause() error

Cause function returns cause value.

func (DescriptorValidationError) Error

Error satisfies the builtin error interface

func (DescriptorValidationError) ErrorName

func (e DescriptorValidationError) ErrorName() string

ErrorName returns error name.

func (DescriptorValidationError) Field

Field function returns field value.

func (DescriptorValidationError) Key

Key function returns key value.

func (DescriptorValidationError) Reason

func (e DescriptorValidationError) Reason() string

Reason function returns reason value.

type RateLimit

type RateLimit struct {
	RequestsPerUnit uint32 `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"`
	Unit            string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"`
	Unlimited       bool   `protobuf:"varint,3,opt,name=unlimited,proto3" json:"unlimited,omitempty"`
	// contains filtered or unexported fields
}

func (*RateLimit) Descriptor deprecated

func (*RateLimit) Descriptor() ([]byte, []int)

Deprecated: Use RateLimit.ProtoReflect.Descriptor instead.

func (*RateLimit) GetRequestsPerUnit

func (x *RateLimit) GetRequestsPerUnit() uint32

func (*RateLimit) GetUnit

func (x *RateLimit) GetUnit() string

func (*RateLimit) GetUnlimited

func (x *RateLimit) GetUnlimited() bool

func (*RateLimit) ProtoMessage

func (*RateLimit) ProtoMessage()

func (*RateLimit) ProtoReflect

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

func (*RateLimit) Reset

func (x *RateLimit) Reset()

func (*RateLimit) String

func (x *RateLimit) String() string

func (*RateLimit) Validate

func (m *RateLimit) Validate() error

Validate checks the field values on RateLimit 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 (*RateLimit) ValidateAll

func (m *RateLimit) ValidateAll() error

ValidateAll checks the field values on RateLimit 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 RateLimitMultiError, or nil if none found.

type RateLimitMultiError

type RateLimitMultiError []error

RateLimitMultiError is an error wrapping multiple validation errors returned by RateLimit.ValidateAll() if the designated constraints aren't met.

func (RateLimitMultiError) AllErrors

func (m RateLimitMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RateLimitMultiError) Error

func (m RateLimitMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type RateLimitValidationError

type RateLimitValidationError struct {
	// contains filtered or unexported fields
}

RateLimitValidationError is the validation error returned by RateLimit.Validate if the designated constraints aren't met.

func (RateLimitValidationError) Cause

func (e RateLimitValidationError) Cause() error

Cause function returns cause value.

func (RateLimitValidationError) Error

func (e RateLimitValidationError) Error() string

Error satisfies the builtin error interface

func (RateLimitValidationError) ErrorName

func (e RateLimitValidationError) ErrorName() string

ErrorName returns error name.

func (RateLimitValidationError) Field

func (e RateLimitValidationError) Field() string

Field function returns field value.

func (RateLimitValidationError) Key

Key function returns key value.

func (RateLimitValidationError) Reason

func (e RateLimitValidationError) 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