middlewarev1

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_runtime_middleware_v1_middleware_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Logging

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

func (*Logging) Descriptor deprecated

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

Deprecated: Use Logging.ProtoReflect.Descriptor instead.

func (*Logging) ProtoMessage

func (*Logging) ProtoMessage()

func (*Logging) ProtoReflect

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

func (*Logging) Reset

func (x *Logging) Reset()

func (*Logging) String

func (x *Logging) String() string

func (*Logging) Validate

func (m *Logging) Validate() error

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

func (m *Logging) ValidateAll() error

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

type LoggingMultiError

type LoggingMultiError []error

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

func (LoggingMultiError) AllErrors

func (m LoggingMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoggingMultiError) Error

func (m LoggingMultiError) Error() string

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

type LoggingValidationError

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

LoggingValidationError is the validation error returned by Logging.Validate if the designated constraints aren't met.

func (LoggingValidationError) Cause

func (e LoggingValidationError) Cause() error

Cause function returns cause value.

func (LoggingValidationError) Error

func (e LoggingValidationError) Error() string

Error satisfies the builtin error interface

func (LoggingValidationError) ErrorName

func (e LoggingValidationError) ErrorName() string

ErrorName returns error name.

func (LoggingValidationError) Field

func (e LoggingValidationError) Field() string

Field function returns field value.

func (LoggingValidationError) Key

func (e LoggingValidationError) Key() bool

Key function returns key value.

func (LoggingValidationError) Reason

func (e LoggingValidationError) Reason() string

Reason function returns reason value.

type Metadata

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

Metadata configuration for the middleware.

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetData

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

func (*Metadata) GetPrefixes

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

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

func (*Metadata) Validate

func (m *Metadata) Validate() error

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

func (m *Metadata) ValidateAll() error

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

type MetadataMultiError

type MetadataMultiError []error

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

func (MetadataMultiError) AllErrors

func (m MetadataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MetadataMultiError) Error

func (m MetadataMultiError) Error() string

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

type MetadataValidationError

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

MetadataValidationError is the validation error returned by Metadata.Validate if the designated constraints aren't met.

func (MetadataValidationError) Cause

func (e MetadataValidationError) Cause() error

Cause function returns cause value.

func (MetadataValidationError) Error

func (e MetadataValidationError) Error() string

Error satisfies the builtin error interface

func (MetadataValidationError) ErrorName

func (e MetadataValidationError) ErrorName() string

ErrorName returns error name.

func (MetadataValidationError) Field

func (e MetadataValidationError) Field() string

Field function returns field value.

func (MetadataValidationError) Key

func (e MetadataValidationError) Key() bool

Key function returns key value.

func (MetadataValidationError) Reason

func (e MetadataValidationError) Reason() string

Reason function returns reason value.

type MiddlewareConfig

type MiddlewareConfig struct {
	Enabled        bool                           `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Name           string                         `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Type           string                         `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	RateLimiter    *ratelimit.RateLimiter         `protobuf:"bytes,4,opt,name=rate_limiter,proto3,oneof" json:"rate_limiter,omitempty"`
	Metrics        *metrics.Metrics               `protobuf:"bytes,5,opt,name=metrics,proto3,oneof" json:"metrics,omitempty"`
	Validator      *validator.Validator           `protobuf:"bytes,6,opt,name=validator,proto3,oneof" json:"validator,omitempty"`
	Jwt            *jwt.JWT                       `protobuf:"bytes,7,opt,name=jwt,proto3,oneof" json:"jwt,omitempty"`
	Selector       *selector.Selector             `protobuf:"bytes,8,opt,name=selector,proto3,oneof" json:"selector,omitempty"`
	Cors           *cors.Cors                     `protobuf:"bytes,9,opt,name=cors,proto3,oneof" json:"cors,omitempty"`
	CircuitBreaker *circuitbreaker.CircuitBreaker `protobuf:"bytes,10,opt,name=circuit_breaker,proto3,oneof" json:"circuit_breaker,omitempty"`
	Logging        *Logging                       `protobuf:"bytes,11,opt,name=logging,proto3,oneof" json:"logging,omitempty"`
	Recovery       *Recovery                      `protobuf:"bytes,12,opt,name=recovery,proto3,oneof" json:"recovery,omitempty"`
	Metadata       *Metadata                      `protobuf:"bytes,13,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"`
	// Using Extension.Config for custom middlewares, moved to last
	Customize *v1.Extension_Config `protobuf:"bytes,100,opt,name=customize,proto3,oneof" json:"customize,omitempty"` // Add other specific middleware types here as they are defined
	// contains filtered or unexported fields
}

MiddlewareConfig represents a single middleware configuration with an enable switch.

func (*MiddlewareConfig) Descriptor deprecated

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

Deprecated: Use MiddlewareConfig.ProtoReflect.Descriptor instead.

func (*MiddlewareConfig) GetCircuitBreaker

func (x *MiddlewareConfig) GetCircuitBreaker() *circuitbreaker.CircuitBreaker

func (*MiddlewareConfig) GetCors

func (x *MiddlewareConfig) GetCors() *cors.Cors

func (*MiddlewareConfig) GetCustomize

func (x *MiddlewareConfig) GetCustomize() *v1.Extension_Config

func (*MiddlewareConfig) GetEnabled

func (x *MiddlewareConfig) GetEnabled() bool

func (*MiddlewareConfig) GetJwt

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

func (*MiddlewareConfig) GetLogging

func (x *MiddlewareConfig) GetLogging() *Logging

func (*MiddlewareConfig) GetMetadata

func (x *MiddlewareConfig) GetMetadata() *Metadata

func (*MiddlewareConfig) GetMetrics

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

func (*MiddlewareConfig) GetName

func (x *MiddlewareConfig) GetName() string

func (*MiddlewareConfig) GetRateLimiter

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

func (*MiddlewareConfig) GetRecovery

func (x *MiddlewareConfig) GetRecovery() *Recovery

func (*MiddlewareConfig) GetSelector

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

func (*MiddlewareConfig) GetType

func (x *MiddlewareConfig) GetType() string

func (*MiddlewareConfig) GetValidator

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

func (*MiddlewareConfig) ProtoMessage

func (*MiddlewareConfig) ProtoMessage()

func (*MiddlewareConfig) ProtoReflect

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

func (*MiddlewareConfig) Reset

func (x *MiddlewareConfig) Reset()

func (*MiddlewareConfig) String

func (x *MiddlewareConfig) String() string

func (*MiddlewareConfig) Validate

func (m *MiddlewareConfig) Validate() error

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

func (m *MiddlewareConfig) ValidateAll() error

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

type MiddlewareConfigMultiError

type MiddlewareConfigMultiError []error

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

func (MiddlewareConfigMultiError) AllErrors

func (m MiddlewareConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MiddlewareConfigMultiError) Error

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

type MiddlewareConfigValidationError

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

MiddlewareConfigValidationError is the validation error returned by MiddlewareConfig.Validate if the designated constraints aren't met.

func (MiddlewareConfigValidationError) Cause

Cause function returns cause value.

func (MiddlewareConfigValidationError) Error

Error satisfies the builtin error interface

func (MiddlewareConfigValidationError) ErrorName

ErrorName returns error name.

func (MiddlewareConfigValidationError) Field

Field function returns field value.

func (MiddlewareConfigValidationError) Key

Key function returns key value.

func (MiddlewareConfigValidationError) Reason

Reason function returns reason value.

type Middlewares

type Middlewares struct {

	// A list of middleware configurations to be applied in order.
	Middlewares []*MiddlewareConfig `protobuf:"bytes,1,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// contains filtered or unexported fields
}

