middlewarev1

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_middleware_v1_middleware_proto protoreflect.FileDescriptor
View Source
var File_config_middleware_v1_security_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 Middleware

type Middleware struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The 'type' field determines which configuration block to use.
	// For built-in types, specify "logging", "recovery", "rate_limiter", etc.
	// For custom types, specify the registered name of the custom middleware.
	// When a custom type is used, its configuration should be placed in the 'customize' field.
	Type           string              `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Enabled        bool                `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"`
	RateLimiter    *v1.RateLimiter     `protobuf:"bytes,4,opt,name=rate_limiter,proto3,oneof" json:"rate_limiter,omitempty"`
	Metrics        *v11.Metrics        `protobuf:"bytes,5,opt,name=metrics,proto3,oneof" json:"metrics,omitempty"`
	Validator      *v12.Validator      `protobuf:"bytes,6,opt,name=validator,proto3,oneof" json:"validator,omitempty"`
	Jwt            *v13.JWT            `protobuf:"bytes,7,opt,name=jwt,proto3,oneof" json:"jwt,omitempty"`
	Selector       *v14.Selector       `protobuf:"bytes,8,opt,name=selector,proto3,oneof" json:"selector,omitempty"`
	Cors           *v15.Cors           `protobuf:"bytes,9,opt,name=cors,proto3,oneof" json:"cors,omitempty"`
	CircuitBreaker *v16.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"`
	Security       *Security           `protobuf:"bytes,14,opt,name=security,proto3,oneof" json:"security,omitempty"`
	Settings       *structpb.Struct    `protobuf:"bytes,100,opt,name=settings,proto3,oneof" json:"settings,omitempty"` // Add other specific middleware types here as they are defined
	// contains filtered or unexported fields
}

Middleware represents a single middleware configuration with an enable switch.

func (*Middleware) Descriptor deprecated

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

Deprecated: Use Middleware.ProtoReflect.Descriptor instead.

func (*Middleware) GetCircuitBreaker

func (x *Middleware) GetCircuitBreaker() *v16.CircuitBreaker

func (*Middleware) GetCors

func (x *Middleware) GetCors() *v15.Cors

func (*Middleware) GetEnabled

func (x *Middleware) GetEnabled() bool

func (*Middleware) GetJwt

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

func (*Middleware) GetLogging

func (x *Middleware) GetLogging() *Logging

func (*Middleware) GetMetadata

func (x *Middleware) GetMetadata() *Metadata

func (*Middleware) GetMetrics

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

func (*Middleware) GetName

func (x *Middleware) GetName() string

func (*Middleware) GetRateLimiter

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

func (*Middleware) GetRecovery

func (x *Middleware) GetRecovery() *Recovery

func (*Middleware) GetSecurity added in v0.2.13

func (x *Middleware) GetSecurity() *Security

func (*Middleware) GetSelector

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

func (*Middleware) GetSettings added in v0.2.17

func (x *Middleware) GetSettings() *structpb.Struct

func (*Middleware) GetType

func (x *Middleware) GetType() string

func (*Middleware) GetValidator

func (x *Middleware) GetValidator() *v12.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 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 Middlewares

type Middlewares struct {

	// A list of middleware configurations to be applied in order.
	Configs []*Middleware `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,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) GetConfigs

func (x *Middlewares) GetConfigs() []*Middleware

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.

type Security added in v0.2.13

type Security struct {

	// The name of the default security policy to apply if a route does not specify one.
	// If not set, and a route has no policy, access will be denied.
	DefaultPolicy string `protobuf:"bytes,1,opt,name=default_policy,proto3" json:"default_policy,omitempty"`
	// contains filtered or unexported fields
}

Security defines the configuration for the declarative security middleware.

func (*Security) Descriptor deprecated added in v0.2.13

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

Deprecated: Use Security.ProtoReflect.Descriptor instead.

func (*Security) GetDefaultPolicy added in v0.2.13

func (x *Security) GetDefaultPolicy() string

func (*Security) ProtoMessage added in v0.2.13

func (*Security) ProtoMessage()

func (*Security) ProtoReflect added in v0.2.13

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

func (*Security) Reset added in v0.2.13

func (x *Security) Reset()

func (*Security) String added in v0.2.13

func (x *Security) String() string

func (*Security) Validate added in v0.2.13

func (m *Security) Validate() error

Validate checks the field values on Security 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 (*Security) ValidateAll added in v0.2.13

func (m *Security) ValidateAll() error

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

type SecurityMultiError added in v0.2.13

type SecurityMultiError []error

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

func (SecurityMultiError) AllErrors added in v0.2.13

func (m SecurityMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SecurityMultiError) Error added in v0.2.13

func (m SecurityMultiError) Error() string

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

type SecurityValidationError added in v0.2.13

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

SecurityValidationError is the validation error returned by Security.Validate if the designated constraints aren't met.

func (SecurityValidationError) Cause added in v0.2.13

func (e SecurityValidationError) Cause() error

Cause function returns cause value.

func (SecurityValidationError) Error added in v0.2.13

func (e SecurityValidationError) Error() string

Error satisfies the builtin error interface

func (SecurityValidationError) ErrorName added in v0.2.13

func (e SecurityValidationError) ErrorName() string

ErrorName returns error name.

func (SecurityValidationError) Field added in v0.2.13

func (e SecurityValidationError) Field() string

Field function returns field value.

func (SecurityValidationError) Key added in v0.2.13

func (e SecurityValidationError) Key() bool

Key function returns key value.

func (SecurityValidationError) Reason added in v0.2.13

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