local_response_policyv3

package
v0.0.0-...-9e07b7e Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type LocalResponsePolicy

type LocalResponsePolicy struct {

	// Optional new local reply body text. It will be used
	// in the “%LOCAL_REPLY_BODY%“ command operator in the “body_format“.
	Body *v3.DataSource `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// Optional body format to be used for this response. If “body_format“ is  not
	// provided, and “body“ is, the contents of “body“ will be used to populate
	// the body of the local reply without formatting.
	BodyFormat *v3.SubstitutionFormatString `protobuf:"bytes,2,opt,name=body_format,json=bodyFormat,proto3" json:"body_format,omitempty"`
	// The new response status code if specified.
	StatusCode *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	// HTTP headers to add to the response. This allows the
	// response policy to append, to add or to override headers of
	// the original response for local body, or the custom response from the
	// remote body, before it is sent to a downstream client.
	ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
	// contains filtered or unexported fields
}

Custom response policy to serve a locally stored response to the downstream.

func (*LocalResponsePolicy) Descriptor deprecated

func (*LocalResponsePolicy) Descriptor() ([]byte, []int)

Deprecated: Use LocalResponsePolicy.ProtoReflect.Descriptor instead.

func (*LocalResponsePolicy) GetBody

func (x *LocalResponsePolicy) GetBody() *v3.DataSource

func (*LocalResponsePolicy) GetBodyFormat

func (x *LocalResponsePolicy) GetBodyFormat() *v3.SubstitutionFormatString

func (*LocalResponsePolicy) GetResponseHeadersToAdd

func (x *LocalResponsePolicy) GetResponseHeadersToAdd() []*v3.HeaderValueOption

func (*LocalResponsePolicy) GetStatusCode

func (x *LocalResponsePolicy) GetStatusCode() *wrapperspb.UInt32Value

func (*LocalResponsePolicy) ProtoMessage

func (*LocalResponsePolicy) ProtoMessage()

func (*LocalResponsePolicy) ProtoReflect

func (x *LocalResponsePolicy) ProtoReflect() protoreflect.Message

func (*LocalResponsePolicy) Reset

func (x *LocalResponsePolicy) Reset()

func (*LocalResponsePolicy) String

func (x *LocalResponsePolicy) String() string

func (*LocalResponsePolicy) Validate

func (m *LocalResponsePolicy) Validate() error

Validate checks the field values on LocalResponsePolicy 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 (*LocalResponsePolicy) ValidateAll

func (m *LocalResponsePolicy) ValidateAll() error

ValidateAll checks the field values on LocalResponsePolicy 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 LocalResponsePolicyMultiError, or nil if none found.

type LocalResponsePolicyMultiError

type LocalResponsePolicyMultiError []error

LocalResponsePolicyMultiError is an error wrapping multiple validation errors returned by LocalResponsePolicy.ValidateAll() if the designated constraints aren't met.

func (LocalResponsePolicyMultiError) AllErrors

func (m LocalResponsePolicyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LocalResponsePolicyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type LocalResponsePolicyValidationError

type LocalResponsePolicyValidationError struct {
	// contains filtered or unexported fields
}

LocalResponsePolicyValidationError is the validation error returned by LocalResponsePolicy.Validate if the designated constraints aren't met.

func (LocalResponsePolicyValidationError) Cause

Cause function returns cause value.

func (LocalResponsePolicyValidationError) Error

Error satisfies the builtin error interface

func (LocalResponsePolicyValidationError) ErrorName

ErrorName returns error name.

func (LocalResponsePolicyValidationError) Field

Field function returns field value.

func (LocalResponsePolicyValidationError) Key

Key function returns key value.

func (LocalResponsePolicyValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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