Middlewares is used to configure a chain of middlewares for an entry point.

func (*Middlewares) Descriptor deprecated

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

Deprecated: Use Middlewares.ProtoReflect.Descriptor instead.

func (*Middlewares) GetMiddlewares

func (x *Middlewares) GetMiddlewares() []*MiddlewareConfig

func (*Middlewares) ProtoMessage

func (*Middlewares) ProtoMessage()

func (*Middlewares) ProtoReflect

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

func (*Middlewares) Reset

func (x *Middlewares) Reset()

func (*Middlewares) String

func (x *Middlewares) String() string

func (*Middlewares) Validate

func (m *Middlewares) Validate() error

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

func (m *Middlewares) ValidateAll() error

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

type MiddlewaresMultiError

type MiddlewaresMultiError []error

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

func (MiddlewaresMultiError) AllErrors

func (m MiddlewaresMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MiddlewaresMultiError) Error

func (m MiddlewaresMultiError) Error() string

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

type MiddlewaresValidationError

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

MiddlewaresValidationError is the validation error returned by Middlewares.Validate if the designated constraints aren't met.

func (MiddlewaresValidationError) Cause

Cause function returns cause value.

func (MiddlewaresValidationError) Error

Error satisfies the builtin error interface

func (MiddlewaresValidationError) ErrorName

func (e MiddlewaresValidationError) ErrorName() string

ErrorName returns error name.

func (MiddlewaresValidationError) Field

Field function returns field value.

func (MiddlewaresValidationError) Key

Key function returns key value.

func (MiddlewaresValidationError) Reason

Reason function returns reason value.

type Recovery

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

func (*Recovery) Descriptor deprecated

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

Deprecated: Use Recovery.ProtoReflect.Descriptor instead.

func (*Recovery) ProtoMessage

func (*Recovery) ProtoMessage()

func (*Recovery) ProtoReflect

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

func (*Recovery) Reset

func (x *Recovery) Reset()

func (*Recovery) String

func (x *Recovery) String() string

func (*Recovery) Validate

func (m *Recovery) Validate() error

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

func (m *Recovery) ValidateAll() error

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

type RecoveryMultiError

type RecoveryMultiError []error

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

func (RecoveryMultiError) AllErrors

func (m RecoveryMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RecoveryMultiError) Error

func (m RecoveryMultiError) Error() string

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

type RecoveryValidationError

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

RecoveryValidationError is the validation error returned by Recovery.Validate if the designated constraints aren't met.

func (RecoveryValidationError) Cause

func (e RecoveryValidationError) Cause() error

Cause function returns cause value.

func (RecoveryValidationError) Error

func (e RecoveryValidationError) Error() string

Error satisfies the builtin error interface

func (RecoveryValidationError) ErrorName

func (e RecoveryValidationError) ErrorName() string

ErrorName returns error name.

func (RecoveryValidationError) Field

func (e RecoveryValidationError) Field() string

Field function returns field value.

func (RecoveryValidationError) Key

func (e RecoveryValidationError) Key() bool

Key function returns key value.

func (RecoveryValidationError) Reason

func (e RecoveryValidationError) Reason() string

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