transformation

package
v1.18.0-beta23 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 25 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Extraction_Mode_name = map[int32]string{
		0: "EXTRACT",
		1: "SINGLE_REPLACE",
		2: "REPLACE_ALL",
	}
	Extraction_Mode_value = map[string]int32{
		"EXTRACT":        0,
		"SINGLE_REPLACE": 1,
		"REPLACE_ALL":    2,
	}
)

Enum value maps for Extraction_Mode.

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_external_envoy_extensions_transformation_transformation_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Extraction

type Extraction struct {

	// The source of the extraction
	//
	// Types that are assignable to Source:
	//
	//	*Extraction_Header
	//	*Extraction_Body
	Source isExtraction_Source `protobuf_oneof:"source"`
	// The regex field specifies the regular expression used for matching against the source content.
	//   - In EXTRACT mode, the entire source must match the regex. `subgroup` selects the n-th capturing group,
	//     which determines the part of the match that you want to extract. If the regex does not match the source,
	//     the result of the extraction will be an empty value.
	//   - In SINGLE_REPLACE mode, the regex also needs to match the entire source. `subgroup` selects the n-th capturing group
	//     that is replaced with the content of `replacement_text`. If the regex does not match the source, the result
	//     of the replacement will be the source itself.
	//   - In REPLACE_ALL mode, the regex is applied repeatedly to find all occurrences within the source that match.
	//     Each matching occurrence is replaced with the value in `replacement_text`. In this mode, the configuration is rejected
	//     if `subgroup` is set. If the regex does not match the source, the result of the replacement will be the source itself.
	Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"`
	// If your regex contains capturing groups, use this field to determine the
	// group that you want to select. Defaults to 0.
	// If set in `EXTRACT` and `SINGLE_REPLACE` modes, the subgroup represents the capturing
	// group that you want to extract or replace in the source.
	// The configuration is rejected if you set subgroup to a non-zero value when using thev `REPLACE_ALL` mode.
	Subgroup uint32 `protobuf:"varint,3,opt,name=subgroup,proto3" json:"subgroup,omitempty"`
	// The value `replacement_text` is used to format the substitution for matched sequences in
	// in an input string. This value is only legal in `SINGLE_REPLACE` and `REPLACE_ALL` modes.
	// - In `SINGLE_REPLACE` mode, the `subgroup` selects the n-th capturing group, which represents
	// the value that you want to replace with the string provided in `replacement_text`.
	// - In `REPLACE_ALL` mode, each sequence that matches the specified regex in the input is
	// replaced with the value in`replacement_text`.
	//
	//	The `replacement_text` can include special syntax, such as $1, $2, etc., to refer to
	//
	// capturing groups within the regular expression.
	//
	//	The value that is specified in `replacement_text` is treated as a string, and is passed
	//
	// to `std::regex_replace` as the replacement string.
	//
	//	For more informatino, see https://en.cppreference.com/w/cpp/regex/regex_replace.
	ReplacementText *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=replacement_text,json=replacementText,proto3" json:"replacement_text,omitempty"`
	// The mode of operation for the extraction.
	// Defaults to EXTRACT.
	Mode Extraction_Mode `protobuf:"varint,6,opt,name=mode,proto3,enum=envoy.api.v2.filter.http.Extraction_Mode" json:"mode,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.8.24

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

Clone function

func (*Extraction) Descriptor deprecated

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

Deprecated: Use Extraction.ProtoReflect.Descriptor instead.

func (*Extraction) Equal

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

Equal function

func (*Extraction) GetBody

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

func (*Extraction) GetHeader

func (x *Extraction) GetHeader() string

func (*Extraction) GetMode added in v1.15.24

func (x *Extraction) GetMode() Extraction_Mode

func (*Extraction) GetRegex

func (x *Extraction) GetRegex() string

func (*Extraction) GetReplacementText added in v1.15.24

func (x *Extraction) GetReplacementText() *wrapperspb.StringValue

func (*Extraction) GetSource

func (m *Extraction) GetSource() isExtraction_Source

func (*Extraction) GetSubgroup

func (x *Extraction) GetSubgroup() uint32

func (*Extraction) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*Extraction) HashUnique

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

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*Extraction) ProtoMessage

func (*Extraction) ProtoMessage()

func (*Extraction) ProtoReflect added in v1.6.0

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

func (*Extraction) Reset

func (x *Extraction) Reset()

func (*Extraction) String

func (x *Extraction) String() string

type Extraction_Body

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

type Extraction_Header

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

type Extraction_Mode added in v1.15.24

type Extraction_Mode int32

The mode of operation for the extraction.

const (
	// Default mode. Extract the content of a specified capturing group. In this mode,
	// `subgroup` selects the n-th capturing group, which represents the value that
	// you want to extract.
	Extraction_EXTRACT Extraction_Mode = 0
	// Replace the content of a specified capturing group. In this mode, `subgroup` selects the
	// n-th capturing group, which represents the value that you want to replace with
	// the string provided in `replacement_text`.
	// Note: `replacement_text` must be set for this mode.
	Extraction_SINGLE_REPLACE Extraction_Mode = 1
	// Replace all regex matches with the value provided in `replacement_text`.
	// Note: `replacement_text` must be set for this mode.
	// Note: The configuration fails if `subgroup` is set to a non-zero value.
	// Note: restrictions on the regex are different for this mode. See the regex field for more details.
	Extraction_REPLACE_ALL Extraction_Mode = 2
)

func (Extraction_Mode) Descriptor added in v1.15.24

func (Extraction_Mode) Enum added in v1.15.24

func (x Extraction_Mode) Enum() *Extraction_Mode

func (Extraction_Mode) EnumDescriptor deprecated added in v1.15.24

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

Deprecated: Use Extraction_Mode.Descriptor instead.

func (Extraction_Mode) Number added in v1.15.24

func (Extraction_Mode) String added in v1.15.24

func (x Extraction_Mode) String() string

func (Extraction_Mode) Type added in v1.15.24

type FilterTransformations

type FilterTransformations struct {

	// Specifies transformations based on the route matches. The first matched
	// transformation will be applied. If there are overlapped match conditions,
	// please put the most specific match first.
	Transformations []*TransformationRule `protobuf:"bytes,1,rep,name=transformations,proto3" json:"transformations,omitempty"`
	// Only RouteTransformations.RouteTransformation with matching stage will be
	// used with this filter.
	Stage uint32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"`
	// Logs request/response sensitive information
	// By default, this is false so no request or response sensitive information is logged.
	// If set to true, the filter will log the request/response body and headers before and
	// after any transformation is applied.
	LogRequestResponseInfo bool `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*FilterTransformations) Clone added in v1.8.24

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

Clone function

func (*FilterTransformations) Descriptor deprecated

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

Deprecated: Use FilterTransformations.ProtoReflect.Descriptor instead.

func (*FilterTransformations) Equal

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

Equal function

func (*FilterTransformations) GetLogRequestResponseInfo added in v1.14.8

func (x *FilterTransformations) GetLogRequestResponseInfo() bool

func (*FilterTransformations) GetStage added in v1.4.6

func (x *FilterTransformations) GetStage() uint32

func (*FilterTransformations) GetTransformations

func (x *FilterTransformations) GetTransformations() []*TransformationRule

func (*FilterTransformations) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*FilterTransformations) HashUnique

func (m *FilterTransformations) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*FilterTransformations) ProtoMessage

func (*FilterTransformations) ProtoMessage()

func (*FilterTransformations) ProtoReflect added in v1.6.0

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

func (*FilterTransformations) Reset

func (x *FilterTransformations) Reset()

func (*FilterTransformations) String

func (x *FilterTransformations) String() string

type HeaderBodyTransform

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.8.24

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

Clone function

func (*HeaderBodyTransform) Descriptor deprecated

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

Deprecated: Use HeaderBodyTransform.ProtoReflect.Descriptor instead.

func (*HeaderBodyTransform) Equal

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

Equal function

func (*HeaderBodyTransform) GetAddRequestMetadata added in v1.9.25

func (x *HeaderBodyTransform) GetAddRequestMetadata() bool

func (*HeaderBodyTransform) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*HeaderBodyTransform) HashUnique

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

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*HeaderBodyTransform) ProtoMessage

func (*HeaderBodyTransform) ProtoMessage()

func (*HeaderBodyTransform) ProtoReflect added in v1.6.0

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

func (*HeaderBodyTransform) Reset

func (x *HeaderBodyTransform) Reset()

func (*HeaderBodyTransform) String

func (x *HeaderBodyTransform) String() string

type InjaTemplate

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.8.24

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

Clone function

func (*InjaTemplate) Descriptor deprecated

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

Deprecated: Use InjaTemplate.ProtoReflect.Descriptor instead.

func (*InjaTemplate) Equal

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

Equal function

func (*InjaTemplate) GetText

func (x *InjaTemplate) GetText() string

func (*InjaTemplate) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*InjaTemplate) HashUnique

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

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*InjaTemplate) ProtoMessage

func (*InjaTemplate) ProtoMessage()

func (*InjaTemplate) ProtoReflect added in v1.6.0

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

func (*InjaTemplate) Reset

func (x *InjaTemplate) Reset()

func (*InjaTemplate) String

func (x *InjaTemplate) String() string

type MergeExtractorsToBody

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

func (*MergeExtractorsToBody) Clone added in v1.8.24

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

Clone function

func (*MergeExtractorsToBody) Descriptor deprecated

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

Deprecated: Use MergeExtractorsToBody.ProtoReflect.Descriptor instead.

func (*MergeExtractorsToBody) Equal

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

Equal function

func (*MergeExtractorsToBody) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*MergeExtractorsToBody) HashUnique

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

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*MergeExtractorsToBody) ProtoMessage

func (*MergeExtractorsToBody) ProtoMessage()

func (*MergeExtractorsToBody) ProtoReflect added in v1.6.0

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

func (*MergeExtractorsToBody) Reset

func (x *MergeExtractorsToBody) Reset()

func (*MergeExtractorsToBody) String

func (x *MergeExtractorsToBody) String() string

type MergeJsonKeys

type MergeJsonKeys struct {

	// Map of key name -> template to render into the JSON body.
	// Specified keys which don't exist in the JSON body will be set,
	// keys which do exist will be overriden.
	//
	// For example, given the following JSON body:
	// {
	// "key1": "value1"
	// }
	// and the following MergeJsonKeys:
	// {
	// "key1": "{{ header("header1") }}",
	// "key2": "{{ header("header2") }}"
	// }
	// The resulting JSON body will be:
	// {
	// "key1": "header1_value",
	// "key2": "header2_value"
	// }
	JsonKeys map[string]*MergeJsonKeys_OverridableTemplate `` /* 173-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MergeJsonKeys) Clone

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

Clone function

func (*MergeJsonKeys) Descriptor deprecated

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

Deprecated: Use MergeJsonKeys.ProtoReflect.Descriptor instead.

func (*MergeJsonKeys) Equal

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

Equal function

func (*MergeJsonKeys) GetJsonKeys

func (*MergeJsonKeys) Hash deprecated

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*MergeJsonKeys) HashUnique

func (m *MergeJsonKeys) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*MergeJsonKeys) ProtoMessage

func (*MergeJsonKeys) ProtoMessage()

func (*MergeJsonKeys) ProtoReflect

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

func (*MergeJsonKeys) Reset

func (x *MergeJsonKeys) Reset()

func (*MergeJsonKeys) String

func (x *MergeJsonKeys) String() string

type MergeJsonKeys_OverridableTemplate

type MergeJsonKeys_OverridableTemplate struct {

	// Template to render
	Tmpl *InjaTemplate `protobuf:"bytes,1,opt,name=tmpl,proto3" json:"tmpl,omitempty"`
	// If set to true, the template will be set even if the rendered value is empty.
	OverrideEmpty bool `protobuf:"varint,2,opt,name=override_empty,json=overrideEmpty,proto3" json:"override_empty,omitempty"`
	// contains filtered or unexported fields
}

func (*MergeJsonKeys_OverridableTemplate) Clone

Clone function

func (*MergeJsonKeys_OverridableTemplate) Descriptor deprecated

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

Deprecated: Use MergeJsonKeys_OverridableTemplate.ProtoReflect.Descriptor instead.

func (*MergeJsonKeys_OverridableTemplate) Equal

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

Equal function

func (*MergeJsonKeys_OverridableTemplate) GetOverrideEmpty

func (x *MergeJsonKeys_OverridableTemplate) GetOverrideEmpty() bool

func (*MergeJsonKeys_OverridableTemplate) GetTmpl

func (*MergeJsonKeys_OverridableTemplate) Hash deprecated

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*MergeJsonKeys_OverridableTemplate) HashUnique

func (m *MergeJsonKeys_OverridableTemplate) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*MergeJsonKeys_OverridableTemplate) ProtoMessage

func (*MergeJsonKeys_OverridableTemplate) ProtoMessage()

func (*MergeJsonKeys_OverridableTemplate) ProtoReflect

func (*MergeJsonKeys_OverridableTemplate) Reset

func (*MergeJsonKeys_OverridableTemplate) String

type Passthrough

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

func (*Passthrough) Clone added in v1.8.24

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

Clone function

func (*Passthrough) Descriptor deprecated

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

Deprecated: Use Passthrough.ProtoReflect.Descriptor instead.

func (*Passthrough) Equal

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

Equal function

func (*Passthrough) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*Passthrough) HashUnique

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

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*Passthrough) ProtoMessage

func (*Passthrough) ProtoMessage()

func (*Passthrough) ProtoReflect added in v1.6.0

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

func (*Passthrough) Reset

func (x *Passthrough) Reset()

func (*Passthrough) String

func (x *Passthrough) String() string

type ResponseMatcher added in v1.4.6

type ResponseMatcher struct {

	// Specifies a set of headers that the route should match on. The router will
	// check the response headers against all the specified headers in the route
	// config. A match will happen if all the headers in the route are present in
	// the request with the same values (or based on presence if the value field
	// is not in the config).
	Headers []*v3.HeaderMatcher `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	// Only match responses with non empty response code details (this usually
	// implies a local reply).
	ResponseCodeDetails *v31.StringMatcher `protobuf:"bytes,2,opt,name=response_code_details,json=responseCodeDetails,proto3" json:"response_code_details,omitempty"`
	// contains filtered or unexported fields
}

