transformation

package
v1.16.0-beta26 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 22 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TransformationTemplate_RequestBodyParse_name = map[int32]string{
		0: "ParseAsJson",
		1: "DontParse",
	}
	TransformationTemplate_RequestBodyParse_value = map[string]int32{
		"ParseAsJson": 0,
		"DontParse":   1,
	}
)

Enum value maps for TransformationTemplate_RequestBodyParse.

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_transformation_parameters_proto protoreflect.FileDescriptor
View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_transformation_transformation_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Extraction added in v1.15.0

type Extraction struct {

	// The source of the extraction
	//
	// Types that are assignable to Source:
	//
	//	*Extraction_Header
	//	*Extraction_Body
	Source isExtraction_Source `protobuf_oneof:"source"`
	// Only strings matching this regular expression will be part of the
	// extraction. This regex **must match the entire source** in order for a value to be extracted.
	// The most simple value for this field is '.*', which matches the
	// whole source. The field is required. If extraction fails the result is an
	// empty value.
	Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"`
	// If your regex contains capturing groups, use this field to determine which
	// group should be selected.
	Subgroup uint32 `protobuf:"varint,3,opt,name=subgroup,proto3" json:"subgroup,omitempty"`
	// contains filtered or unexported fields
}

Extractions can be used to extract information from the request/response. The extracted information can then be referenced in template fields.

func (*Extraction) Clone added in v1.15.0

func (m *Extraction) Clone() proto.Message

Clone function

func (*Extraction) Descriptor deprecated added in v1.15.0

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

Deprecated: Use Extraction.ProtoReflect.Descriptor instead.

func (*Extraction) Equal added in v1.15.0

func (m *Extraction) Equal(that interface{}) bool

Equal function

func (*Extraction) GetBody added in v1.15.0

func (x *Extraction) GetBody() *empty.Empty

func (*Extraction) GetHeader added in v1.15.0

func (x *Extraction) GetHeader() string

func (*Extraction) GetRegex added in v1.15.0

func (x *Extraction) GetRegex() string

func (*Extraction) GetSource added in v1.15.0

func (m *Extraction) GetSource() isExtraction_Source

func (*Extraction) GetSubgroup added in v1.15.0

func (x *Extraction) GetSubgroup() uint32

func (*Extraction) Hash added in v1.15.0

func (m *Extraction) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Extraction) ProtoMessage added in v1.15.0

func (*Extraction) ProtoMessage()

func (*Extraction) ProtoReflect added in v1.15.0

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

func (*Extraction) Reset added in v1.15.0

func (x *Extraction) Reset()

func (*Extraction) String added in v1.15.0

func (x *Extraction) String() string

type Extraction_Body added in v1.15.0

type Extraction_Body struct {
	// Extract information from the request/response body
	Body *empty.Empty `protobuf:"bytes,4,opt,name=body,proto3,oneof"`
}

type Extraction_Header added in v1.15.0

type Extraction_Header struct {
	// Extract information from headers
	Header string `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}

type HeaderBodyTransform added in v1.15.0

type HeaderBodyTransform struct {

	// When transforming a request, setting this to true will additionally add "queryString",
	// "queryStringParameters", "multiValueQueryStringParameters", "httpMethod", "path",
	// and "multiValueHeaders" to the body
	AddRequestMetadata bool `protobuf:"varint,1,opt,name=add_request_metadata,json=addRequestMetadata,proto3" json:"add_request_metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*HeaderBodyTransform) Clone added in v1.15.0

func (m *HeaderBodyTransform) Clone() proto.Message

Clone function

func (*HeaderBodyTransform) Descriptor deprecated added in v1.15.0

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

Deprecated: Use HeaderBodyTransform.ProtoReflect.Descriptor instead.

func (*HeaderBodyTransform) Equal added in v1.15.0

func (m *HeaderBodyTransform) Equal(that interface{}) bool

Equal function

func (*HeaderBodyTransform) GetAddRequestMetadata added in v1.15.0

func (x *HeaderBodyTransform) GetAddRequestMetadata() bool

func (*HeaderBodyTransform) Hash added in v1.15.0

func (m *HeaderBodyTransform) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*HeaderBodyTransform) ProtoMessage added in v1.15.0

func (*HeaderBodyTransform) ProtoMessage()

func (*HeaderBodyTransform) ProtoReflect added in v1.15.0

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

func (*HeaderBodyTransform) Reset added in v1.15.0

func (x *HeaderBodyTransform) Reset()

func (*HeaderBodyTransform) String added in v1.15.0

