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) GetCustomize() *structpb.Struct
- 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) GetSelector() *v14.Selector
- 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) GetMiddlewares() []*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
Constants ¶
This section is empty.
Variables ¶
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) 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 ¶ added in v0.2.7
type Middleware struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
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"`
Customize *structpb.Struct `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
}
Middleware represents a single middleware configuration with an enable switch.
func (*Middleware) Descriptor
deprecated
added in
v0.2.7
func (*Middleware) Descriptor() ([]byte, []int)
Deprecated: Use Middleware.ProtoReflect.Descriptor instead.
func (*Middleware) GetCircuitBreaker ¶ added in v0.2.7
func (x *Middleware) GetCircuitBreaker() *v16.CircuitBreaker
func (*Middleware) GetCors ¶ added in v0.2.7
func (x *Middleware) GetCors() *v15.Cors
func (*Middleware) GetCustomize ¶ added in v0.2.7
func (x *Middleware) GetCustomize() *structpb.Struct
func (*Middleware) GetEnabled ¶ added in v0.2.7
func (x *Middleware) GetEnabled() bool
func (*Middleware) GetJwt ¶ added in v0.2.7
func (x *Middleware) GetJwt() *v13.JWT
func (*Middleware) GetLogging ¶ added in v0.2.7
func (x *Middleware) GetLogging() *Logging
func (*Middleware) GetMetadata ¶ added in v0.2.7
func (x *Middleware) GetMetadata() *Metadata
func (*Middleware) GetMetrics ¶ added in v0.2.7
func (x *Middleware) GetMetrics() *v11.Metrics
func (*Middleware) GetName ¶ added in v0.2.7
func (x *Middleware) GetName() string
func (*Middleware) GetRateLimiter ¶ added in v0.2.7
func (x *Middleware) GetRateLimiter() *v1.RateLimiter
func (*Middleware) GetRecovery ¶ added in v0.2.7
func (x *Middleware) GetRecovery() *Recovery
func (*Middleware) GetSelector ¶ added in v0.2.7
func (x *Middleware) GetSelector() *v14.Selector
func (*Middleware) GetType ¶ added in v0.2.7
func (x *Middleware) GetType() string
func (*Middleware) GetValidator ¶ added in v0.2.7
func (x *Middleware) GetValidator() *v12.Validator
func (*Middleware) ProtoMessage ¶ added in v0.2.7
func (*Middleware) ProtoMessage()
func (*Middleware) ProtoReflect ¶ added in v0.2.7
func (x *Middleware) ProtoReflect() protoreflect.Message
func (*Middleware) Reset ¶ added in v0.2.7
func (x *Middleware) Reset()
func (*Middleware) String ¶ added in v0.2.7
func (x *Middleware) String() string
func (*Middleware) Validate ¶ added in v0.2.7
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 ¶ added in v0.2.7
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 ¶ added in v0.2.7
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 ¶ added in v0.2.7
func (m MiddlewareMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MiddlewareMultiError) Error ¶ added in v0.2.7
func (m MiddlewareMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MiddlewareValidationError ¶ added in v0.2.7
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 ¶ added in v0.2.7
func (e MiddlewareValidationError) Cause() error
Cause function returns cause value.
func (MiddlewareValidationError) Error ¶ added in v0.2.7
func (e MiddlewareValidationError) Error() string
Error satisfies the builtin error interface
func (MiddlewareValidationError) ErrorName ¶ added in v0.2.7
func (e MiddlewareValidationError) ErrorName() string
ErrorName returns error name.
func (MiddlewareValidationError) Field ¶ added in v0.2.7
func (e MiddlewareValidationError) Field() string
Field function returns field value.
func (MiddlewareValidationError) Key ¶ added in v0.2.7
func (e MiddlewareValidationError) Key() bool
Key function returns key value.
func (MiddlewareValidationError) Reason ¶ added in v0.2.7
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.
Middlewares []*Middleware `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() []*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.