redirect_policyv3

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 22 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_extensions_http_custom_response_redirect_policy_v3_redirect_policy_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type RedirectPolicy

type RedirectPolicy struct {

	// Types that are assignable to RedirectActionSpecifier:
	//	*RedirectPolicy_Uri
	//	*RedirectPolicy_RedirectAction
	RedirectActionSpecifier isRedirectPolicy_RedirectActionSpecifier `protobuf_oneof:"redirect_action_specifier"`
	// The new response status code if specified. This is used to override the
	// status code of the response from the new upstream if it is not an error status.
	StatusCode *wrappers.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.
	// Note that these are not applied if the redirected response is an error
	// response.
	ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
	// HTTP headers to add to the request before it is internally redirected.
	RequestHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,5,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
	// Custom action to modify request headers before selection of the
	// redirected route.
	// [#comment: TODO(pradeepcrao) add an extension category.]
	ModifyRequestHeadersAction *v3.TypedExtensionConfig `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

Custom response policy to internally redirect the original response to a different upstream. [#next-free-field: 7]

func (*RedirectPolicy) Descriptor deprecated

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

Deprecated: Use RedirectPolicy.ProtoReflect.Descriptor instead.

func (*RedirectPolicy) GetModifyRequestHeadersAction

func (x *RedirectPolicy) GetModifyRequestHeadersAction() *v3.TypedExtensionConfig

func (*RedirectPolicy) GetRedirectAction added in v0.11.1

func (x *RedirectPolicy) GetRedirectAction() *v31.RedirectAction

func (*RedirectPolicy) GetRedirectActionSpecifier added in v0.11.1

func (m *RedirectPolicy) GetRedirectActionSpecifier() isRedirectPolicy_RedirectActionSpecifier

func (*RedirectPolicy) GetRequestHeadersToAdd

func (x *RedirectPolicy) GetRequestHeadersToAdd() []*v3.HeaderValueOption

func (*RedirectPolicy) GetResponseHeadersToAdd

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

func (*RedirectPolicy) GetStatusCode

func (x *RedirectPolicy) GetStatusCode() *wrappers.UInt32Value

func (*RedirectPolicy) GetUri added in v0.11.1

func (x *RedirectPolicy) GetUri() string

func (*RedirectPolicy) ProtoMessage

func (*RedirectPolicy) ProtoMessage()

func (*RedirectPolicy) ProtoReflect

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

func (*RedirectPolicy) Reset

func (x *RedirectPolicy) Reset()

func (*RedirectPolicy) String

func (x *RedirectPolicy) String() string

func (*RedirectPolicy) Validate

func (m *RedirectPolicy) Validate() error

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

func (m *RedirectPolicy) ValidateAll() error

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

type RedirectPolicyMultiError

type RedirectPolicyMultiError []error

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

func (RedirectPolicyMultiError) AllErrors

func (m RedirectPolicyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RedirectPolicyMultiError) Error

func (m RedirectPolicyMultiError) Error() string

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

type RedirectPolicyValidationError

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

RedirectPolicyValidationError is the validation error returned by RedirectPolicy.Validate if the designated constraints aren't met.

func (RedirectPolicyValidationError) Cause

Cause function returns cause value.

func (RedirectPolicyValidationError) Error

Error satisfies the builtin error interface

func (RedirectPolicyValidationError) ErrorName

func (e RedirectPolicyValidationError) ErrorName() string

ErrorName returns error name.

func (RedirectPolicyValidationError) Field

Field function returns field value.

func (RedirectPolicyValidationError) Key

Key function returns key value.

func (RedirectPolicyValidationError) Reason

Reason function returns reason value.

type RedirectPolicy_RedirectAction added in v0.11.1

type RedirectPolicy_RedirectAction struct {
	// Specify elements of the redirect url individually.
	// Note: Do not specify the `response_code` field in `redirect_action`, use
	// `status_code` instead.
	// The following fields in `redirect_action` are currently not supported,
	// and specifying them will cause the config to be rejected:
	// - `prefix_rewrite`
	// - `regex_rewrite`
	RedirectAction *v31.RedirectAction `protobuf:"bytes,2,opt,name=redirect_action,json=redirectAction,proto3,oneof"`
}

type RedirectPolicy_Uri added in v0.11.1

type RedirectPolicy_Uri struct {
	// The Http URI to redirect the original request to, to get the custom
	// response.
	// It should be a full FQDN with protocol, host and path.
	//
	// Example:
	//
	// .. code-block:: yaml
	//
	//    uri: https://www.mydomain.com/path/to/404.txt
	//
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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