func (*ResponseMatcher) Clone added in v1.8.24

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

Clone function

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

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

Deprecated: Use ResponseMatcher.ProtoReflect.Descriptor instead.

func (*ResponseMatcher) Equal added in v1.4.6

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

Equal function

func (*ResponseMatcher) GetHeaders added in v1.4.6

func (x *ResponseMatcher) GetHeaders() []*v3.HeaderMatcher

func (*ResponseMatcher) GetResponseCodeDetails added in v1.4.6

func (x *ResponseMatcher) GetResponseCodeDetails() *v31.StringMatcher

func (*ResponseMatcher) Hash deprecated added in v1.6.0

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*ResponseMatcher) HashUnique

func (m *ResponseMatcher) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*ResponseMatcher) ProtoMessage added in v1.4.6

func (*ResponseMatcher) ProtoMessage()

func (*ResponseMatcher) ProtoReflect added in v1.6.0

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

func (*ResponseMatcher) Reset added in v1.4.6

func (x *ResponseMatcher) Reset()

func (*ResponseMatcher) String added in v1.4.6

func (x *ResponseMatcher) String() string

type ResponseTransformationRule added in v1.4.6

type ResponseTransformationRule struct {
	Match *ResponseMatcher `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
	// transformation to perform
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ResponseTransformationRule) Clone added in v1.8.24

Clone function

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

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

Deprecated: Use ResponseTransformationRule.ProtoReflect.Descriptor instead.

func (*ResponseTransformationRule) Equal added in v1.4.6

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

Equal function

func (*ResponseTransformationRule) GetMatch added in v1.4.6

func (*ResponseTransformationRule) GetResponseTransformation added in v1.4.6

func (x *ResponseTransformationRule) GetResponseTransformation() *Transformation

func (*ResponseTransformationRule) Hash deprecated added in v1.6.0

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*ResponseTransformationRule) HashUnique

func (m *ResponseTransformationRule) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*ResponseTransformationRule) ProtoMessage added in v1.4.6

func (*ResponseTransformationRule) ProtoMessage()

func (*ResponseTransformationRule) ProtoReflect added in v1.6.0

func (*ResponseTransformationRule) Reset added in v1.4.6

func (x *ResponseTransformationRule) Reset()

func (*ResponseTransformationRule) String added in v1.4.6

func (x *ResponseTransformationRule) String() string

type RouteTransformations

type RouteTransformations struct {

	// deprecated. Use transformations[].request_match.request_transformation
	// instead.
	//
	// Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/extensions/transformation/transformation.proto.
	RequestTransformation *Transformation `protobuf:"bytes,1,opt,name=request_transformation,json=requestTransformation,proto3" json:"request_transformation,omitempty"`
	// deprecated. Use transformations[].request_match.response_transformation
	// instead.
	//
	// Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/extensions/transformation/transformation.proto.
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	// deprecated. Use transformations[].request_match.clear_route_cache instead.
	//
	// Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/extensions/transformation/transformation.proto.
	ClearRouteCache bool                                        `protobuf:"varint,3,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
	Transformations []*RouteTransformations_RouteTransformation `protobuf:"bytes,4,rep,name=transformations,proto3" json:"transformations,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteTransformations) Clone added in v1.8.24

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

Clone function

func (*RouteTransformations) Descriptor deprecated

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

Deprecated: Use RouteTransformations.ProtoReflect.Descriptor instead.

func (*RouteTransformations) Equal

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

Equal function

func (*RouteTransformations) GetClearRouteCache deprecated

func (x *RouteTransformations) GetClearRouteCache() bool

Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/extensions/transformation/transformation.proto.

func (*RouteTransformations) GetRequestTransformation deprecated

func (x *RouteTransformations) GetRequestTransformation() *Transformation

Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/extensions/transformation/transformation.proto.

func (*RouteTransformations) GetResponseTransformation deprecated

func (x *RouteTransformations) GetResponseTransformation() *Transformation

Deprecated: Marked as deprecated in github.com/solo-io/gloo/projects/gloo/api/external/envoy/extensions/transformation/transformation.proto.

func (*RouteTransformations) GetTransformations added in v1.4.6

func (*RouteTransformations) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*RouteTransformations) HashUnique

func (m *RouteTransformations) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*RouteTransformations) ProtoMessage

func (*RouteTransformations) ProtoMessage()

func (*RouteTransformations) ProtoReflect added in v1.6.0

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

func (*RouteTransformations) Reset

func (x *RouteTransformations) Reset()

func (*RouteTransformations) String

func (x *RouteTransformations) String() string

type RouteTransformations_RouteTransformation added in v1.4.6

type RouteTransformations_RouteTransformation struct {

	// Stage number. This transformation will only be processed by filters with
	// the same stage number.
	Stage uint32 `protobuf:"varint,1,opt,name=stage,proto3" json:"stage,omitempty"`
	// Types that are assignable to Match:
	//
	//	*RouteTransformations_RouteTransformation_RequestMatch_
	//	*RouteTransformations_RouteTransformation_ResponseMatch_
	Match isRouteTransformations_RouteTransformation_Match `protobuf_oneof:"match"`
	// contains filtered or unexported fields
}

func (*RouteTransformations_RouteTransformation) Clone added in v1.8.24

Clone function

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

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

Deprecated: Use RouteTransformations_RouteTransformation.ProtoReflect.Descriptor instead.

func (*RouteTransformations_RouteTransformation) Equal added in v1.4.6

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

Equal function

func (*RouteTransformations_RouteTransformation) GetMatch added in v1.4.6

func (m *RouteTransformations_RouteTransformation) GetMatch() isRouteTransformations_RouteTransformation_Match

func (*RouteTransformations_RouteTransformation) GetRequestMatch added in v1.4.6

func (*RouteTransformations_RouteTransformation) GetResponseMatch added in v1.4.6

func (*RouteTransformations_RouteTransformation) GetStage added in v1.4.6

func (*RouteTransformations_RouteTransformation) Hash deprecated added in v1.6.0

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*RouteTransformations_RouteTransformation) HashUnique

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*RouteTransformations_RouteTransformation) ProtoMessage added in v1.4.6

func (*RouteTransformations_RouteTransformation) ProtoReflect added in v1.6.0

func (*RouteTransformations_RouteTransformation) Reset added in v1.4.6

func (*RouteTransformations_RouteTransformation) String added in v1.4.6

type RouteTransformations_RouteTransformation_RequestMatch added in v1.4.6

type RouteTransformations_RouteTransformation_RequestMatch struct {

	// if no match is specified, will match all
	Match *v3.RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
	// transformation to perform
	RequestTransformation  *Transformation `protobuf:"bytes,2,opt,name=request_transformation,json=requestTransformation,proto3" json:"request_transformation,omitempty"`
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	// clear the route cache if the request transformation was applied
	ClearRouteCache bool `protobuf:"varint,4,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteTransformations_RouteTransformation_RequestMatch) Clone added in v1.8.24

Clone function

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

Deprecated: Use RouteTransformations_RouteTransformation_RequestMatch.ProtoReflect.Descriptor instead.

func (*RouteTransformations_RouteTransformation_RequestMatch) Equal added in v1.4.6

Equal function

func (*RouteTransformations_RouteTransformation_RequestMatch) GetClearRouteCache added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) GetMatch added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) GetRequestTransformation added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) GetResponseTransformation added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) Hash deprecated added in v1.6.0

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*RouteTransformations_RouteTransformation_RequestMatch) HashUnique

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*RouteTransformations_RouteTransformation_RequestMatch) ProtoMessage added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) ProtoReflect added in v1.6.0

