middlewarev1

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MiddlewareName_name = map[int32]string{
		0:  "MIDDLEWARE_NAME_UNSPECIFIED",
		1:  "MIDDLEWARE_NAME_LOGGING",
		2:  "MIDDLEWARE_NAME_RECOVERY",
		3:  "MIDDLEWARE_NAME_TRACING",
		4:  "MIDDLEWARE_NAME_CIRCUIT_BREAKER",
		5:  "MIDDLEWARE_NAME_METADATA",
		6:  "MIDDLEWARE_NAME_JWT",
		7:  "MIDDLEWARE_NAME_RATE_LIMITER",
		8:  "MIDDLEWARE_NAME_METRICS",
		9:  "MIDDLEWARE_NAME_VALIDATOR",
		10: "MIDDLEWARE_NAME_SELECTOR",
		11: "MIDDLEWARE_NAME_CUSTOMIZE",
	}
	MiddlewareName_value = map[string]int32{
		"MIDDLEWARE_NAME_UNSPECIFIED":     0,
		"MIDDLEWARE_NAME_LOGGING":         1,
		"MIDDLEWARE_NAME_RECOVERY":        2,
		"MIDDLEWARE_NAME_TRACING":         3,
		"MIDDLEWARE_NAME_CIRCUIT_BREAKER": 4,
		"MIDDLEWARE_NAME_METADATA":        5,
		"MIDDLEWARE_NAME_JWT":             6,
		"MIDDLEWARE_NAME_RATE_LIMITER":    7,
		"MIDDLEWARE_NAME_METRICS":         8,
		"MIDDLEWARE_NAME_VALIDATOR":       9,
		"MIDDLEWARE_NAME_SELECTOR":        10,
		"MIDDLEWARE_NAME_CUSTOMIZE":       11,
	}
)

Enum value maps for MiddlewareName.

View Source
var File_middleware_v1_middleware_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	EnabledMiddlewares []string               `protobuf:"bytes,1,rep,name=enabled_middlewares,proto3" json:"enabled_middlewares,omitempty"`
	Metadata           *Middleware_Metadata   `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"`
	RateLimiter        *ratelimit.RateLimiter `protobuf:"bytes,101,opt,name=rate_limiter,proto3" json:"rate_limiter,omitempty"`
	Metrics            *metrics.Metrics       `protobuf:"bytes,102,opt,name=metrics,proto3" json:"metrics,omitempty"`
	Validator          *validator.Validator   `protobuf:"bytes,103,opt,name=validator,proto3" json:"validator,omitempty"`
	Jwt                *jwt.JWT               `protobuf:"bytes,104,opt,name=jwt,proto3" json:"jwt,omitempty"`
	Selector           *selector.Selector     `protobuf:"bytes,105,opt,name=selector,proto3" json:"selector,omitempty"`
	// contains filtered or unexported fields
}

Middleware middleware is used to middlewareure middleware for entry

func (*Middleware) Descriptor deprecated

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

Deprecated: Use Middleware.ProtoReflect.Descriptor instead.

func (*Middleware) GetEnabledMiddlewares

func (x *Middleware) GetEnabledMiddlewares() []string

func (*Middleware) GetJwt

func (x *Middleware) GetJwt() *jwt.JWT

func (*Middleware) GetMetadata

func (x *Middleware) GetMetadata() *Middleware_Metadata

func (*Middleware) GetMetrics

func (x *Middleware) GetMetrics() *metrics.Metrics

func (*Middleware) GetRateLimiter

func (x *Middleware) GetRateLimiter() *ratelimit.RateLimiter

func (*Middleware) GetSelector

func (x *Middleware) GetSelector() *selector.Selector

func (*Middleware) GetValidator

func (x *Middleware) GetValidator() *validator.Validator

func (*Middleware) ProtoMessage

func (*Middleware) ProtoMessage()

func (*Middleware) ProtoReflect

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

func (*Middleware) Reset

func (x *Middleware) Reset()

func (*Middleware) String

func (x *Middleware) String() string

func (*Middleware) Validate

func (m *Middleware) Validate() error

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

func (m *Middleware) ValidateAll() error

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

type MiddlewareMultiError

type MiddlewareMultiError []error

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

func (MiddlewareMultiError) AllErrors

func (m MiddlewareMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MiddlewareMultiError) Error

func (m MiddlewareMultiError) Error() string

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

type MiddlewareName