func (x *HeaderBodyTransform) String() string

type InjaTemplate added in v1.15.0

type InjaTemplate struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Defines an [Inja template](https://github.com/pantor/inja) that will be rendered by Gloo. In addition to the core template functions, the Gloo transformation filter defines the following custom functions: - header(header_name): returns the value of the header with the given name. - extraction(extractor_name): returns the value of the extractor with the given name. - env(env_var_name): returns the value of the environment variable with the given name. - body(): returns the request/response body. - context(): returns the base JSON context (allowing for example to range on a JSON body that is an array). - request_header(header_name): returns the value of the request header with the given name. Use this option when you want to include request header values in response transformations. - base64_encode(string): encodes the input string to base64. - base64_decode(string): decodes the input string from base64. - substring(string, start_pos, substring_len): returns a substring of the input string, starting at `start_pos` and extending for `substring_len` characters. If no `substring_len` is provided or `substring_len` is <= 0, the substring extends to the end of the input string.

func (*InjaTemplate) Clone added in v1.15.0

func (m *InjaTemplate) Clone() proto.Message

Clone function

func (*InjaTemplate) Descriptor deprecated added in v1.15.0

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

Deprecated: Use InjaTemplate.ProtoReflect.Descriptor instead.

func (*InjaTemplate) Equal added in v1.15.0

func (m *InjaTemplate) Equal(that interface{}) bool

Equal function

func (*InjaTemplate) GetText added in v1.15.0

func (x *InjaTemplate) GetText() string

func (*InjaTemplate) Hash added in v1.15.0

func (m *InjaTemplate) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*InjaTemplate) ProtoMessage added in v1.15.0

func (*InjaTemplate) ProtoMessage()

func (*InjaTemplate) ProtoReflect added in v1.15.0

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

func (*InjaTemplate) Reset added in v1.15.0

func (x *InjaTemplate) Reset()

func (*InjaTemplate) String added in v1.15.0

func (x *InjaTemplate) String() string

type MergeExtractorsToBody added in v1.15.0

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

func (*MergeExtractorsToBody) Clone added in v1.15.0

func (m *MergeExtractorsToBody) Clone() proto.Message

Clone function

func (*MergeExtractorsToBody) Descriptor deprecated added in v1.15.0

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

Deprecated: Use MergeExtractorsToBody.ProtoReflect.Descriptor instead.

func (*MergeExtractorsToBody) Equal added in v1.15.0

func (m *MergeExtractorsToBody) Equal(that interface{}) bool

Equal function

func (*MergeExtractorsToBody) Hash added in v1.15.0

func (m *MergeExtractorsToBody) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*MergeExtractorsToBody) ProtoMessage added in v1.15.0

func (*MergeExtractorsToBody) ProtoMessage()

func (*MergeExtractorsToBody) ProtoReflect added in v1.15.0

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

func (*MergeExtractorsToBody) Reset added in v1.15.0

func (x *MergeExtractorsToBody) Reset()

func (*MergeExtractorsToBody) String added in v1.15.0

func (x *MergeExtractorsToBody) String() string

type Parameters

type Parameters struct {

	// headers that will be used to extract data for processing output templates
	// Gloo will search for parameters by their name in header value strings, enclosed in single
	// curly braces
	// Example:
	//
	//	extensions:
	//	  parameters:
	//	      headers:
	//	        x-user-id: '{userId}'
	Headers map[string]string `` /* 155-byte string literal not displayed */
	// part of the (or the entire) path that will be used extract data for processing output templates
	// Gloo will search for parameters by their name in header value strings, enclosed in single
	// curly braces
	// Example:
	//
	//	extensions:
	//	  parameters:
	//	      path: /users/{ userId }
	Path *wrappers.StringValue `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*Parameters) Clone added in v1.8.24

func (m *Parameters) Clone() proto.Message

Clone function

func (*Parameters) Descriptor deprecated

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

Deprecated: Use Parameters.ProtoReflect.Descriptor instead.

func (*Parameters) Equal

func (m *Parameters) Equal(that interface{}) bool

Equal function

func (*Parameters) GetHeaders

func (x *Parameters) GetHeaders() map[string]string

func (*Parameters) GetPath

func (x *Parameters) GetPath() *wrappers.StringValue

func (*Parameters) Hash added in v1.2.13

func (m *Parameters) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Parameters) ProtoMessage

func (*Parameters) ProtoMessage()

func (*Parameters) ProtoReflect added in v1.6.0

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

func (*Parameters) Reset

func (x *Parameters) Reset()

func (*Parameters) String

func (x *Parameters) String() string

type Passthrough added in v1.15.0

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

func (*Passthrough) Clone added in v1.15.0

func (m *Passthrough) Clone() proto.Message

Clone function

func (*Passthrough) Descriptor deprecated added in v1.15.0

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

Deprecated: Use Passthrough.ProtoReflect.Descriptor instead.

func (*Passthrough) Equal added in v1.15.0

func (m *Passthrough) Equal(that interface{}) bool

Equal function

func (*Passthrough) Hash added in v1.15.0

func (m *Passthrough) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Passthrough) ProtoMessage added in v1.15.0

func (*Passthrough) ProtoMessage()

func (*Passthrough) ProtoReflect added in v1.15.0

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

func (*Passthrough) Reset added in v1.15.0

func (x *Passthrough) Reset()

func (*Passthrough) String added in v1.15.0

func (x *Passthrough) String() string

type RequestMatch added in v1.4.6

type RequestMatch struct {

	// Matches on the request properties.
	Matcher *matchers.Matcher `protobuf:"bytes,1,opt,name=matcher,proto3" json:"matcher,omitempty"`
	// Should we clear the route cache if a transformation was matched.
	ClearRouteCache bool `protobuf:"varint,2,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
	// Transformation to apply on the request.
	RequestTransformation *Transformation `protobuf:"bytes,3,opt,name=request_transformation,json=requestTransformation,proto3" json:"request_transformation,omitempty"`
	// Transformation to apply on the response.
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*RequestMatch) Clone added in v1.8.24

func (m *RequestMatch) Clone() proto.Message

Clone function

func (*RequestMatch) Descriptor deprecated added in v1.4.6

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

Deprecated: Use RequestMatch.ProtoReflect.Descriptor instead.

func (*RequestMatch) Equal added in v1.4.6

func (m *RequestMatch) Equal(that interface{}) bool

Equal function

func (*RequestMatch) GetClearRouteCache added in v1.4.6

func (x *RequestMatch) GetClearRouteCache() bool

func (*RequestMatch) GetMatcher added in v1.4.6

func (x *RequestMatch) GetMatcher() *matchers.Matcher

func (*RequestMatch) GetRequestTransformation added in v1.4.6

func (x *RequestMatch) GetRequestTransformation() *Transformation

func (*RequestMatch) GetResponseTransformation added in v1.4.6

func (x *RequestMatch) GetResponseTransformation() *Transformation

func (*RequestMatch) Hash added in v1.4.6

func (m *RequestMatch) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RequestMatch) ProtoMessage added in v1.4.6

func (*RequestMatch) ProtoMessage()

func (*RequestMatch) ProtoReflect added in v1.6.0

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

func (*RequestMatch) Reset added in v1.4.6

func (x *RequestMatch) Reset()

func (*RequestMatch) String added in v1.4.6

func (x *RequestMatch) String() string

type RequestResponseTransformations added in v1.4.6

type RequestResponseTransformations struct {

	// Transformations to apply on the request. The first request that matches will apply.
	RequestTransforms []*RequestMatch `protobuf:"bytes,1,rep,name=request_transforms,json=requestTransforms,proto3" json:"request_transforms,omitempty"`
	// Transformations to apply on the response. This field is only consulted if there is no
	// response transformation in the matched `request_transforms`. i.e. Only one response transformation
	// will be executed. The first response transformation that matches will
	// apply.
	ResponseTransforms []*ResponseMatch `protobuf:"bytes,2,rep,name=response_transforms,json=responseTransforms,proto3" json:"response_transforms,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestResponseTransformations) Clone added in v1.8.24

Clone function

func (*RequestResponseTransformations) Descriptor deprecated added in v1.4.6

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

Deprecated: Use RequestResponseTransformations.ProtoReflect.Descriptor instead.

func (*RequestResponseTransformations) Equal added in v1.4.6

func (m *RequestResponseTransformations) Equal(that interface{}) bool

Equal function

func (*RequestResponseTransformations) GetRequestTransforms added in v1.4.6

func (x *RequestResponseTransformations) GetRequestTransforms() []*RequestMatch

func (*RequestResponseTransformations) GetResponseTransforms added in v1.4.6

func (x *RequestResponseTransformations) GetResponseTransforms() []*ResponseMatch

func (*RequestResponseTransformations) Hash added in v1.4.6

Hash function

func (*RequestResponseTransformations) ProtoMessage added in v1.4.6

func (*RequestResponseTransformations) ProtoMessage()

func (*RequestResponseTransformations) ProtoReflect added in v1.6.0

func (*RequestResponseTransformations) Reset added in v1.4.6

func (x *RequestResponseTransformations) Reset()

func (*RequestResponseTransformations) String added in v1.4.6

type ResponseMatch added in v1.4.6

type ResponseMatch struct {

	// Response headers to match on.
	Matchers []*matchers.HeaderMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"`
	// Response code detail to match on. To see the response code details for your usecase,
	// you can use the envoy access log %RESPONSE_CODE_DETAILS% formatter to log it.
	ResponseCodeDetails string `protobuf:"bytes,2,opt,name=response_code_details,json=responseCodeDetails,proto3" json:"response_code_details,omitempty"`
	// Transformation to apply on the response.
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ResponseMatch) Clone added in v1.8.24

func (m *ResponseMatch) Clone() proto.Message

Clone function

func (*ResponseMatch) Descriptor deprecated added in v1.4.6

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

Deprecated: Use ResponseMatch.ProtoReflect.Descriptor instead.

func (*ResponseMatch) Equal added in v1.4.6

func (m *ResponseMatch) Equal(that interface{}) bool

Equal function

func (*ResponseMatch) GetMatchers added in v1.4.6

func (x *ResponseMatch) GetMatchers() []*matchers.HeaderMatcher

func (*ResponseMatch) GetResponseCodeDetails added in v1.4.6

func (x *ResponseMatch) GetResponseCodeDetails() string

func (*ResponseMatch) GetResponseTransformation added in v1.4.6

func (x *ResponseMatch) GetResponseTransformation() *Transformation

func (*ResponseMatch) Hash added in v1.4.6

func (m *ResponseMatch) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*ResponseMatch) ProtoMessage added in v1.4.6

func (*ResponseMatch) ProtoMessage()

func (*ResponseMatch) ProtoReflect added in v1.6.0

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

func (*ResponseMatch) Reset added in v1.4.6

func (x *ResponseMatch) Reset()

func (*ResponseMatch) String added in v1.4.6

func (x *ResponseMatch) String() string

type Transformation added in v1.7.7