func (*RouteTransformations_RouteTransformation_RequestMatch) Reset added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) String added in v1.4.6

type RouteTransformations_RouteTransformation_RequestMatch_ added in v1.4.6

type RouteTransformations_RouteTransformation_RequestMatch_ struct {
	RequestMatch *RouteTransformations_RouteTransformation_RequestMatch `protobuf:"bytes,2,opt,name=request_match,json=requestMatch,proto3,oneof"`
}

type RouteTransformations_RouteTransformation_ResponseMatch added in v1.4.6

type RouteTransformations_RouteTransformation_ResponseMatch struct {
	Match *ResponseMatcher `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
	// transformation to perform
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*RouteTransformations_RouteTransformation_ResponseMatch) Clone added in v1.8.24

Clone function

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

Deprecated: Use RouteTransformations_RouteTransformation_ResponseMatch.ProtoReflect.Descriptor instead.

func (*RouteTransformations_RouteTransformation_ResponseMatch) Equal added in v1.4.6

Equal function

func (*RouteTransformations_RouteTransformation_ResponseMatch) GetMatch added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) GetResponseTransformation added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) Hash deprecated added in v1.6.0

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*RouteTransformations_RouteTransformation_ResponseMatch) HashUnique

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*RouteTransformations_RouteTransformation_ResponseMatch) ProtoMessage added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) ProtoReflect added in v1.6.0

func (*RouteTransformations_RouteTransformation_ResponseMatch) Reset added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) String added in v1.4.6

type RouteTransformations_RouteTransformation_ResponseMatch_ added in v1.4.6

type RouteTransformations_RouteTransformation_ResponseMatch_ struct {
	ResponseMatch *RouteTransformations_RouteTransformation_ResponseMatch `protobuf:"bytes,3,opt,name=response_match,json=responseMatch,proto3,oneof"`
}

type Transformation

type Transformation struct {

	// The type of transformation to apply.
	//
	// Types that are assignable to TransformationType:
	//
	//	*Transformation_TransformationTemplate
	//	*Transformation_HeaderBodyTransform
	//	*Transformation_TransformerConfig
	TransformationType isTransformation_TransformationType `protobuf_oneof:"transformation_type"`
	// Logs request/response sensitive information
	// By default, this is false so no request or response sensitive information is logged.
	// If set to true, the filter will log the request/response body and headers before and
	// after this transformation is applied.
	LogRequestResponseInfo *wrapperspb.BoolValue `` /* 131-byte string literal not displayed */
	// contains filtered or unexported fields
}

This message defines a transformation. This proto is for envoy filter config, not user-facing API.

func (*Transformation) Clone added in v1.8.24

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

Clone function

func (*Transformation) Descriptor deprecated

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

Deprecated: Use Transformation.ProtoReflect.Descriptor instead.

func (*Transformation) Equal

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

Equal function

func (*Transformation) GetHeaderBodyTransform

func (x *Transformation) GetHeaderBodyTransform() *HeaderBodyTransform

func (*Transformation) GetLogRequestResponseInfo added in v1.14.8

func (x *Transformation) GetLogRequestResponseInfo() *wrapperspb.BoolValue

func (*Transformation) GetTransformationTemplate

func (x *Transformation) GetTransformationTemplate() *TransformationTemplate

func (*Transformation) GetTransformationType

func (m *Transformation) GetTransformationType() isTransformation_TransformationType

func (*Transformation) GetTransformerConfig added in v1.7.7

func (x *Transformation) GetTransformerConfig() *v32.TypedExtensionConfig

func (*Transformation) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*Transformation) HashUnique

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

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*Transformation) ProtoMessage

func (*Transformation) ProtoMessage()

func (*Transformation) ProtoReflect added in v1.6.0

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

func (*Transformation) Reset

func (x *Transformation) Reset()

func (*Transformation) String

func (x *Transformation) String() string

type TransformationRule

type TransformationRule struct {

	// The route matching parameter. Only when the match is satisfied, the
	// "requires" field will apply.
	//
	// For example: following match will match all requests.
	//
	// .. code-block:: yaml
	//
	//	match:
	//	  prefix: /
	Match *v3.RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
	// transformation to perform
	RouteTransformations *TransformationRule_Transformations `protobuf:"bytes,2,opt,name=route_transformations,json=routeTransformations,proto3" json:"route_transformations,omitempty"`
	// contains filtered or unexported fields
}

func (*TransformationRule) Clone added in v1.8.24

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

Clone function

func (*TransformationRule) Descriptor deprecated

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

Deprecated: Use TransformationRule.ProtoReflect.Descriptor instead.

func (*TransformationRule) Equal

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

Equal function

func (*TransformationRule) GetMatch

func (x *TransformationRule) GetMatch() *v3.RouteMatch

func (*TransformationRule) GetRouteTransformations

func (x *TransformationRule) GetRouteTransformations() *TransformationRule_Transformations

func (*TransformationRule) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*TransformationRule) HashUnique

func (m *TransformationRule) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*TransformationRule) ProtoMessage

func (*TransformationRule) ProtoMessage()

func (*TransformationRule) ProtoReflect added in v1.6.0

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

func (*TransformationRule) Reset

func (x *TransformationRule) Reset()

func (*TransformationRule) String

func (x *TransformationRule) String() string

type TransformationRule_Transformations added in v1.4.6

type TransformationRule_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 */
	// Apply a transformation in the onStreamComplete callback
	// (for modifying headers and dynamic metadata for access logs)
	OnStreamCompletionTransformation *Transformation `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TransformationRule_Transformations) Clone added in v1.8.24

Clone function

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

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

Deprecated: Use TransformationRule_Transformations.ProtoReflect.Descriptor instead.

func (*TransformationRule_Transformations) Equal added in v1.4.6

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

Equal function

func (*TransformationRule_Transformations) GetClearRouteCache added in v1.4.6

func (x *TransformationRule_Transformations) GetClearRouteCache() bool

func (*TransformationRule_Transformations) GetOnStreamCompletionTransformation added in v1.7.7

func (x *TransformationRule_Transformations) GetOnStreamCompletionTransformation() *Transformation

func (*TransformationRule_Transformations) GetRequestTransformation added in v1.4.6

func (x *TransformationRule_Transformations) GetRequestTransformation() *Transformation

func (*TransformationRule_Transformations) GetResponseTransformation added in v1.4.6

func (x *TransformationRule_Transformations) GetResponseTransformation() *Transformation

func (*TransformationRule_Transformations) Hash deprecated added in v1.6.0

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*TransformationRule_Transformations) HashUnique

func (m *TransformationRule_Transformations) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*TransformationRule_Transformations) ProtoMessage added in v1.4.6

func (*TransformationRule_Transformations) ProtoMessage()

func (*TransformationRule_Transformations) ProtoReflect added in v1.6.0

func (*TransformationRule_Transformations) Reset added in v1.4.6

