Documentation ¶
Index ¶
- Variables
- type LocalResponsePolicy
- func (*LocalResponsePolicy) Descriptor() ([]byte, []int)deprecated
- func (x *LocalResponsePolicy) GetBody() *v3.DataSource
- func (x *LocalResponsePolicy) GetBodyFormat() *v3.SubstitutionFormatString
- func (x *LocalResponsePolicy) GetResponseHeadersToAdd() []*v3.HeaderValueOption
- func (x *LocalResponsePolicy) GetStatusCode() *wrapperspb.UInt32Value
- func (*LocalResponsePolicy) ProtoMessage()
- func (x *LocalResponsePolicy) ProtoReflect() protoreflect.Message
- func (x *LocalResponsePolicy) Reset()
- func (x *LocalResponsePolicy) String() string
- func (m *LocalResponsePolicy) Validate() error
- func (m *LocalResponsePolicy) ValidateAll() error
- type LocalResponsePolicyMultiError
- type LocalResponsePolicyValidationError
- func (e LocalResponsePolicyValidationError) Cause() error
- func (e LocalResponsePolicyValidationError) Error() string
- func (e LocalResponsePolicyValidationError) ErrorName() string
- func (e LocalResponsePolicyValidationError) Field() string
- func (e LocalResponsePolicyValidationError) Key() bool
- func (e LocalResponsePolicyValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (m LocalResponsePolicyMultiError) Error() string
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 ¶
func (e LocalResponsePolicyValidationError) Cause() error
Cause function returns cause value.
func (LocalResponsePolicyValidationError) Error ¶
func (e LocalResponsePolicyValidationError) Error() string
Error satisfies the builtin error interface
func (LocalResponsePolicyValidationError) ErrorName ¶
func (e LocalResponsePolicyValidationError) ErrorName() string
ErrorName returns error name.
func (LocalResponsePolicyValidationError) Field ¶
func (e LocalResponsePolicyValidationError) Field() string
Field function returns field value.
func (LocalResponsePolicyValidationError) Key ¶
func (e LocalResponsePolicyValidationError) Key() bool
Key function returns key value.
func (LocalResponsePolicyValidationError) Reason ¶
func (e LocalResponsePolicyValidationError) Reason() string
Reason function returns reason value.