type Transformation struct {

	// The type of transformation to apply.
	//
	// Types that are assignable to TransformationType:
	//
	//	*Transformation_TransformationTemplate
	//	*Transformation_HeaderBodyTransform
	//	*Transformation_XsltTransformation
	TransformationType isTransformation_TransformationType `protobuf_oneof:"transformation_type"`
	// When enabled, log request/response body and headers before and after this transformation is applied.
	LogRequestResponseInfo bool `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

User-facing API for transformation.

func (*Transformation) Clone added in v1.8.24

func (m *Transformation) Clone() proto.Message

Clone function

func (*Transformation) Descriptor deprecated added in v1.7.7

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

Deprecated: Use Transformation.ProtoReflect.Descriptor instead.

func (*Transformation) Equal added in v1.7.7

func (m *Transformation) Equal(that interface{}) bool

Equal function

func (*Transformation) GetHeaderBodyTransform added in v1.7.7

func (x *Transformation) GetHeaderBodyTransform() *HeaderBodyTransform

func (*Transformation) GetLogRequestResponseInfo added in v1.14.8

func (x *Transformation) GetLogRequestResponseInfo() bool

func (*Transformation) GetTransformationTemplate added in v1.7.7

func (x *Transformation) GetTransformationTemplate() *TransformationTemplate

func (*Transformation) GetTransformationType added in v1.7.7

func (m *Transformation) GetTransformationType() isTransformation_TransformationType

func (*Transformation) GetXsltTransformation added in v1.7.7

func (x *Transformation) GetXsltTransformation() *xslt.XsltTransformation

func (*Transformation) Hash added in v1.7.7

func (m *Transformation) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Transformation) ProtoMessage added in v1.7.7

func (*Transformation) ProtoMessage()

func (*Transformation) ProtoReflect added in v1.7.7

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

func (*Transformation) Reset added in v1.7.7

func (x *Transformation) Reset()

func (*Transformation) String added in v1.7.7

func (x *Transformation) String() string

type TransformationStages added in v1.4.6

type TransformationStages struct {

	// Early transformations happen before most other options (Like Auth and Rate Limit).
	Early *RequestResponseTransformations `protobuf:"bytes,1,opt,name=early,proto3" json:"early,omitempty"`
	// Regular transformations happen after Auth and Rate limit decisions has been made.
	Regular *RequestResponseTransformations `protobuf:"bytes,2,opt,name=regular,proto3" json:"regular,omitempty"`
	// Inherit transformation config from parent. This has no affect on VirtualHost level transformations.
	// If a RouteTable or Route wants to inherit transformations from it's parent RouteTable or VirtualHost,
	// this should be set to true, else transformations from parents will not be inherited.
	// Transformations are ordered so the child's transformation gets priority, so in the case where a child
	// and parent's transformation matchers are the same, only the child's transformation will run because
	// only one transformation will run per stage.
	// Defaults to false.
	InheritTransformation bool `protobuf:"varint,3,opt,name=inherit_transformation,json=inheritTransformation,proto3" json:"inherit_transformation,omitempty"`
	// When enabled, log request/response body and headers before and after all transformations defined here are applied.\
	// This overrides the log_request_response_info field in the Transformation message.
	LogRequestResponseInfo *wrappers.BoolValue `` /* 131-byte string literal not displayed */
	// Use this field to set Inja behavior when rendering strings which contain
	// characters that would need to be escaped to be valid JSON. Note that this
	// sets the behavior for all staged transformations configured here. This setting
	// can be overridden per-transformation using the field `escape_characters` on
	// the TransformationTemplate.
	EscapeCharacters *wrappers.BoolValue `protobuf:"bytes,5,opt,name=escape_characters,json=escapeCharacters,proto3" json:"escape_characters,omitempty"`
	// contains filtered or unexported fields
}

func (*TransformationStages) Clone added in v1.8.24

func (m *TransformationStages) Clone() proto.Message

Clone function

func (*TransformationStages) Descriptor deprecated added in v1.4.6

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

Deprecated: Use TransformationStages.ProtoReflect.Descriptor instead.

func (*TransformationStages) Equal added in v1.4.6

func (m *TransformationStages) Equal(that interface{}) bool

Equal function

func (*TransformationStages) GetEarly added in v1.4.6

func (*TransformationStages) GetEscapeCharacters added in v1.15.0

func (x *TransformationStages) GetEscapeCharacters() *wrappers.BoolValue

func (*TransformationStages) GetInheritTransformation added in v1.7.7

func (x *TransformationStages) GetInheritTransformation() bool

func (*TransformationStages) GetLogRequestResponseInfo added in v1.14.8

func (x *TransformationStages) GetLogRequestResponseInfo() *wrappers.BoolValue

func (*TransformationStages) GetRegular added in v1.4.6

func (*TransformationStages) Hash added in v1.4.6

func (m *TransformationStages) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*TransformationStages) ProtoMessage added in v1.4.6

func (*TransformationStages) ProtoMessage()

func (*TransformationStages) ProtoReflect added in v1.6.0

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

func (*TransformationStages) Reset added in v1.4.6

func (x *TransformationStages) Reset()

func (*TransformationStages) String added in v1.4.6

func (x *TransformationStages) String() string

type TransformationTemplate added in v1.15.0

type TransformationTemplate struct {

	// If set to true, use JSON pointer notation (e.g. "time/start") instead of
	// dot notation (e.g. "time.start") to access JSON elements. Defaults to
	// false.
	//
	// Please note that, if set to 'true', you will need to use the `extraction`
	// function to access extractors in the template (e.g. '{{
	// extraction("my_extractor") }}'); if the default value of 'false' is used,
	// extractors will simply be available by their name (e.g. '{{ my_extractor
	// }}').
	AdvancedTemplates bool `protobuf:"varint,1,opt,name=advanced_templates,json=advancedTemplates,proto3" json:"advanced_templates,omitempty"`
	// Use this attribute to extract information from the request. It consists of
	// a map of strings to extractors. The extractor will defines which
	// information will be extracted, while the string key will provide the
	// extractor with a name. You can reference extractors by their name in
	// templates, e.g. "{{ my-extractor }}" will render to the value of the
	// "my-extractor" extractor.
	Extractors map[string]*Extraction `` /* 161-byte string literal not displayed */
	// Use this attribute to transform request/response headers. It consists of a
	// map of strings to templates. The string key determines the name of the
	// resulting header, the rendered template will determine the value. Any existing
	// headers with the same header name will be replaced by the transformed header.
	// If a header name is included in `headers` and `headers_to_append`, it will first
	// be replaced the template in `headers`, then additional header values will be appended
	// by the templates defined in `headers_to_append`.
	// For example, the following header transformation configuration:
	//
	// “`yaml
	//
	//	headers:
	//	  x-header-one: {"text": "first {{inja}} template"}
	//	  x-header-one: {"text": "second {{inja}} template"}
	//	headersToAppend:
	//	  - key: x-header-one
	//	    value: {"text": "first appended {{inja}} template"}
	//	  - key: x-header-one
	//	    value: {"text": "second appended {{inja}} template"}
	//
	// “`
	// will result in the following headers on the HTTP message:
	//
	// “`
	// x-header-one: first inja template
	// x-header-one: first appended inja template
	// x-header-one: second appended inja template
	// “`
	Headers map[string]*InjaTemplate `` /* 155-byte string literal not displayed */
	// Use this attribute to transform request/response headers. It consists of
	// an array of string/template objects. Use this attribute to define multiple
	// templates for a single header. Header template(s) defined here will be appended to any
	// existing headers with the same header name, not replace existing ones.
	// See `headers` documentation to see an example of usage.
	HeadersToAppend []*TransformationTemplate_HeaderToAppend `protobuf:"bytes,10,rep,name=headers_to_append,json=headersToAppend,proto3" json:"headers_to_append,omitempty"`
	// Attribute to remove headers from requests. If a header is present multiple
	// times, all instances of the header will be removed.
	HeadersToRemove []string `protobuf:"bytes,11,rep,name=headers_to_remove,json=headersToRemove,proto3" json:"headers_to_remove,omitempty"`
	// Determines the type of transformation to apply to the request/response body
	//
	// Types that are assignable to BodyTransformation:
	//
	//	*TransformationTemplate_Body
	//	*TransformationTemplate_Passthrough
	//	*TransformationTemplate_MergeExtractorsToBody
	BodyTransformation isTransformationTemplate_BodyTransformation `protobuf_oneof:"body_transformation"`
	// Determines how the body will be parsed. Defaults to ParseAsJson
	ParseBodyBehavior TransformationTemplate_RequestBodyParse `` /* 196-byte string literal not displayed */
	// If set to true, Envoy will not throw an exception in case the body parsing
	// fails.
	IgnoreErrorOnParse bool `protobuf:"varint,8,opt,name=ignore_error_on_parse,json=ignoreErrorOnParse,proto3" json:"ignore_error_on_parse,omitempty"`
	// Use this field to set Dynamic Metadata.
	DynamicMetadataValues []*TransformationTemplate_DynamicMetadataValue `` /* 126-byte string literal not displayed */
	// Use this field to set Inja behavior when rendering strings which contain
	// characters that would need to be escaped to be valid JSON. Note that this
	// sets the behavior for the entire transformation. Use raw_strings function
	// for fine-grained control within a template.
	EscapeCharacters *wrappers.BoolValue `protobuf:"bytes,12,opt,name=escape_characters,json=escapeCharacters,proto3" json:"escape_characters,omitempty"`
	// contains filtered or unexported fields
}

