Documentation ¶
Index ¶
- Variables
- type ResponseMap
- func (*ResponseMap) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseMap) GetBodyFormat() *v4alpha1.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
- 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
- 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() *v4alpha1.DataSource
- func (x *ResponseMapper) GetBodyFormatOverride() *v4alpha1.SubstitutionFormatString
- func (x *ResponseMapper) GetFilter() *v4alpha.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
- 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_v4alpha_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 *v4alpha1.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() *v4alpha1.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, an error is returned.
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, an error is returned.
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 *v4alpha.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 *v4alpha1.DataSource `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` BodyFormatOverride *v4alpha1.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() *v4alpha1.DataSource
func (*ResponseMapper) GetBodyFormatOverride ¶
func (x *ResponseMapper) GetBodyFormatOverride() *v4alpha1.SubstitutionFormatString
func (*ResponseMapper) GetFilter ¶
func (x *ResponseMapper) GetFilter() *v4alpha.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, an error is returned.
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.