envoy_extensions_filters_http_response_map_v4alpha

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

Cause function returns cause value.

func (ResponseMapPerRouteValidationError) Error

Error satisfies the builtin error interface

func (ResponseMapPerRouteValidationError) ErrorName

ErrorName returns error name.

func (ResponseMapPerRouteValidationError) Field

Field function returns field value.

func (ResponseMapPerRouteValidationError) Key

Key function returns key value.

func (ResponseMapPerRouteValidationError) Reason

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

Cause function returns cause value.

func (ResponseMapValidationError) Error

Error satisfies the builtin error interface

func (ResponseMapValidationError) ErrorName

func (e ResponseMapValidationError) ErrorName() string

ErrorName returns error name.

func (ResponseMapValidationError) Field

Field function returns field value.

func (ResponseMapValidationError) Key

Key function returns key value.

func (ResponseMapValidationError) Reason

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

Cause function returns cause value.

func (ResponseMapperValidationError) Error

Error satisfies the builtin error interface

func (ResponseMapperValidationError) ErrorName

func (e ResponseMapperValidationError) ErrorName() string

ErrorName returns error name.

func (ResponseMapperValidationError) Field

Field function returns field value.

func (ResponseMapperValidationError) Key

Key function returns key value.

func (ResponseMapperValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL