transformation

package
v1.6.0-beta5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 22 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Extraction

type Extraction struct {
	// The source of the extraction
	//
	// Types that are valid to be assigned to Source:
	//	*Extraction_Header
	//	*Extraction_Body
	Source isExtraction_Source `protobuf_oneof:"source"`
	// Only strings matching this regular expression will be part of the
	// extraction. 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*Extraction) Descriptor

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

func (*Extraction) Equal

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

func (*Extraction) GetBody

func (m *Extraction) GetBody() *types.Empty

func (*Extraction) GetHeader

func (m *Extraction) GetHeader() string

func (*Extraction) GetRegex

func (m *Extraction) GetRegex() string

func (*Extraction) GetSource

func (m *Extraction) GetSource() isExtraction_Source

func (*Extraction) GetSubgroup

func (m *Extraction) GetSubgroup() uint32

func (*Extraction) Hash added in v1.2.13

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

Hash function

func (*Extraction) ProtoMessage

func (*Extraction) ProtoMessage()

func (*Extraction) Reset

func (m *Extraction) Reset()

func (*Extraction) String

func (m *Extraction) String() string

func (*Extraction) XXX_DiscardUnknown

func (m *Extraction) XXX_DiscardUnknown()

func (*Extraction) XXX_Marshal

func (m *Extraction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Extraction) XXX_Merge

func (m *Extraction) XXX_Merge(src proto.Message)

func (*Extraction) XXX_OneofWrappers

func (*Extraction) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Extraction) XXX_Size

func (m *Extraction) XXX_Size() int

func (*Extraction) XXX_Unmarshal

func (m *Extraction) XXX_Unmarshal(b []byte) error

type Extraction_Body

type Extraction_Body struct {
	Body *types.Empty `protobuf:"bytes,4,opt,name=body,proto3,oneof" json:"body,omitempty"`
}

func (*Extraction_Body) Equal

func (this *Extraction_Body) Equal(that interface{}) bool

type Extraction_Header

type Extraction_Header struct {
	Header string `protobuf:"bytes,1,opt,name=header,proto3,oneof" json:"header,omitempty"`
}

func (*Extraction_Header) Equal

func (this *Extraction_Header) Equal(that interface{}) bool

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FilterTransformations) Descriptor

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

func (*FilterTransformations) Equal

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

func (*FilterTransformations) GetStage added in v1.4.6

func (m *FilterTransformations) GetStage() uint32

func (*FilterTransformations) GetTransformations

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

func (*FilterTransformations) Hash added in v1.2.13

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

Hash function

func (*FilterTransformations) ProtoMessage

func (*FilterTransformations) ProtoMessage()

func (*FilterTransformations) Reset

func (m *FilterTransformations) Reset()

func (*FilterTransformations) String

func (m *FilterTransformations) String() string

func (*FilterTransformations) XXX_DiscardUnknown

func (m *FilterTransformations) XXX_DiscardUnknown()

func (*FilterTransformations) XXX_Marshal

func (m *FilterTransformations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FilterTransformations) XXX_Merge

func (m *FilterTransformations) XXX_Merge(src proto.Message)

func (*FilterTransformations) XXX_Size

func (m *FilterTransformations) XXX_Size() int

func (*FilterTransformations) XXX_Unmarshal

func (m *FilterTransformations) XXX_Unmarshal(b []byte) error

type HeaderBodyTransform

type HeaderBodyTransform struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HeaderBodyTransform) Descriptor

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

func (*HeaderBodyTransform) Equal

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

func (*HeaderBodyTransform) Hash added in v1.2.13

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

Hash function

func (*HeaderBodyTransform) ProtoMessage

func (*HeaderBodyTransform) ProtoMessage()

func (*HeaderBodyTransform) Reset

func (m *HeaderBodyTransform) Reset()

func (*HeaderBodyTransform) String

func (m *HeaderBodyTransform) String() string

func (*HeaderBodyTransform) XXX_DiscardUnknown

