Documentation
¶
Index ¶
- Variables
- type Logging
- type LoggingMultiError
- type LoggingValidationError
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetData() map[string]string
- func (x *Metadata) GetPrefixes() []string
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- func (m *Metadata) Validate() error
- func (m *Metadata) ValidateAll() error
- type MetadataMultiError
- type MetadataValidationError
- type Middleware
- func (*Middleware) Descriptor() ([]byte, []int)deprecated
- func (x *Middleware) GetCircuitBreaker() *v16.CircuitBreaker
- func (x *Middleware) GetCors() *v15.Cors
- func (x *Middleware) GetEnabled() bool
- func (x *Middleware) GetJwt() *v13.JWT
- func (x *Middleware) GetLogging() *Logging
- func (x *Middleware) GetMetadata() *Metadata
- func (x *Middleware) GetMetrics() *v11.Metrics
- func (x *Middleware) GetName() string
- func (x *Middleware) GetRateLimiter() *v1.RateLimiter
- func (x *Middleware) GetRecovery() *Recovery
- func (x *Middleware) GetSecurity() *Security
- func (x *Middleware) GetSelector() *v14.Selector
- func (x *Middleware) GetSettings() *structpb.Struct
- func (x *Middleware) GetType() string
- func (x *Middleware) GetValidator() *v12.Validator
- func (*Middleware) ProtoMessage()
- func (x *Middleware) ProtoReflect() protoreflect.Message
- func (x *Middleware) Reset()
- func (x *Middleware) String() string
- func (m *Middleware) Validate() error
- func (m *Middleware) ValidateAll() error
- type MiddlewareMultiError
- type MiddlewareValidationError
- type Middlewares
- func (*Middlewares) Descriptor() ([]byte, []int)deprecated
- func (x *Middlewares) GetConfigs() []*Middleware
- func (*Middlewares) ProtoMessage()
- func (x *Middlewares) ProtoReflect() protoreflect.Message
- func (x *Middlewares) Reset()
- func (x *Middlewares) String() string
- func (m *Middlewares) Validate() error
- func (m *Middlewares) ValidateAll() error
- type MiddlewaresMultiError
- type MiddlewaresValidationError
- func (e MiddlewaresValidationError) Cause() error
- func (e MiddlewaresValidationError) Error() string
- func (e MiddlewaresValidationError) ErrorName() string
- func (e MiddlewaresValidationError) Field() string
- func (e MiddlewaresValidationError) Key() bool
- func (e MiddlewaresValidationError) Reason() string
- type Recovery
- type RecoveryMultiError
- type RecoveryValidationError
- type Security
- func (*Security) Descriptor() ([]byte, []int)deprecated
- func (x *Security) GetDefaultPolicy() string
- func (*Security) ProtoMessage()
- func (x *Security) ProtoReflect() protoreflect.Message
- func (x *Security) Reset()
- func (x *Security) String() string
- func (m *Security) Validate() error
- func (m *Security) ValidateAll() error
- type SecurityMultiError
- type SecurityValidationError
Constants ¶
This section is empty.
Variables ¶
var File_config_middleware_v1_middleware_proto protoreflect.FileDescriptor
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) ProtoMessage ¶
func (*Logging) ProtoMessage()
func (*Logging) ProtoReflect ¶
func (x *Logging) ProtoReflect() protoreflect.Message
func (*Logging) Validate ¶
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 ¶
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) GetPrefixes ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
func (*Metadata) Validate ¶
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 ¶
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 ¶
func (e MiddlewareValidationError) Error() string
Error satisfies the builtin error interface
func (MiddlewareValidationError) ErrorName ¶
func (e MiddlewareValidationError) ErrorName() string
ErrorName returns error name.
func (MiddlewareValidationError) Field ¶
func (e MiddlewareValidationError) Field() string
Field function returns field value.
func (MiddlewareValidationError) Key ¶
func (e MiddlewareValidationError) Key() bool
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 ¶
func (e MiddlewaresValidationError) Cause() error
Cause function returns cause value.
func (MiddlewaresValidationError) Error ¶
func (e MiddlewaresValidationError) Error() string
Error satisfies the builtin error interface
func (MiddlewaresValidationError) ErrorName ¶
func (e MiddlewaresValidationError) ErrorName() string
ErrorName returns error name.
func (MiddlewaresValidationError) Field ¶
func (e MiddlewaresValidationError) Field() string
Field function returns field value.
func (MiddlewaresValidationError) Key ¶
func (e MiddlewaresValidationError) Key() bool
Key function returns key value.
func (MiddlewaresValidationError) Reason ¶
func (e MiddlewaresValidationError) Reason() string
Reason function returns reason value.
type Recovery ¶
type Recovery struct {
// contains filtered or unexported fields
}
func (*Recovery) Descriptor
deprecated
func (*Recovery) ProtoMessage ¶
func (*Recovery) ProtoMessage()
func (*Recovery) ProtoReflect ¶
func (x *Recovery) ProtoReflect() protoreflect.Message
func (*Recovery) Validate ¶
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 ¶
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) GetDefaultPolicy ¶ added in v0.2.13
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) Validate ¶ added in v0.2.13
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
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.