transformation

package
v0.0.0-...-5a6645a Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extraction

type Extraction struct {
	Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// what information to extract. if extraction fails the result is
	// an empty value.
	Regex                string   `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"`
	Subgroup             uint32   `protobuf:"varint,3,opt,name=subgroup,proto3" json:"subgroup,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Extraction) Descriptor

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

func (*Extraction) Equal

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

func (*Extraction) GetHeader

func (m *Extraction) GetHeader() string

func (*Extraction) GetRegex

func (m *Extraction) GetRegex() string

func (*Extraction) GetSubgroup

func (m *Extraction) GetSubgroup() uint32

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_Size

func (m *Extraction) XXX_Size() int

func (*Extraction) XXX_Unmarshal

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

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"`
	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) GetTransformations

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

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) 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:"-"`
}

custom functions: header_value(name) -> from the original headers extracted_value(name, index) -> from the extracted values

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

type RouteTransformations struct {
	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"`
	ResponseTransformation *Transformation `` /* 127-byte string literal not displayed */
	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

func (m *RouteTransformations) GetClearRouteCache() bool

func (*RouteTransformations) GetRequestTransformation

func (m *RouteTransformations) GetRequestTransformation() *Transformation

func (*RouteTransformations) GetResponseTransformation

func (m *RouteTransformations) GetResponseTransformation() *Transformation

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 Transformation

type Transformation struct {
	// Template is in the transformed request language domain
	// currently both are JSON
	//
	// 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:"-"`
}

[#proto-status: experimental]

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) 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 *route.RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
	// transformation to perform
	RouteTransformations *RouteTransformations `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() *route.RouteMatch

func (*TransformationRule) GetRouteTransformations

func (m *TransformationRule) GetRouteTransformations() *RouteTransformations

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 TransformationTemplate

type TransformationTemplate struct {
	AdvancedTemplates bool `protobuf:"varint,1,opt,name=advanced_templates,json=advancedTemplates,proto3" json:"advanced_templates,omitempty"`
	// Extractors are in the origin request language domain
	Extractors map[string]*Extraction   `` /* 161-byte string literal not displayed */
	Headers    map[string]*InjaTemplate `` /* 155-byte string literal not displayed */
	// Types that are valid to be assigned to BodyTransformation:
	//	*TransformationTemplate_Body
	//	*TransformationTemplate_Passthrough
	//	*TransformationTemplate_MergeExtractorsToBody
	BodyTransformation   isTransformationTemplate_BodyTransformation `protobuf_oneof:"body_transformation"`
	XXX_NoUnkeyedLiteral struct{}                                    `json:"-"`
	XXX_unrecognized     []byte                                      `json:"-"`
	XXX_sizecache        int32                                       `json:"-"`
}

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

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

func (*TransformationTemplate) GetHeaders

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

func (*TransformationTemplate) GetMergeExtractorsToBody

func (m *TransformationTemplate) GetMergeExtractorsToBody() *MergeExtractorsToBody

func (*TransformationTemplate) GetPassthrough

func (m *TransformationTemplate) GetPassthrough() *Passthrough

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_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 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