func (m *HeaderBodyTransform) XXX_DiscardUnknown()

func (*HeaderBodyTransform) XXX_Marshal

func (m *HeaderBodyTransform) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HeaderBodyTransform) XXX_Merge

func (m *HeaderBodyTransform) XXX_Merge(src proto.Message)

func (*HeaderBodyTransform) XXX_Size

func (m *HeaderBodyTransform) XXX_Size() int

func (*HeaderBodyTransform) XXX_Unmarshal

func (m *HeaderBodyTransform) XXX_Unmarshal(b []byte) error

type InjaTemplate

type InjaTemplate struct {
	Text                 string   `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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)

func (*InjaTemplate) Descriptor

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

func (*InjaTemplate) Equal

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

func (*InjaTemplate) GetText

func (m *InjaTemplate) GetText() string

func (*InjaTemplate) Hash added in v1.2.13

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

Hash function

func (*InjaTemplate) ProtoMessage

func (*InjaTemplate) ProtoMessage()

func (*InjaTemplate) Reset

func (m *InjaTemplate) Reset()

func (*InjaTemplate) String

func (m *InjaTemplate) String() string

func (*InjaTemplate) XXX_DiscardUnknown

func (m *InjaTemplate) XXX_DiscardUnknown()

func (*InjaTemplate) XXX_Marshal

func (m *InjaTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InjaTemplate) XXX_Merge

func (m *InjaTemplate) XXX_Merge(src proto.Message)

func (*InjaTemplate) XXX_Size

func (m *InjaTemplate) XXX_Size() int

func (*InjaTemplate) XXX_Unmarshal

func (m *InjaTemplate) XXX_Unmarshal(b []byte) error

type MergeExtractorsToBody

type MergeExtractorsToBody struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MergeExtractorsToBody) Descriptor

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

func (*MergeExtractorsToBody) Equal

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

func (*MergeExtractorsToBody) Hash added in v1.2.13

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

Hash function

func (*MergeExtractorsToBody) ProtoMessage

func (*MergeExtractorsToBody) ProtoMessage()

func (*MergeExtractorsToBody) Reset

func (m *MergeExtractorsToBody) Reset()

func (*MergeExtractorsToBody) String

func (m *MergeExtractorsToBody) String() string

func (*MergeExtractorsToBody) XXX_DiscardUnknown

func (m *MergeExtractorsToBody) XXX_DiscardUnknown()

func (*MergeExtractorsToBody) XXX_Marshal

func (m *MergeExtractorsToBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MergeExtractorsToBody) XXX_Merge

func (m *MergeExtractorsToBody) XXX_Merge(src proto.Message)

func (*MergeExtractorsToBody) XXX_Size

func (m *MergeExtractorsToBody) XXX_Size() int

func (*MergeExtractorsToBody) XXX_Unmarshal

func (m *MergeExtractorsToBody) XXX_Unmarshal(b []byte) error

type Passthrough

type Passthrough struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Passthrough) Descriptor

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

func (*Passthrough) Equal

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

func (*Passthrough) Hash added in v1.2.13

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

Hash function

func (*Passthrough) ProtoMessage

func (*Passthrough) ProtoMessage()

func (*Passthrough) Reset

func (m *Passthrough) Reset()

func (*Passthrough) String

func (m *Passthrough) String() string

func (*Passthrough) XXX_DiscardUnknown

func (m *Passthrough) XXX_DiscardUnknown()

func (*Passthrough) XXX_Marshal

func (m *Passthrough) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Passthrough) XXX_Merge

func (m *Passthrough) XXX_Merge(src proto.Message)

func (*Passthrough) XXX_Size

func (m *Passthrough) XXX_Size() int

func (*Passthrough) XXX_Unmarshal

func (m *Passthrough) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*ResponseMatcher) Descriptor added in v1.4.6

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

func (*ResponseMatcher) Equal added in v1.4.6

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

func (*ResponseMatcher) GetHeaders added in v1.4.6

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

func (*ResponseMatcher) GetResponseCodeDetails added in v1.4.6

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

func (*ResponseMatcher) ProtoMessage added in v1.4.6

func (*ResponseMatcher) ProtoMessage()

func (*ResponseMatcher) Reset added in v1.4.6

func (m *ResponseMatcher) Reset()

func (*ResponseMatcher) String added in v1.4.6

func (m *ResponseMatcher) String() string

func (*ResponseMatcher) XXX_DiscardUnknown added in v1.4.6

func (m *ResponseMatcher) XXX_DiscardUnknown()

func (*ResponseMatcher) XXX_Marshal added in v1.4.6

func (m *ResponseMatcher) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResponseMatcher) XXX_Merge added in v1.4.6

func (m *ResponseMatcher) XXX_Merge(src proto.Message)

func (*ResponseMatcher) XXX_Size added in v1.4.6

func (m *ResponseMatcher) XXX_Size() int

func (*ResponseMatcher) XXX_Unmarshal added in v1.4.6

func (m *ResponseMatcher) XXX_Unmarshal(b []byte) error

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 */
	XXX_NoUnkeyedLiteral   struct{}        `json:"-"`
	XXX_unrecognized       []byte          `json:"-"`
	XXX_sizecache          int32           `json:"-"`
}

func (*ResponseTransformationRule) Descriptor added in v1.4.6

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

func (*ResponseTransformationRule) Equal added in v1.4.6

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

func (*ResponseTransformationRule) GetMatch added in v1.4.6

func (*ResponseTransformationRule) GetResponseTransformation added in v1.4.6

func (m *ResponseTransformationRule) GetResponseTransformation() *Transformation

func (*ResponseTransformationRule) ProtoMessage added in v1.4.6

func (*ResponseTransformationRule) ProtoMessage()

func (*ResponseTransformationRule) Reset added in v1.4.6

func (m *ResponseTransformationRule) Reset()

func (*ResponseTransformationRule) String added in v1.4.6

func (m *ResponseTransformationRule) String() string

func (*ResponseTransformationRule) XXX_DiscardUnknown added in v1.4.6

func (m *ResponseTransformationRule) XXX_DiscardUnknown()

func (*ResponseTransformationRule) XXX_Marshal added in v1.4.6

func (m *ResponseTransformationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResponseTransformationRule) XXX_Merge added in v1.4.6

func (m *ResponseTransformationRule) XXX_Merge(src proto.Message)

func (*ResponseTransformationRule) XXX_Size added in v1.4.6

func (m *ResponseTransformationRule) XXX_Size() int

func (*ResponseTransformationRule) XXX_Unmarshal added in v1.4.6

func (m *ResponseTransformationRule) XXX_Unmarshal(b []byte) error

type RouteTransformations

type RouteTransformations struct {
	// deprecated. Use transformations[].request_match.request_transformation
	// instead.
	RequestTransformation *Transformation `protobuf:"bytes,1,opt,name=request_transformation,json=requestTransformation,proto3" json:"request_transformation,omitempty"` // Deprecated: Do not use.
	// deprecated. Use transformations[].request_match.response_transformation
	// instead.
	ResponseTransformation *Transformation `` // Deprecated: Do not use.
	/* 127-byte string literal not displayed */
	// deprecated. Use transformations[].request_match.clear_route_cache instead.
	ClearRouteCache      bool                                        `protobuf:"varint,3,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"` // Deprecated: Do not use.
	Transformations      []*RouteTransformations_RouteTransformation `protobuf:"bytes,4,rep,name=transformations,proto3" json:"transformations,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                    `json:"-"`
	XXX_unrecognized     []byte                                      `json:"-"`
	XXX_sizecache        int32                                       `json:"-"`
}