func (*TransformationRule_Transformations) String added in v1.4.6

type TransformationTemplate

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
	//	*TransformationTemplate_MergeJsonKeys
	BodyTransformation isTransformationTemplate_BodyTransformation `protobuf_oneof:"body_transformation"`
	// Determines how the body will be parsed. Defaults to ParseAsJson
	ParseBodyBehavior TransformationTemplate_RequestBodyParse `` /* 185-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 bool `protobuf:"varint,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.8.24

Clone function

func (*TransformationTemplate) Descriptor deprecated

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

Deprecated: Use TransformationTemplate.ProtoReflect.Descriptor instead.

func (*TransformationTemplate) Equal

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

Equal function

func (*TransformationTemplate) GetAdvancedTemplates

func (x *TransformationTemplate) GetAdvancedTemplates() bool

func (*TransformationTemplate) GetBody

func (x *TransformationTemplate) GetBody() *InjaTemplate

func (*TransformationTemplate) GetBodyTransformation

func (m *TransformationTemplate) GetBodyTransformation() isTransformationTemplate_BodyTransformation

func (*TransformationTemplate) GetDynamicMetadataValues

func (*TransformationTemplate) GetEscapeCharacters added in v1.15.0

func (x *TransformationTemplate) GetEscapeCharacters() bool

func (*TransformationTemplate) GetExtractors

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

func (*TransformationTemplate) GetHeaders

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

func (*TransformationTemplate) GetHeadersToAppend added in v1.6.0

func (*TransformationTemplate) GetHeadersToRemove added in v1.9.25

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

func (*TransformationTemplate) GetIgnoreErrorOnParse

func (x *TransformationTemplate) GetIgnoreErrorOnParse() bool

func (*TransformationTemplate) GetMergeExtractorsToBody

func (x *TransformationTemplate) GetMergeExtractorsToBody() *MergeExtractorsToBody

func (*TransformationTemplate) GetMergeJsonKeys

func (x *TransformationTemplate) GetMergeJsonKeys() *MergeJsonKeys

func (*TransformationTemplate) GetParseBodyBehavior

func (*TransformationTemplate) GetPassthrough

func (x *TransformationTemplate) GetPassthrough() *Passthrough

func (*TransformationTemplate) Hash deprecated added in v1.2.13

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

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*TransformationTemplate) HashUnique

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

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*TransformationTemplate) ProtoMessage

func (*TransformationTemplate) ProtoMessage()

func (*TransformationTemplate) ProtoReflect added in v1.6.0

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

func (*TransformationTemplate) Reset

func (x *TransformationTemplate) Reset()

func (*TransformationTemplate) String

func (x *TransformationTemplate) String() string

type TransformationTemplate_Body

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

type TransformationTemplate_DynamicMetadataValue

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"`
	// Instruct the filter to parse the rendered value as a proto Struct message
	// before setting it as the metadata value.
	JsonToProto bool `protobuf:"varint,4,opt,name=json_to_proto,json=jsonToProto,proto3" json:"json_to_proto,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.8.24

Clone function

func (*TransformationTemplate_DynamicMetadataValue) Descriptor deprecated

Deprecated: Use TransformationTemplate_DynamicMetadataValue.ProtoReflect.Descriptor instead.

func (*TransformationTemplate_DynamicMetadataValue) Equal

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

Equal function

func (*TransformationTemplate_DynamicMetadataValue) GetJsonToProto added in v1.17.0

func (*TransformationTemplate_DynamicMetadataValue) GetKey

func (*TransformationTemplate_DynamicMetadataValue) GetMetadataNamespace

func (x *TransformationTemplate_DynamicMetadataValue) GetMetadataNamespace() string

func (*TransformationTemplate_DynamicMetadataValue) GetValue

func (*TransformationTemplate_DynamicMetadataValue) Hash deprecated added in v1.2.13

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*TransformationTemplate_DynamicMetadataValue) HashUnique

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*TransformationTemplate_DynamicMetadataValue) ProtoMessage

func (*TransformationTemplate_DynamicMetadataValue) ProtoReflect added in v1.6.0

func (*TransformationTemplate_DynamicMetadataValue) Reset

func (*TransformationTemplate_DynamicMetadataValue) String

type TransformationTemplate_HeaderToAppend added in v1.6.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.8.24

Clone function

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

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

Deprecated: Use TransformationTemplate_HeaderToAppend.ProtoReflect.Descriptor instead.

func (*TransformationTemplate_HeaderToAppend) Equal added in v1.6.0

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

Equal function

func (*TransformationTemplate_HeaderToAppend) GetKey added in v1.6.0

func (*TransformationTemplate_HeaderToAppend) GetValue added in v1.6.0

func (*TransformationTemplate_HeaderToAppend) Hash deprecated added in v1.6.0

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*TransformationTemplate_HeaderToAppend) HashUnique

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*TransformationTemplate_HeaderToAppend) ProtoMessage added in v1.6.0

func (*TransformationTemplate_HeaderToAppend) ProtoMessage()

func (*TransformationTemplate_HeaderToAppend) ProtoReflect added in v1.6.0

func (*TransformationTemplate_HeaderToAppend) Reset added in v1.6.0

func (*TransformationTemplate_HeaderToAppend) String added in v1.6.0

type TransformationTemplate_MergeExtractorsToBody

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_MergeJsonKeys

type TransformationTemplate_MergeJsonKeys struct {
	// A set of key-value pairs to merge into the JSON body.
	// Each value will be rendered separately, and then placed into the JSON body at
	// the specified key.
	// There are a number of important caveats to using this feature:
	// * This can only be used when the body is parsed as JSON.
	// * This option does NOT work with advanced templates currently
	MergeJsonKeys *MergeJsonKeys `protobuf:"bytes,13,opt,name=merge_json_keys,json=mergeJsonKeys,proto3,oneof"`
}

type TransformationTemplate_Passthrough

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

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.6.0

func (TransformationTemplate_RequestBodyParse) Enum added in v1.6.0

func (TransformationTemplate_RequestBodyParse) EnumDescriptor deprecated

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

Deprecated: Use TransformationTemplate_RequestBodyParse.Descriptor instead.

func (TransformationTemplate_RequestBodyParse) Number added in v1.6.0

func (TransformationTemplate_RequestBodyParse) String

func (TransformationTemplate_RequestBodyParse) Type added in v1.6.0

type Transformation_HeaderBodyTransform

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

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

type Transformation_TransformerConfig added in v1.7.7

type Transformation_TransformerConfig struct {
	// Configuration for an externally implemented transformer, used by
	// envoy transformation filter.
	TransformerConfig *v32.TypedExtensionConfig `protobuf:"bytes,3,opt,name=transformer_config,json=transformerConfig,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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