type MiddlewareName int32
const (
	MiddlewareName_MIDDLEWARE_NAME_UNSPECIFIED     MiddlewareName = 0
	MiddlewareName_MIDDLEWARE_NAME_LOGGING         MiddlewareName = 1
	MiddlewareName_MIDDLEWARE_NAME_RECOVERY        MiddlewareName = 2
	MiddlewareName_MIDDLEWARE_NAME_TRACING         MiddlewareName = 3
	MiddlewareName_MIDDLEWARE_NAME_CIRCUIT_BREAKER MiddlewareName = 4
	MiddlewareName_MIDDLEWARE_NAME_METADATA        MiddlewareName = 5
	MiddlewareName_MIDDLEWARE_NAME_JWT             MiddlewareName = 6
	MiddlewareName_MIDDLEWARE_NAME_RATE_LIMITER    MiddlewareName = 7
	MiddlewareName_MIDDLEWARE_NAME_METRICS         MiddlewareName = 8
	MiddlewareName_MIDDLEWARE_NAME_VALIDATOR       MiddlewareName = 9
	MiddlewareName_MIDDLEWARE_NAME_SELECTOR        MiddlewareName = 10
	MiddlewareName_MIDDLEWARE_NAME_CUSTOMIZE       MiddlewareName = 11
)

func (MiddlewareName) Descriptor

func (MiddlewareName) Enum

func (x MiddlewareName) Enum() *MiddlewareName

func (MiddlewareName) EnumDescriptor deprecated

func (MiddlewareName) EnumDescriptor() ([]byte, []int)

Deprecated: Use MiddlewareName.Descriptor instead.

func (MiddlewareName) Number

func (MiddlewareName) String

func (x MiddlewareName) String() string

func (MiddlewareName) Type

type MiddlewareValidationError

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

MiddlewareValidationError is the validation error returned by Middleware.Validate if the designated constraints aren't met.

func (MiddlewareValidationError) Cause

func (e MiddlewareValidationError) Cause() error

Cause function returns cause value.

func (MiddlewareValidationError) Error

Error satisfies the builtin error interface

func (MiddlewareValidationError) ErrorName

func (e MiddlewareValidationError) ErrorName() string

ErrorName returns error name.

func (MiddlewareValidationError) Field

Field function returns field value.

func (MiddlewareValidationError) Key

Key function returns key value.

func (MiddlewareValidationError) Reason

func (e MiddlewareValidationError) Reason() string

Reason function returns reason value.

type Middleware_Metadata

type Middleware_Metadata struct {
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Metadata prefix
	Prefixes []string `protobuf:"bytes,2,rep,name=prefixes,proto3" json:"prefixes,omitempty"`
	// Metadata data
	Data map[string]string `` /* 135-byte string literal not displayed */
	// contains filtered or unexported fields
}

Metadata

func (*Middleware_Metadata) Descriptor deprecated

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

Deprecated: Use Middleware_Metadata.ProtoReflect.Descriptor instead.

func (*Middleware_Metadata) GetData

func (x *Middleware_Metadata) GetData() map[string]string

func (*Middleware_Metadata) GetEnabled

func (x *Middleware_Metadata) GetEnabled() bool

func (*Middleware_Metadata) GetPrefixes

func (x *Middleware_Metadata) GetPrefixes() []string

func (*Middleware_Metadata) ProtoMessage

func (*Middleware_Metadata) ProtoMessage()

func (*Middleware_Metadata) ProtoReflect

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

func (*Middleware_Metadata) Reset

func (x *Middleware_Metadata) Reset()

func (*Middleware_Metadata) String

func (x *Middleware_Metadata) String() string

func (*Middleware_Metadata) Validate

func (m *Middleware_Metadata) Validate() error

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

func (m *Middleware_Metadata) ValidateAll() error

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

type Middleware_MetadataMultiError

type Middleware_MetadataMultiError []error

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

func (Middleware_MetadataMultiError) AllErrors

func (m Middleware_MetadataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (Middleware_MetadataMultiError) Error

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

type Middleware_MetadataValidationError

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

Middleware_MetadataValidationError is the validation error returned by Middleware_Metadata.Validate if the designated constraints aren't met.

func (Middleware_MetadataValidationError) Cause

Cause function returns cause value.

func (Middleware_MetadataValidationError) Error

Error satisfies the builtin error interface

func (Middleware_MetadataValidationError) ErrorName

ErrorName returns error name.

func (Middleware_MetadataValidationError) Field

Field function returns field value.

func (Middleware_MetadataValidationError) Key

Key function returns key value.

func (Middleware_MetadataValidationError) Reason

Reason function returns reason value.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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