func (*RouteTransformations) Descriptor

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

func (*RouteTransformations) Equal

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

func (*RouteTransformations) GetClearRouteCache deprecated

func (m *RouteTransformations) GetClearRouteCache() bool

Deprecated: Do not use.

func (*RouteTransformations) GetRequestTransformation deprecated

func (m *RouteTransformations) GetRequestTransformation() *Transformation

Deprecated: Do not use.

func (*RouteTransformations) GetResponseTransformation deprecated

func (m *RouteTransformations) GetResponseTransformation() *Transformation

Deprecated: Do not use.

func (*RouteTransformations) GetTransformations added in v1.4.6

func (*RouteTransformations) Hash added in v1.2.13

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

Hash function

func (*RouteTransformations) ProtoMessage

func (*RouteTransformations) ProtoMessage()

func (*RouteTransformations) Reset

func (m *RouteTransformations) Reset()

func (*RouteTransformations) String

func (m *RouteTransformations) String() string

func (*RouteTransformations) XXX_DiscardUnknown

func (m *RouteTransformations) XXX_DiscardUnknown()

func (*RouteTransformations) XXX_Marshal

func (m *RouteTransformations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteTransformations) XXX_Merge

func (m *RouteTransformations) XXX_Merge(src proto.Message)

func (*RouteTransformations) XXX_Size

