Documentation ¶
Index ¶
- Variables
- type ResponseMap
- func (*ResponseMap) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseMap) GetBodyFormat() *v31.SubstitutionFormatString
- func (x *ResponseMap) GetMappers() []*ResponseMapper
- func (*ResponseMap) ProtoMessage()
- func (x *ResponseMap) ProtoReflect() protoreflect.Message
- func (x *ResponseMap) Reset()
- func (x *ResponseMap) String() string
- func (m *ResponseMap) Validate() error
- func (m *ResponseMap) ValidateAll() error
- type ResponseMapMultiError
- type ResponseMapPerRoute
- func (*ResponseMapPerRoute) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseMapPerRoute) GetDisabled() bool
- func (m *ResponseMapPerRoute) GetOverride() isResponseMapPerRoute_Override
- func (x *ResponseMapPerRoute) GetResponseMap() *ResponseMap
- func (*ResponseMapPerRoute) ProtoMessage()
- func (x *ResponseMapPerRoute) ProtoReflect() protoreflect.Message
- func (x *ResponseMapPerRoute) Reset()
- func (x *ResponseMapPerRoute) String() string
- func (m *ResponseMapPerRoute) Validate() error
- func (m *ResponseMapPerRoute) ValidateAll() error
- type ResponseMapPerRouteMultiError
- type ResponseMapPerRouteValidationError
- func (e ResponseMapPerRouteValidationError) Cause() error
- func (e ResponseMapPerRouteValidationError) Error() string
- func (e ResponseMapPerRouteValidationError) ErrorName() string
- func (e ResponseMapPerRouteValidationError) Field() string
- func (e ResponseMapPerRouteValidationError) Key() bool
- func (e ResponseMapPerRouteValidationError) Reason() string
- type ResponseMapPerRoute_Disabled
- type ResponseMapPerRoute_ResponseMap
- type ResponseMapValidationError
- func (e ResponseMapValidationError) Cause() error
- func (e ResponseMapValidationError) Error() string
- func (e ResponseMapValidationError) ErrorName() string
- func (e ResponseMapValidationError) Field() string
- func (e ResponseMapValidationError) Key() bool
- func (e ResponseMapValidationError) Reason() string
- type ResponseMapper
- func (*ResponseMapper) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseMapper) GetBody() *v31.DataSource
- func (x *ResponseMapper) GetBodyFormatOverride() *v31.SubstitutionFormatString
- func (x *ResponseMapper) GetFilter() *v3.AccessLogFilter
- func (x *ResponseMapper) GetStatusCode() *wrappers.UInt32Value
- func (*ResponseMapper) ProtoMessage()
- func (x *ResponseMapper) ProtoReflect() protoreflect.Message
- func (x *ResponseMapper) Reset()
- func (x *ResponseMapper) String() string
- func (m *ResponseMapper) Validate() error
- func (m *ResponseMapper) ValidateAll() error
- type ResponseMapperMultiError
- type ResponseMapperValidationError
- func (e ResponseMapperValidationError) Cause() error
- func (e ResponseMapperValidationError) Error() string
- func (e ResponseMapperValidationError) ErrorName() string
- func (e ResponseMapperValidationError) Field() string
- func (e ResponseMapperValidationError) Key() bool
- func (e ResponseMapperValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_filters_http_response_map_v3_response_map_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ResponseMap ¶
type ResponseMap struct { // Configuration of list of mappers which allows to filter and change HTTP response. // The mappers will be checked by the specified order until one is matched. Mappers []*ResponseMapper `protobuf:"bytes,1,rep,name=mappers,proto3" json:"mappers,omitempty"` // The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>` // and to specify response content type as one of: plain/text or application/json. // // Example one: plain/text body_format. // // .. code-block:: // // text_format: %LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=$REQ(:path)% // // The following response body in `plain/text` format will be generated for a request with // local reply body of "upstream connection error", response_code=503 and path=/foo. // // .. code-block:: // // upstream connection error:503:path=/foo // // Example two: application/json body_format. // // .. code-block:: // // json_format: // status: %RESPONSE_CODE% // message: %LOCAL_REPLY_BODY% // path: $REQ(:path)% // // The following response body in "application/json" format would be generated for a request with // local reply body of "upstream connection error", response_code=503 and path=/foo. // // .. code-block:: json // // { // "status": 503, // "message": "upstream connection error", // "path": "/foo" // } // BodyFormat *v31.SubstitutionFormatString `protobuf:"bytes,2,opt,name=body_format,json=bodyFormat,proto3" json:"body_format,omitempty"` // contains filtered or unexported fields }
The configuration to customize HTTP responses read by Envoy.
func (*ResponseMap) Descriptor
deprecated
func (*ResponseMap) Descriptor() ([]byte, []int)
Deprecated: Use ResponseMap.ProtoReflect.Descriptor instead.
func (*ResponseMap) GetBodyFormat ¶
func (x *ResponseMap) GetBodyFormat() *v31.SubstitutionFormatString
func (*ResponseMap) GetMappers ¶
func (x *ResponseMap) GetMappers() []*ResponseMapper
func (*ResponseMap) ProtoMessage ¶
func (*ResponseMap) ProtoMessage()
func (*ResponseMap) ProtoReflect ¶
func (x *ResponseMap) ProtoReflect() protoreflect.Message
func (*ResponseMap) Reset ¶
func (x *ResponseMap) Reset()
func (*ResponseMap) String ¶
func (x *ResponseMap) String() string
func (*ResponseMap) Validate ¶
func (m *ResponseMap) Validate() error
Validate checks the field values on ResponseMap 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 (*ResponseMap) ValidateAll ¶
func (m *ResponseMap) ValidateAll() error
ValidateAll checks the field values on ResponseMap 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 ResponseMapMultiError, or nil if none found.
type ResponseMapMultiError ¶
type ResponseMapMultiError []error
ResponseMapMultiError is an error wrapping multiple validation errors returned by ResponseMap.ValidateAll() if the designated constraints aren't met.
func (ResponseMapMultiError) AllErrors ¶
func (m ResponseMapMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ResponseMapMultiError) Error ¶
func (m ResponseMapMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ResponseMapPerRoute ¶
type ResponseMapPerRoute struct { // Types that are assignable to Override: // *ResponseMapPerRoute_Disabled // *ResponseMapPerRoute_ResponseMap Override isResponseMapPerRoute_Override `protobuf_oneof:"override"` // contains filtered or unexported fields }
Extra settings on a per virtualhost/route/weighted-cluster level.
func (*ResponseMapPerRoute) Descriptor
deprecated
func (*ResponseMapPerRoute) Descriptor() ([]byte, []int)
Deprecated: Use ResponseMapPerRoute.ProtoReflect.Descriptor instead.
func (*ResponseMapPerRoute) GetDisabled ¶
func (x *ResponseMapPerRoute) GetDisabled() bool
func (*ResponseMapPerRoute) GetOverride ¶
func (m *ResponseMapPerRoute) GetOverride() isResponseMapPerRoute_Override
func (*ResponseMapPerRoute) GetResponseMap ¶
func (x *ResponseMapPerRoute) GetResponseMap() *ResponseMap
func (*ResponseMapPerRoute) ProtoMessage ¶
func (*ResponseMapPerRoute) ProtoMessage()
func (*ResponseMapPerRoute) ProtoReflect ¶
func (x *ResponseMapPerRoute) ProtoReflect() protoreflect.Message
func (*ResponseMapPerRoute) Reset ¶
func (x *ResponseMapPerRoute) Reset()
func (*ResponseMapPerRoute) String ¶
func (x *ResponseMapPerRoute) String() string
func (*ResponseMapPerRoute) Validate ¶
func (m *ResponseMapPerRoute) Validate() error
Validate checks the field values on ResponseMapPerRoute 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 (*ResponseMapPerRoute) ValidateAll ¶
func (m *ResponseMapPerRoute) ValidateAll() error
ValidateAll checks the field values on ResponseMapPerRoute 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 ResponseMapPerRouteMultiError, or nil if none found.
type ResponseMapPerRouteMultiError ¶
type ResponseMapPerRouteMultiError []error
ResponseMapPerRouteMultiError is an error wrapping multiple validation errors returned by ResponseMapPerRoute.ValidateAll() if the designated constraints aren't met.
func (ResponseMapPerRouteMultiError) AllErrors ¶
func (m ResponseMapPerRouteMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ResponseMapPerRouteMultiError) Error ¶
func (m ResponseMapPerRouteMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ResponseMapPerRouteValidationError ¶
type ResponseMapPerRouteValidationError struct {
// contains filtered or unexported fields
}
ResponseMapPerRouteValidationError is the validation error returned by ResponseMapPerRoute.Validate if the designated constraints aren't met.
func (ResponseMapPerRouteValidationError) Cause ¶
func (e ResponseMapPerRouteValidationError) Cause() error
Cause function returns cause value.
func (ResponseMapPerRouteValidationError) Error ¶
func (e ResponseMapPerRouteValidationError) Error() string
Error satisfies the builtin error interface
func (ResponseMapPerRouteValidationError) ErrorName ¶
func (e ResponseMapPerRouteValidationError) ErrorName() string
ErrorName returns error name.
func (ResponseMapPerRouteValidationError) Field ¶
func (e ResponseMapPerRouteValidationError) Field() string
Field function returns field value.
func (ResponseMapPerRouteValidationError) Key ¶
func (e ResponseMapPerRouteValidationError) Key() bool
Key function returns key value.
func (ResponseMapPerRouteValidationError) Reason ¶
func (e ResponseMapPerRouteValidationError) Reason() string
Reason function returns reason value.
type ResponseMapPerRoute_Disabled ¶
type ResponseMapPerRoute_Disabled struct { // Disable the response map filter for this particular vhost or route. // If disabled is specified in multiple per-filter-configs, the most specific one will be used. Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` }
type ResponseMapPerRoute_ResponseMap ¶
type ResponseMapPerRoute_ResponseMap struct { // Override the global configuration of the response map filter with this new config. ResponseMap *ResponseMap `protobuf:"bytes,2,opt,name=response_map,json=responseMap,proto3,oneof"` }
type ResponseMapValidationError ¶
type ResponseMapValidationError struct {
// contains filtered or unexported fields
}
ResponseMapValidationError is the validation error returned by ResponseMap.Validate if the designated constraints aren't met.
func (ResponseMapValidationError) Cause ¶
func (e ResponseMapValidationError) Cause() error
Cause function returns cause value.
func (ResponseMapValidationError) Error ¶
func (e ResponseMapValidationError) Error() string
Error satisfies the builtin error interface
func (ResponseMapValidationError) ErrorName ¶
func (e ResponseMapValidationError) ErrorName() string
ErrorName returns error name.
func (ResponseMapValidationError) Field ¶
func (e ResponseMapValidationError) Field() string
Field function returns field value.
func (ResponseMapValidationError) Key ¶
func (e ResponseMapValidationError) Key() bool
Key function returns key value.
func (ResponseMapValidationError) Reason ¶
func (e ResponseMapValidationError) Reason() string
Reason function returns reason value.
type ResponseMapper ¶
type ResponseMapper struct { // Filter to determine if this mapper should apply. Filter *v3.AccessLogFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // The new response status code if specified. StatusCode *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // The new body text if specified. It will be used in the `%LOCAL_REPLY_BODY%` // command operator in the `body_format`. Body *v31.DataSource `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` BodyFormatOverride *v31.SubstitutionFormatString `protobuf:"bytes,4,opt,name=body_format_override,json=bodyFormatOverride,proto3" json:"body_format_override,omitempty"` // contains filtered or unexported fields }
The configuration to filter and change local response.
func (*ResponseMapper) Descriptor
deprecated
func (*ResponseMapper) Descriptor() ([]byte, []int)
Deprecated: Use ResponseMapper.ProtoReflect.Descriptor instead.
func (*ResponseMapper) GetBody ¶
func (x *ResponseMapper) GetBody() *v31.DataSource
func (*ResponseMapper) GetBodyFormatOverride ¶
func (x *ResponseMapper) GetBodyFormatOverride() *v31.SubstitutionFormatString
func (*ResponseMapper) GetFilter ¶
func (x *ResponseMapper) GetFilter() *v3.AccessLogFilter
func (*ResponseMapper) GetStatusCode ¶
func (x *ResponseMapper) GetStatusCode() *wrappers.UInt32Value
func (*ResponseMapper) ProtoMessage ¶
func (*ResponseMapper) ProtoMessage()
func (*ResponseMapper) ProtoReflect ¶
func (x *ResponseMapper) ProtoReflect() protoreflect.Message
func (*ResponseMapper) Reset ¶
func (x *ResponseMapper) Reset()
func (*ResponseMapper) String ¶
func (x *ResponseMapper) String() string
func (*ResponseMapper) Validate ¶
func (m *ResponseMapper) Validate() error
Validate checks the field values on ResponseMapper 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 (*ResponseMapper) ValidateAll ¶
func (m *ResponseMapper) ValidateAll() error
ValidateAll checks the field values on ResponseMapper 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 ResponseMapperMultiError, or nil if none found.
type ResponseMapperMultiError ¶
type ResponseMapperMultiError []error
ResponseMapperMultiError is an error wrapping multiple validation errors returned by ResponseMapper.ValidateAll() if the designated constraints aren't met.
func (ResponseMapperMultiError) AllErrors ¶
func (m ResponseMapperMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ResponseMapperMultiError) Error ¶
func (m ResponseMapperMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ResponseMapperValidationError ¶
type ResponseMapperValidationError struct {
// contains filtered or unexported fields
}
ResponseMapperValidationError is the validation error returned by ResponseMapper.Validate if the designated constraints aren't met.
func (ResponseMapperValidationError) Cause ¶
func (e ResponseMapperValidationError) Cause() error
Cause function returns cause value.
func (ResponseMapperValidationError) Error ¶
func (e ResponseMapperValidationError) Error() string
Error satisfies the builtin error interface
func (ResponseMapperValidationError) ErrorName ¶
func (e ResponseMapperValidationError) ErrorName() string
ErrorName returns error name.
func (ResponseMapperValidationError) Field ¶
func (e ResponseMapperValidationError) Field() string
Field function returns field value.
func (ResponseMapperValidationError) Key ¶
func (e ResponseMapperValidationError) Key() bool
Key function returns key value.
func (ResponseMapperValidationError) Reason ¶
func (e ResponseMapperValidationError) Reason() string
Reason function returns reason value.