Defines a transformation template.

func (*TransformationTemplate) Clone added in v1.15.0

Clone function

func (*TransformationTemplate) Descriptor deprecated added in v1.15.0

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

Deprecated: Use TransformationTemplate.ProtoReflect.Descriptor instead.

func (*TransformationTemplate) Equal added in v1.15.0

func (m *TransformationTemplate) Equal(that interface{}) bool

Equal function

func (*TransformationTemplate) GetAdvancedTemplates added in v1.15.0

func (x *TransformationTemplate) GetAdvancedTemplates() bool

func (*TransformationTemplate) GetBody added in v1.15.0

func (x *TransformationTemplate) GetBody() *InjaTemplate

func (*TransformationTemplate) GetBodyTransformation added in v1.15.0

func (m *TransformationTemplate) GetBodyTransformation() isTransformationTemplate_BodyTransformation

func (*TransformationTemplate) GetDynamicMetadataValues added in v1.15.0

func (*TransformationTemplate) GetEscapeCharacters added in v1.15.0

func (x *TransformationTemplate) GetEscapeCharacters() *wrappers.BoolValue

func (*TransformationTemplate) GetExtractors added in v1.15.0

func (x *TransformationTemplate) GetExtractors() map[string]*Extraction

func (*TransformationTemplate) GetHeaders added in v1.15.0

func (x *TransformationTemplate) GetHeaders() map[string]*InjaTemplate

func (*TransformationTemplate) GetHeadersToAppend added in v1.15.0

func (*TransformationTemplate) GetHeadersToRemove added in v1.15.0

func (x *TransformationTemplate) GetHeadersToRemove() []string

func (*TransformationTemplate) GetIgnoreErrorOnParse added in v1.15.0

