Documentation ¶
Index ¶
- Variables
- type UriTemplateRewriteConfig
- func (*UriTemplateRewriteConfig) Descriptor() ([]byte, []int)deprecated
- func (x *UriTemplateRewriteConfig) GetPathTemplateRewrite() string
- func (*UriTemplateRewriteConfig) ProtoMessage()
- func (x *UriTemplateRewriteConfig) ProtoReflect() protoreflect.Message
- func (x *UriTemplateRewriteConfig) Reset()
- func (x *UriTemplateRewriteConfig) String() string
- func (m *UriTemplateRewriteConfig) Validate() error
- func (m *UriTemplateRewriteConfig) ValidateAll() error
- type UriTemplateRewriteConfigMultiError
- type UriTemplateRewriteConfigValidationError
- func (e UriTemplateRewriteConfigValidationError) Cause() error
- func (e UriTemplateRewriteConfigValidationError) Error() string
- func (e UriTemplateRewriteConfigValidationError) ErrorName() string
- func (e UriTemplateRewriteConfigValidationError) Field() string
- func (e UriTemplateRewriteConfigValidationError) Key() bool
- func (e UriTemplateRewriteConfigValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_path_rewrite_uri_template_v3_uri_template_rewrite_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type UriTemplateRewriteConfig ¶
type UriTemplateRewriteConfig struct { PathTemplateRewrite string `protobuf:"bytes,1,opt,name=path_template_rewrite,json=pathTemplateRewrite,proto3" json:"path_template_rewrite,omitempty"` // contains filtered or unexported fields }
Indicates that during forwarding, portions of the path that match the pattern should be rewritten, even allowing the substitution of variables from the match pattern into the new path as specified by the rewrite template. This is useful to allow application paths to be rewritten in a way that is aware of segments with variable content like identifiers. The router filter will place the original path as it was before the rewrite into the :ref:`x-envoy-original-path <config_http_filters_router_x-envoy-original-path>` header.
Only one of :ref:`prefix_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.prefix_rewrite>`, :ref:`regex_rewrite <envoy_v3_api_field_config.route.v3.RouteAction.regex_rewrite>`, or *path_template_rewrite* may be specified.
Template pattern matching types:
* “*“ : Matches a single path component, up to the next path separator: /
* “**“ : Matches zero or more path segments. If present, must be the last operator.
* “{name} or {name=*}“ : A named variable matching one path segment up to the next path separator: /.
- “{name=videos/*}“ : A named variable matching more than one path segment. The path component matching videos/* is captured as the named variable.
* “{name=**}“ : A named variable matching zero or more path segments.
Only named matches can be used to perform rewrites.
Examples using path_template_rewrite:
The pattern “/{one}/{two}“ paired with a substitution string of “/{two}/{one}“ would transform “/cat/dog“ into “/dog/cat“.
The pattern “/videos/{language=lang/*}/*“ paired with a substitution string of “/{language}“ would transform “/videos/lang/en/video.m4s“ into “lang/en“.
The path pattern “/content/{format}/{lang}/{id}/{file}.vtt“ paired with a substitution string of “/{lang}/{format}/{file}.vtt“ would transform “/content/hls/en-us/12345/en_193913.vtt“ into “/en-us/hls/en_193913.vtt“.
func (*UriTemplateRewriteConfig) Descriptor
deprecated
func (*UriTemplateRewriteConfig) Descriptor() ([]byte, []int)
Deprecated: Use UriTemplateRewriteConfig.ProtoReflect.Descriptor instead.
func (*UriTemplateRewriteConfig) GetPathTemplateRewrite ¶
func (x *UriTemplateRewriteConfig) GetPathTemplateRewrite() string
func (*UriTemplateRewriteConfig) ProtoMessage ¶
func (*UriTemplateRewriteConfig) ProtoMessage()
func (*UriTemplateRewriteConfig) ProtoReflect ¶
func (x *UriTemplateRewriteConfig) ProtoReflect() protoreflect.Message
func (*UriTemplateRewriteConfig) Reset ¶
func (x *UriTemplateRewriteConfig) Reset()
func (*UriTemplateRewriteConfig) String ¶
func (x *UriTemplateRewriteConfig) String() string
func (*UriTemplateRewriteConfig) Validate ¶
func (m *UriTemplateRewriteConfig) Validate() error
Validate checks the field values on UriTemplateRewriteConfig 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 (*UriTemplateRewriteConfig) ValidateAll ¶
func (m *UriTemplateRewriteConfig) ValidateAll() error
ValidateAll checks the field values on UriTemplateRewriteConfig 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 UriTemplateRewriteConfigMultiError, or nil if none found.
type UriTemplateRewriteConfigMultiError ¶
type UriTemplateRewriteConfigMultiError []error
UriTemplateRewriteConfigMultiError is an error wrapping multiple validation errors returned by UriTemplateRewriteConfig.ValidateAll() if the designated constraints aren't met.
func (UriTemplateRewriteConfigMultiError) AllErrors ¶
func (m UriTemplateRewriteConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UriTemplateRewriteConfigMultiError) Error ¶
func (m UriTemplateRewriteConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UriTemplateRewriteConfigValidationError ¶
type UriTemplateRewriteConfigValidationError struct {
// contains filtered or unexported fields
}
UriTemplateRewriteConfigValidationError is the validation error returned by UriTemplateRewriteConfig.Validate if the designated constraints aren't met.
func (UriTemplateRewriteConfigValidationError) Cause ¶
func (e UriTemplateRewriteConfigValidationError) Cause() error
Cause function returns cause value.
func (UriTemplateRewriteConfigValidationError) Error ¶
func (e UriTemplateRewriteConfigValidationError) Error() string
Error satisfies the builtin error interface
func (UriTemplateRewriteConfigValidationError) ErrorName ¶
func (e UriTemplateRewriteConfigValidationError) ErrorName() string
ErrorName returns error name.
func (UriTemplateRewriteConfigValidationError) Field ¶
func (e UriTemplateRewriteConfigValidationError) Field() string
Field function returns field value.
func (UriTemplateRewriteConfigValidationError) Key ¶
func (e UriTemplateRewriteConfigValidationError) Key() bool
Key function returns key value.
func (UriTemplateRewriteConfigValidationError) Reason ¶
func (e UriTemplateRewriteConfigValidationError) Reason() string
Reason function returns reason value.