transformation

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2019 License: Apache-2.0 Imports: 6 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 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 Parameters

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

func (*Parameters) Descriptor

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

func (*Parameters) Equal

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

func (*Parameters) GetHeaders

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

func (*Parameters) GetPath

func (m *Parameters) GetPath() *types.StringValue

func (*Parameters) ProtoMessage

func (*Parameters) ProtoMessage()

func (*Parameters) Reset

func (m *Parameters) Reset()

func (*Parameters) String

func (m *Parameters) String() string

func (*Parameters) XXX_DiscardUnknown

func (m *Parameters) XXX_DiscardUnknown()

func (*Parameters) XXX_Marshal

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

func (*Parameters) XXX_Merge

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

func (*Parameters) XXX_Size

func (m *Parameters) XXX_Size() int

func (*Parameters) XXX_Unmarshal

func (m *Parameters) 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 PrefixRewrite

type PrefixRewrite struct {
	// Set to an empty string to remove the matched HTTP Path prefix
	PrefixRewrite        string   `protobuf:"bytes,1,opt,name=prefix_rewrite,json=prefixRewrite,proto3" json:"prefix_rewrite,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

if set, prefix_rewrite will be used to rewrite the matched HTTP Path prefix on requests to this value.

func (*PrefixRewrite) Descriptor

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

func (*PrefixRewrite) Equal

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

func (*PrefixRewrite) GetPrefixRewrite

func (m *PrefixRewrite) GetPrefixRewrite() string

func (*PrefixRewrite) ProtoMessage

func (*PrefixRewrite) ProtoMessage()

func (*PrefixRewrite) Reset

func (m *PrefixRewrite) Reset()

func (*PrefixRewrite) String

func (m *PrefixRewrite) String() string

func (*PrefixRewrite) XXX_DiscardUnknown

func (m *PrefixRewrite) XXX_DiscardUnknown()

func (*PrefixRewrite) XXX_Marshal

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

func (*PrefixRewrite) XXX_Merge

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

func (*PrefixRewrite) XXX_Size

func (m *PrefixRewrite) XXX_Size() int

func (*PrefixRewrite) XXX_Unmarshal

func (m *PrefixRewrite) 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 added in v0.13.31

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_OneofFuncs

func (*Transformation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs 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 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_OneofFuncs

func (*TransformationTemplate) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs 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"`
}

func (*TransformationTemplate_Body) Equal

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

type TransformationTemplate_MergeExtractorsToBody

type TransformationTemplate_MergeExtractorsToBody struct {
	MergeExtractorsToBody *MergeExtractorsToBody `protobuf:"bytes,6,opt,name=merge_extractors_to_body,json=mergeExtractorsToBody,proto3,oneof"`
}

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

func (*TransformationTemplate_Passthrough) Equal

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

type Transformation_HeaderBodyTransform

type Transformation_HeaderBodyTransform struct {
	HeaderBodyTransform *HeaderBodyTransform `protobuf:"bytes,2,opt,name=header_body_transform,json=headerBodyTransform,proto3,oneof"`
}

func (*Transformation_HeaderBodyTransform) Equal

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

type Transformation_TransformationTemplate

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

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