func (x *TransformationTemplate) GetIgnoreErrorOnParse() bool

func (*TransformationTemplate) GetMergeExtractorsToBody added in v1.15.0

func (x *TransformationTemplate) GetMergeExtractorsToBody() *MergeExtractorsToBody

func (*TransformationTemplate) GetParseBodyBehavior added in v1.15.0

func (*TransformationTemplate) GetPassthrough added in v1.15.0

func (x *TransformationTemplate) GetPassthrough() *Passthrough

func (*TransformationTemplate) Hash added in v1.15.0

func (m *TransformationTemplate) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*TransformationTemplate) ProtoMessage added in v1.15.0

func (*TransformationTemplate) ProtoMessage()

func (*TransformationTemplate) ProtoReflect added in v1.15.0

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

func (*TransformationTemplate) Reset added in v1.15.0

func (x *TransformationTemplate) Reset()

func (*TransformationTemplate) String added in v1.15.0

func (x *TransformationTemplate) String() string

type TransformationTemplate_Body added in v1.15.0

type TransformationTemplate_Body struct {
	// Apply a template to the body
	Body *InjaTemplate `protobuf:"bytes,4,opt,name=body,proto3,oneof"`
}

type TransformationTemplate_DynamicMetadataValue added in v1.15.0

type TransformationTemplate_DynamicMetadataValue struct {

	// The metadata namespace. Defaults to the filter namespace.
	MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"`
	// The metadata key.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// A template that determines the metadata value.
	Value *InjaTemplate `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Defines an [Envoy Dynamic Metadata](https://www.envoyproxy.io/docs/envoy/latest/configuration/advanced/well_known_dynamic_metadata) entry.

func (*TransformationTemplate_DynamicMetadataValue) Clone added in v1.15.0

Clone function

func (*TransformationTemplate_DynamicMetadataValue) Descriptor deprecated added in v1.15.0

Deprecated: Use TransformationTemplate_DynamicMetadataValue.ProtoReflect.Descriptor instead.

func (*TransformationTemplate_DynamicMetadataValue) Equal added in v1.15.0

func (m *TransformationTemplate_DynamicMetadataValue) Equal(that interface{}) bool

Equal function

func (*TransformationTemplate_DynamicMetadataValue) GetKey added in v1.15.0

func (*TransformationTemplate_DynamicMetadataValue) GetMetadataNamespace added in v1.15.0

func (x *TransformationTemplate_DynamicMetadataValue) GetMetadataNamespace() string

func (*TransformationTemplate_DynamicMetadataValue) GetValue added in v1.15.0

func (*TransformationTemplate_DynamicMetadataValue) Hash added in v1.15.0

Hash function

func (*TransformationTemplate_DynamicMetadataValue) ProtoMessage added in v1.15.0

func (*TransformationTemplate_DynamicMetadataValue) ProtoReflect added in v1.15.0

func (*TransformationTemplate_DynamicMetadataValue) Reset added in v1.15.0

func (*TransformationTemplate_DynamicMetadataValue) String added in v1.15.0

type TransformationTemplate_HeaderToAppend added in v1.15.0

type TransformationTemplate_HeaderToAppend struct {

	// Header name
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Apply a template to the header value
	Value *InjaTemplate `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Defines a header-template pair to be used in `headers_to_append`

func (*TransformationTemplate_HeaderToAppend) Clone added in v1.15.0

Clone function

func (*TransformationTemplate_HeaderToAppend) Descriptor deprecated added in v1.15.0

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

Deprecated: Use TransformationTemplate_HeaderToAppend.ProtoReflect.Descriptor instead.

func (*TransformationTemplate_HeaderToAppend) Equal added in v1.15.0

func (m *TransformationTemplate_HeaderToAppend) Equal(that interface{}) bool

Equal function

func (*TransformationTemplate_HeaderToAppend) GetKey added in v1.15.0

func (*TransformationTemplate_HeaderToAppend) GetValue added in v1.15.0

func (*TransformationTemplate_HeaderToAppend) Hash added in v1.15.0

Hash function

func (*TransformationTemplate_HeaderToAppend) ProtoMessage added in v1.15.0

func (*TransformationTemplate_HeaderToAppend) ProtoMessage()

func (*TransformationTemplate_HeaderToAppend) ProtoReflect added in v1.15.0

func (*TransformationTemplate_HeaderToAppend) Reset added in v1.15.0

func (*TransformationTemplate_HeaderToAppend) String added in v1.15.0

type TransformationTemplate_MergeExtractorsToBody added in v1.15.0

type TransformationTemplate_MergeExtractorsToBody struct {
	// Merge all defined extractors to the request/response body.
	// If you want to nest elements inside the body, use dot separator in the
	// extractor name.
	MergeExtractorsToBody *MergeExtractorsToBody `protobuf:"bytes,6,opt,name=merge_extractors_to_body,json=mergeExtractorsToBody,proto3,oneof"`
}

type TransformationTemplate_Passthrough added in v1.15.0

type TransformationTemplate_Passthrough struct {
	// This will cause the transformation filter not to buffer the body.
	// Use this setting if the response body is large and you don't need to
	// transform nor extract information from it.
	Passthrough *Passthrough `protobuf:"bytes,5,opt,name=passthrough,proto3,oneof"`
}

type TransformationTemplate_RequestBodyParse added in v1.15.0

type TransformationTemplate_RequestBodyParse int32

Determines how the body will be parsed.

const (
	// Will attempt to parse the request/response body as JSON
	TransformationTemplate_ParseAsJson TransformationTemplate_RequestBodyParse = 0
	// The request/response body will be treated as plain text
	TransformationTemplate_DontParse TransformationTemplate_RequestBodyParse = 1
)

func (TransformationTemplate_RequestBodyParse) Descriptor added in v1.15.0

func (TransformationTemplate_RequestBodyParse) Enum added in v1.15.0

func (TransformationTemplate_RequestBodyParse) EnumDescriptor deprecated added in v1.15.0

func (TransformationTemplate_RequestBodyParse) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransformationTemplate_RequestBodyParse.Descriptor instead.

func (TransformationTemplate_RequestBodyParse) Number added in v1.15.0

func (TransformationTemplate_RequestBodyParse) String added in v1.15.0

func (TransformationTemplate_RequestBodyParse) Type added in v1.15.0

type Transformation_HeaderBodyTransform added in v1.7.7

type Transformation_HeaderBodyTransform struct {
	// This type of transformation will make all the headers available in the
	// response body. The resulting JSON body will consist of two attributes:
	// 'headers', containing the headers, and 'body', containing the original
	// body.
	HeaderBodyTransform *HeaderBodyTransform `protobuf:"bytes,2,opt,name=header_body_transform,json=headerBodyTransform,proto3,oneof"`
}

type Transformation_TransformationTemplate added in v1.7.7

type Transformation_TransformationTemplate struct {
	// Apply transformation templates.
	TransformationTemplate *TransformationTemplate `protobuf:"bytes,1,opt,name=transformation_template,json=transformationTemplate,proto3,oneof"`
}

type Transformation_XsltTransformation added in v1.7.7

type Transformation_XsltTransformation struct {
	// (Enterprise Only): Xslt Transformation
	XsltTransformation *xslt.XsltTransformation `protobuf:"bytes,3,opt,name=xslt_transformation,json=xsltTransformation,proto3,oneof"`
}

type Transformations added in v1.4.6

type Transformations struct {

	// Apply a transformation to requests.
	RequestTransformation *Transformation `protobuf:"bytes,1,opt,name=request_transformation,json=requestTransformation,proto3" json:"request_transformation,omitempty"`
	// Clear the route cache if the request transformation was applied.
	ClearRouteCache bool `protobuf:"varint,3,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
	// Apply a transformation to responses.
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Transformations) Clone added in v1.8.24

func (m *Transformations) Clone() proto.Message

Clone function

func (*Transformations) Descriptor deprecated added in v1.4.6

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

Deprecated: Use Transformations.ProtoReflect.Descriptor instead.

func (*Transformations) Equal added in v1.4.6

func (m *Transformations) Equal(that interface{}) bool

Equal function

func (*Transformations) GetClearRouteCache added in v1.4.6

func (x *Transformations) GetClearRouteCache() bool

func (*Transformations) GetRequestTransformation added in v1.4.6

func (x *Transformations) GetRequestTransformation() *Transformation

func (*Transformations) GetResponseTransformation added in v1.4.6

func (x *Transformations) GetResponseTransformation() *Transformation

func (*Transformations) Hash added in v1.4.6

func (m *Transformations) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Transformations) ProtoMessage added in v1.4.6

func (*Transformations) ProtoMessage()

func (*Transformations) ProtoReflect added in v1.6.0

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

func (*Transformations) Reset added in v1.4.6

func (x *Transformations) Reset()

func (*Transformations) String added in v1.4.6

func (x *Transformations) String() string

Jump to

Keyboard shortcuts

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