func (m *RouteTransformations) XXX_Size() int

func (*RouteTransformations) XXX_Unmarshal

func (m *RouteTransformations) XXX_Unmarshal(b []byte) error

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 valid to be assigned to Match:
	//	*RouteTransformations_RouteTransformation_RequestMatch_
	//	*RouteTransformations_RouteTransformation_ResponseMatch_
	Match                isRouteTransformations_RouteTransformation_Match `protobuf_oneof:"match"`
	XXX_NoUnkeyedLiteral struct{}                                         `json:"-"`
	XXX_unrecognized     []byte                                           `json:"-"`
	XXX_sizecache        int32                                            `json:"-"`
}

func (*RouteTransformations_RouteTransformation) Descriptor added in v1.4.6

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

func (*RouteTransformations_RouteTransformation) Equal added in v1.4.6

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

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) ProtoMessage added in v1.4.6

func (*RouteTransformations_RouteTransformation) Reset added in v1.4.6

func (*RouteTransformations_RouteTransformation) String added in v1.4.6

func (*RouteTransformations_RouteTransformation) XXX_DiscardUnknown added in v1.4.6

func (m *RouteTransformations_RouteTransformation) XXX_DiscardUnknown()

func (*RouteTransformations_RouteTransformation) XXX_Marshal added in v1.4.6

func (m *RouteTransformations_RouteTransformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteTransformations_RouteTransformation) XXX_Merge added in v1.4.6

func (*RouteTransformations_RouteTransformation) XXX_OneofWrappers added in v1.4.6

func (*RouteTransformations_RouteTransformation) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*RouteTransformations_RouteTransformation) XXX_Size added in v1.4.6

func (*RouteTransformations_RouteTransformation) XXX_Unmarshal added in v1.4.6

func (m *RouteTransformations_RouteTransformation) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RouteTransformations_RouteTransformation_RequestMatch) Descriptor added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) Equal added in v1.4.6

func (this *RouteTransformations_RouteTransformation_RequestMatch) Equal(that interface{}) bool

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) ProtoMessage added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) Reset added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) String added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) XXX_DiscardUnknown added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) XXX_Marshal added in v1.4.6

func (m *RouteTransformations_RouteTransformation_RequestMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteTransformations_RouteTransformation_RequestMatch) XXX_Merge added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) XXX_Size added in v1.4.6

func (*RouteTransformations_RouteTransformation_RequestMatch) XXX_Unmarshal 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" json:"request_match,omitempty"`
}

func (*RouteTransformations_RouteTransformation_RequestMatch_) Equal added in v1.4.6

func (this *RouteTransformations_RouteTransformation_RequestMatch_) Equal(that interface{}) bool

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 */
	XXX_NoUnkeyedLiteral   struct{}        `json:"-"`
	XXX_unrecognized       []byte          `json:"-"`
	XXX_sizecache          int32           `json:"-"`
}

func (*RouteTransformations_RouteTransformation_ResponseMatch) Descriptor added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) Equal added in v1.4.6

func (this *RouteTransformations_RouteTransformation_ResponseMatch) Equal(that interface{}) bool

func (*RouteTransformations_RouteTransformation_ResponseMatch) GetMatch added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) GetResponseTransformation added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) ProtoMessage added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) Reset added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) String added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) XXX_DiscardUnknown added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) XXX_Marshal added in v1.4.6

func (m *RouteTransformations_RouteTransformation_ResponseMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteTransformations_RouteTransformation_ResponseMatch) XXX_Merge added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) XXX_Size added in v1.4.6

func (*RouteTransformations_RouteTransformation_ResponseMatch) XXX_Unmarshal 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" json:"response_match,omitempty"`
}

func (*RouteTransformations_RouteTransformation_ResponseMatch_) Equal added in v1.4.6

func (this *RouteTransformations_RouteTransformation_ResponseMatch_) Equal(that interface{}) bool

type Transformation

type Transformation struct {
	// The type of transformation to apply.
	//
	// Types that are valid to be assigned to TransformationType:
	//	*Transformation_TransformationTemplate
	//	*Transformation_HeaderBodyTransform
	TransformationType   isTransformation_TransformationType `protobuf_oneof:"transformation_type"`
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_unrecognized     []byte                              `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

This message defines a transformation.

func (*Transformation) Descriptor

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

func (*Transformation) Equal

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

func (*Transformation) GetHeaderBodyTransform

func (m *Transformation) GetHeaderBodyTransform() *HeaderBodyTransform

func (*Transformation) GetTransformationTemplate

func (m *Transformation) GetTransformationTemplate() *TransformationTemplate

func (*Transformation) GetTransformationType

func (m *Transformation) GetTransformationType() isTransformation_TransformationType

func (*Transformation) Hash added in v1.2.13

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

Hash function

func (*Transformation) ProtoMessage

func (*Transformation) ProtoMessage()

func (*Transformation) Reset

func (m *Transformation) Reset()

func (*Transformation) String

func (m *Transformation) String() string

func (*Transformation) XXX_DiscardUnknown

func (m *Transformation) XXX_DiscardUnknown()

func (*Transformation) XXX_Marshal

func (m *Transformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Transformation) XXX_Merge

func (m *Transformation) XXX_Merge(src proto.Message)

func (*Transformation) XXX_OneofWrappers

func (*Transformation) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Transformation) XXX_Size

func (m *Transformation) XXX_Size() int

func (*Transformation) XXX_Unmarshal

func (m *Transformation) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
	XXX_unrecognized     []byte                              `json:"-"`
	XXX_sizecache        int32                               `json:"-"`
}

func (*TransformationRule) Descriptor

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

func (*TransformationRule) Equal

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

func (*TransformationRule) GetMatch

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

func (*TransformationRule) GetRouteTransformations

func (m *TransformationRule) GetRouteTransformations() *TransformationRule_Transformations

func (*TransformationRule) Hash added in v1.2.13

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

Hash function

func (*TransformationRule) ProtoMessage

func (*TransformationRule) ProtoMessage()

func (*TransformationRule) Reset

func (m *TransformationRule) Reset()

func (*TransformationRule) String

func (m *TransformationRule) String() string

func (*TransformationRule) XXX_DiscardUnknown

func (m *TransformationRule) XXX_DiscardUnknown()

func (*TransformationRule) XXX_Marshal

func (m *TransformationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransformationRule) XXX_Merge

func (m *TransformationRule) XXX_Merge(src proto.Message)

func (*TransformationRule) XXX_Size

func (m *TransformationRule) XXX_Size() int

func (*TransformationRule) XXX_Unmarshal

func (m *TransformationRule) XXX_Unmarshal(b []byte) error

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 */
	XXX_NoUnkeyedLiteral   struct{}        `json:"-"`
	XXX_unrecognized       []byte          `json:"-"`
	XXX_sizecache          int32           `json:"-"`
}

func (*TransformationRule_Transformations) Descriptor added in v1.4.6

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

func (*TransformationRule_Transformations) Equal added in v1.4.6

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

func (*TransformationRule_Transformations) GetClearRouteCache added in v1.4.6

func (m *TransformationRule_Transformations) GetClearRouteCache() bool

func (*TransformationRule_Transformations) GetRequestTransformation added in v1.4.6

func (m *TransformationRule_Transformations) GetRequestTransformation() *Transformation

func (*TransformationRule_Transformations) GetResponseTransformation added in v1.4.6

func (m *TransformationRule_Transformations) GetResponseTransformation() *Transformation

func (*TransformationRule_Transformations) ProtoMessage added in v1.4.6

func (*TransformationRule_Transformations) ProtoMessage()

func (*TransformationRule_Transformations) Reset added in v1.4.6

func (*TransformationRule_Transformations) String added in v1.4.6

func (*TransformationRule_Transformations) XXX_DiscardUnknown added in v1.4.6

func (m *TransformationRule_Transformations) XXX_DiscardUnknown()

func (*TransformationRule_Transformations) XXX_Marshal added in v1.4.6

func (m *TransformationRule_Transformations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransformationRule_Transformations) XXX_Merge added in v1.4.6

func (*TransformationRule_Transformations) XXX_Size added in v1.4.6

func (*TransformationRule_Transformations) XXX_Unmarshal added in v1.4.6

func (m *TransformationRule_Transformations) XXX_Unmarshal(b []byte) error

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.
	Headers map[string]*InjaTemplate `` /* 155-byte string literal not displayed */
	// Determines the type of transformation to apply to the request/response body
	//
	// Types that are valid to be assigned to BodyTransformation:
	//	*TransformationTemplate_Body
	//	*TransformationTemplate_Passthrough
	//	*TransformationTemplate_MergeExtractorsToBody
	BodyTransformation isTransformationTemplate_BodyTransformation `protobuf_oneof:"body_transformation"`
	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 */
	XXX_NoUnkeyedLiteral  struct{}                                       `json:"-"`
	XXX_unrecognized      []byte                                         `json:"-"`
	XXX_sizecache         int32                                          `json:"-"`
}

Defines a transformation template.

func (*TransformationTemplate) Descriptor

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

func (*TransformationTemplate) Equal

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

func (*TransformationTemplate) GetAdvancedTemplates

func (m *TransformationTemplate) GetAdvancedTemplates() bool

func (*TransformationTemplate) GetBody

func (m *TransformationTemplate) GetBody() *InjaTemplate

func (*TransformationTemplate) GetBodyTransformation

func (m *TransformationTemplate) GetBodyTransformation() isTransformationTemplate_BodyTransformation

func (*TransformationTemplate) GetDynamicMetadataValues

func (*TransformationTemplate) GetExtractors

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

func (*TransformationTemplate) GetHeaders

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

func (*TransformationTemplate) GetIgnoreErrorOnParse

func (m *TransformationTemplate) GetIgnoreErrorOnParse() bool

func (*TransformationTemplate) GetMergeExtractorsToBody

func (m *TransformationTemplate) GetMergeExtractorsToBody() *MergeExtractorsToBody

func (*TransformationTemplate) GetParseBodyBehavior

func (*TransformationTemplate) GetPassthrough

func (m *TransformationTemplate) GetPassthrough() *Passthrough

func (*TransformationTemplate) Hash added in v1.2.13

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

Hash function

func (*TransformationTemplate) ProtoMessage

func (*TransformationTemplate) ProtoMessage()

func (*TransformationTemplate) Reset

func (m *TransformationTemplate) Reset()

func (*TransformationTemplate) String

func (m *TransformationTemplate) String() string

func (*TransformationTemplate) XXX_DiscardUnknown

func (m *TransformationTemplate) XXX_DiscardUnknown()

func (*TransformationTemplate) XXX_Marshal

func (m *TransformationTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransformationTemplate) XXX_Merge

func (m *TransformationTemplate) XXX_Merge(src proto.Message)

func (*TransformationTemplate) XXX_OneofWrappers

func (*TransformationTemplate) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*TransformationTemplate) XXX_Size

func (m *TransformationTemplate) XXX_Size() int

func (*TransformationTemplate) XXX_Unmarshal

func (m *TransformationTemplate) XXX_Unmarshal(b []byte) error

type TransformationTemplate_Body

type TransformationTemplate_Body struct {
	Body *InjaTemplate `protobuf:"bytes,4,opt,name=body,proto3,oneof" json:"body,omitempty"`
}

func (*TransformationTemplate_Body) Equal

func (this *TransformationTemplate_Body) Equal(that interface{}) bool

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"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

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

func (*TransformationTemplate_DynamicMetadataValue) Descriptor

func (*TransformationTemplate_DynamicMetadataValue) Equal

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

func (*TransformationTemplate_DynamicMetadataValue) GetKey

func (*TransformationTemplate_DynamicMetadataValue) GetMetadataNamespace

func (m *TransformationTemplate_DynamicMetadataValue) GetMetadataNamespace() string

func (*TransformationTemplate_DynamicMetadataValue) GetValue

func (*TransformationTemplate_DynamicMetadataValue) Hash added in v1.2.13

Hash function

func (*TransformationTemplate_DynamicMetadataValue) ProtoMessage

func (*TransformationTemplate_DynamicMetadataValue) Reset

func (*TransformationTemplate_DynamicMetadataValue) String

func (*TransformationTemplate_DynamicMetadataValue) XXX_DiscardUnknown

func (m *TransformationTemplate_DynamicMetadataValue) XXX_DiscardUnknown()

func (*TransformationTemplate_DynamicMetadataValue) XXX_Marshal

func (m *TransformationTemplate_DynamicMetadataValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TransformationTemplate_DynamicMetadataValue) XXX_Merge

func (*TransformationTemplate_DynamicMetadataValue) XXX_Size

func (*TransformationTemplate_DynamicMetadataValue) XXX_Unmarshal

type TransformationTemplate_MergeExtractorsToBody

type TransformationTemplate_MergeExtractorsToBody struct {
	MergeExtractorsToBody *MergeExtractorsToBody `` /* 134-byte string literal not displayed */
}

func (*TransformationTemplate_MergeExtractorsToBody) Equal

func (this *TransformationTemplate_MergeExtractorsToBody) Equal(that interface{}) bool

type TransformationTemplate_Passthrough

type TransformationTemplate_Passthrough struct {
	Passthrough *Passthrough `protobuf:"bytes,5,opt,name=passthrough,proto3,oneof" json:"passthrough,omitempty"`
}

func (*TransformationTemplate_Passthrough) Equal

func (this *TransformationTemplate_Passthrough) Equal(that interface{}) bool

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) EnumDescriptor

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

func (TransformationTemplate_RequestBodyParse) String

type Transformation_HeaderBodyTransform

type Transformation_HeaderBodyTransform struct {
	HeaderBodyTransform *HeaderBodyTransform `` /* 126-byte string literal not displayed */
}

func (*Transformation_HeaderBodyTransform) Equal

func (this *Transformation_HeaderBodyTransform) Equal(that interface{}) bool

type Transformation_TransformationTemplate

type Transformation_TransformationTemplate struct {
	TransformationTemplate *TransformationTemplate `` /* 133-byte string literal not displayed */
}

func (*Transformation_TransformationTemplate) Equal

func (this *Transformation_TransformationTemplate) Equal(that interface{}) bool

Jump to

Keyboard shortcuts

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