Documentation
¶
Index ¶
- Constants
- Variables
- type HeaderToMetadata
- func (x *HeaderToMetadata) GetRequestRules() []*HeaderToMetadata_Rule
- func (*HeaderToMetadata) ProtoMessage()
- func (x *HeaderToMetadata) ProtoReflect() protoreflect.Message
- func (x *HeaderToMetadata) Reset()
- func (x *HeaderToMetadata) SetRequestRules(v []*HeaderToMetadata_Rule)
- func (x *HeaderToMetadata) String() string
- type HeaderToMetadata_KeyValuePair
- func (x *HeaderToMetadata_KeyValuePair) ClearRegexValueRewrite()
- func (x *HeaderToMetadata_KeyValuePair) ClearValue()
- func (x *HeaderToMetadata_KeyValuePair) ClearValueType()
- func (x *HeaderToMetadata_KeyValuePair) GetEncode() HeaderToMetadata_ValueEncode
- func (x *HeaderToMetadata_KeyValuePair) GetKey() string
- func (x *HeaderToMetadata_KeyValuePair) GetMetadataNamespace() string
- func (x *HeaderToMetadata_KeyValuePair) GetRegexValueRewrite() *v3.RegexMatchAndSubstitute
- func (x *HeaderToMetadata_KeyValuePair) GetType() HeaderToMetadata_ValueType
- func (x *HeaderToMetadata_KeyValuePair) GetValue() string
- func (x *HeaderToMetadata_KeyValuePair) GetValueType() isHeaderToMetadata_KeyValuePair_ValueType
- func (x *HeaderToMetadata_KeyValuePair) HasRegexValueRewrite() bool
- func (x *HeaderToMetadata_KeyValuePair) HasValue() bool
- func (x *HeaderToMetadata_KeyValuePair) HasValueType() bool
- func (*HeaderToMetadata_KeyValuePair) ProtoMessage()
- func (x *HeaderToMetadata_KeyValuePair) ProtoReflect() protoreflect.Message
- func (x *HeaderToMetadata_KeyValuePair) Reset()
- func (x *HeaderToMetadata_KeyValuePair) SetEncode(v HeaderToMetadata_ValueEncode)
- func (x *HeaderToMetadata_KeyValuePair) SetKey(v string)
- func (x *HeaderToMetadata_KeyValuePair) SetMetadataNamespace(v string)
- func (x *HeaderToMetadata_KeyValuePair) SetRegexValueRewrite(v *v3.RegexMatchAndSubstitute)
- func (x *HeaderToMetadata_KeyValuePair) SetType(v HeaderToMetadata_ValueType)
- func (x *HeaderToMetadata_KeyValuePair) SetValue(v string)
- func (x *HeaderToMetadata_KeyValuePair) String() string
- func (x *HeaderToMetadata_KeyValuePair) WhichValueType() case_HeaderToMetadata_KeyValuePair_ValueType
- type HeaderToMetadata_KeyValuePair_RegexValueRewrite
- type HeaderToMetadata_KeyValuePair_Value
- type HeaderToMetadata_KeyValuePair_builder
- type HeaderToMetadata_Rule
- func (x *HeaderToMetadata_Rule) ClearOnMissing()
- func (x *HeaderToMetadata_Rule) ClearOnPresent()
- func (x *HeaderToMetadata_Rule) GetHeader() string
- func (x *HeaderToMetadata_Rule) GetOnMissing() *HeaderToMetadata_KeyValuePair
- func (x *HeaderToMetadata_Rule) GetOnPresent() *HeaderToMetadata_KeyValuePair
- func (x *HeaderToMetadata_Rule) GetRemove() bool
- func (x *HeaderToMetadata_Rule) HasOnMissing() bool
- func (x *HeaderToMetadata_Rule) HasOnPresent() bool
- func (*HeaderToMetadata_Rule) ProtoMessage()
- func (x *HeaderToMetadata_Rule) ProtoReflect() protoreflect.Message
- func (x *HeaderToMetadata_Rule) Reset()
- func (x *HeaderToMetadata_Rule) SetHeader(v string)
- func (x *HeaderToMetadata_Rule) SetOnMissing(v *HeaderToMetadata_KeyValuePair)
- func (x *HeaderToMetadata_Rule) SetOnPresent(v *HeaderToMetadata_KeyValuePair)
- func (x *HeaderToMetadata_Rule) SetRemove(v bool)
- func (x *HeaderToMetadata_Rule) String() string
- type HeaderToMetadata_Rule_builder
- type HeaderToMetadata_ValueEncode
- func (HeaderToMetadata_ValueEncode) Descriptor() protoreflect.EnumDescriptor
- func (x HeaderToMetadata_ValueEncode) Enum() *HeaderToMetadata_ValueEncode
- func (x HeaderToMetadata_ValueEncode) Number() protoreflect.EnumNumber
- func (x HeaderToMetadata_ValueEncode) String() string
- func (HeaderToMetadata_ValueEncode) Type() protoreflect.EnumType
- type HeaderToMetadata_ValueType
- func (HeaderToMetadata_ValueType) Descriptor() protoreflect.EnumDescriptor
- func (x HeaderToMetadata_ValueType) Enum() *HeaderToMetadata_ValueType
- func (x HeaderToMetadata_ValueType) Number() protoreflect.EnumNumber
- func (x HeaderToMetadata_ValueType) String() string
- func (HeaderToMetadata_ValueType) Type() protoreflect.EnumType
- type HeaderToMetadata_builder
Constants ¶
View Source
const HeaderToMetadata_KeyValuePair_RegexValueRewrite_case case_HeaderToMetadata_KeyValuePair_ValueType = 4
View Source
const HeaderToMetadata_KeyValuePair_ValueType_not_set_case case_HeaderToMetadata_KeyValuePair_ValueType = 0
View Source
const HeaderToMetadata_KeyValuePair_Value_case case_HeaderToMetadata_KeyValuePair_ValueType = 3
Variables ¶
View Source
var ( HeaderToMetadata_ValueType_name = map[int32]string{ 0: "STRING", 1: "NUMBER", 2: "PROTOBUF_VALUE", } HeaderToMetadata_ValueType_value = map[string]int32{ "STRING": 0, "NUMBER": 1, "PROTOBUF_VALUE": 2, } )
Enum value maps for HeaderToMetadata_ValueType.
View Source
var ( HeaderToMetadata_ValueEncode_name = map[int32]string{ 0: "NONE", 1: "BASE64", } HeaderToMetadata_ValueEncode_value = map[string]int32{ "NONE": 0, "BASE64": 1, } )
Enum value maps for HeaderToMetadata_ValueEncode.
View Source
var File_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type HeaderToMetadata ¶
type HeaderToMetadata struct {
// The list of rules to apply to requests.
RequestRules []*HeaderToMetadata_Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"`
// contains filtered or unexported fields
}
func (*HeaderToMetadata) GetRequestRules ¶
func (x *HeaderToMetadata) GetRequestRules() []*HeaderToMetadata_Rule
func (*HeaderToMetadata) ProtoMessage ¶
func (*HeaderToMetadata) ProtoMessage()
func (*HeaderToMetadata) ProtoReflect ¶
func (x *HeaderToMetadata) ProtoReflect() protoreflect.Message
func (*HeaderToMetadata) Reset ¶
func (x *HeaderToMetadata) Reset()
func (*HeaderToMetadata) SetRequestRules ¶
func (x *HeaderToMetadata) SetRequestRules(v []*HeaderToMetadata_Rule)
func (*HeaderToMetadata) String ¶
func (x *HeaderToMetadata) String() string
type HeaderToMetadata_KeyValuePair ¶
type HeaderToMetadata_KeyValuePair struct {
// The namespace — if this is empty, the filter's namespace will be used.
MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"`
// The key to use within the namespace.
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// Types that are valid to be assigned to ValueType:
//
// *HeaderToMetadata_KeyValuePair_Value
// *HeaderToMetadata_KeyValuePair_RegexValueRewrite
ValueType isHeaderToMetadata_KeyValuePair_ValueType `protobuf_oneof:"value_type"`
// The value's type — defaults to string.
Type HeaderToMetadata_ValueType `` /* 170-byte string literal not displayed */
// How is the value encoded, default is NONE (not encoded).
// The value will be decoded accordingly before storing to metadata.
Encode HeaderToMetadata_ValueEncode `` /* 176-byte string literal not displayed */
// contains filtered or unexported fields
}
[#next-free-field: 7]
func (*HeaderToMetadata_KeyValuePair) ClearRegexValueRewrite ¶
func (x *HeaderToMetadata_KeyValuePair) ClearRegexValueRewrite()
func (*HeaderToMetadata_KeyValuePair) ClearValue ¶
func (x *HeaderToMetadata_KeyValuePair) ClearValue()
func (*HeaderToMetadata_KeyValuePair) ClearValueType ¶
func (x *HeaderToMetadata_KeyValuePair) ClearValueType()
func (*HeaderToMetadata_KeyValuePair) GetEncode ¶
func (x *HeaderToMetadata_KeyValuePair) GetEncode() HeaderToMetadata_ValueEncode
func (*HeaderToMetadata_KeyValuePair) GetKey ¶
func (x *HeaderToMetadata_KeyValuePair) GetKey() string
func (*HeaderToMetadata_KeyValuePair) GetMetadataNamespace ¶
func (x *HeaderToMetadata_KeyValuePair) GetMetadataNamespace() string
func (*HeaderToMetadata_KeyValuePair) GetRegexValueRewrite ¶
func (x *HeaderToMetadata_KeyValuePair) GetRegexValueRewrite() *v3.RegexMatchAndSubstitute
func (*HeaderToMetadata_KeyValuePair) GetType ¶
func (x *HeaderToMetadata_KeyValuePair) GetType() HeaderToMetadata_ValueType
func (*HeaderToMetadata_KeyValuePair) GetValue ¶
func (x *HeaderToMetadata_KeyValuePair) GetValue() string
func (*HeaderToMetadata_KeyValuePair) GetValueType ¶
func (x *HeaderToMetadata_KeyValuePair) GetValueType() isHeaderToMetadata_KeyValuePair_ValueType
func (*HeaderToMetadata_KeyValuePair) HasRegexValueRewrite ¶
func (x *HeaderToMetadata_KeyValuePair) HasRegexValueRewrite() bool
func (*HeaderToMetadata_KeyValuePair) HasValue ¶
func (x *HeaderToMetadata_KeyValuePair) HasValue() bool
func (*HeaderToMetadata_KeyValuePair) HasValueType ¶
func (x *HeaderToMetadata_KeyValuePair) HasValueType() bool
func (*HeaderToMetadata_KeyValuePair) ProtoMessage ¶
func (*HeaderToMetadata_KeyValuePair) ProtoMessage()
func (*HeaderToMetadata_KeyValuePair) ProtoReflect ¶
func (x *HeaderToMetadata_KeyValuePair) ProtoReflect() protoreflect.Message
func (*HeaderToMetadata_KeyValuePair) Reset ¶
func (x *HeaderToMetadata_KeyValuePair) Reset()
func (*HeaderToMetadata_KeyValuePair) SetEncode ¶
func (x *HeaderToMetadata_KeyValuePair) SetEncode(v HeaderToMetadata_ValueEncode)
func (*HeaderToMetadata_KeyValuePair) SetKey ¶
func (x *HeaderToMetadata_KeyValuePair) SetKey(v string)
func (*HeaderToMetadata_KeyValuePair) SetMetadataNamespace ¶
func (x *HeaderToMetadata_KeyValuePair) SetMetadataNamespace(v string)
func (*HeaderToMetadata_KeyValuePair) SetRegexValueRewrite ¶
func (x *HeaderToMetadata_KeyValuePair) SetRegexValueRewrite(v *v3.RegexMatchAndSubstitute)
func (*HeaderToMetadata_KeyValuePair) SetType ¶
func (x *HeaderToMetadata_KeyValuePair) SetType(v HeaderToMetadata_ValueType)
func (*HeaderToMetadata_KeyValuePair) SetValue ¶
func (x *HeaderToMetadata_KeyValuePair) SetValue(v string)
func (*HeaderToMetadata_KeyValuePair) String ¶
func (x *HeaderToMetadata_KeyValuePair) String() string
func (*HeaderToMetadata_KeyValuePair) WhichValueType ¶
func (x *HeaderToMetadata_KeyValuePair) WhichValueType() case_HeaderToMetadata_KeyValuePair_ValueType
type HeaderToMetadata_KeyValuePair_RegexValueRewrite ¶
type HeaderToMetadata_KeyValuePair_RegexValueRewrite struct {
// If present, the header's value will be matched and substituted with this.
// If there is no match or substitution, the header value is used as-is.
//
// This is only used for on_present.
RegexValueRewrite *v3.RegexMatchAndSubstitute `protobuf:"bytes,4,opt,name=regex_value_rewrite,json=regexValueRewrite,proto3,oneof"`
}
type HeaderToMetadata_KeyValuePair_Value ¶
type HeaderToMetadata_KeyValuePair_Value struct {
// The value to pair with the given key.
//
// When used for on_present case, if value is non-empty it'll be used instead
// of the header value. If both are empty, the header value is used as-is.
//
// When used for on_missing case, a non-empty value must be provided.
Value string `protobuf:"bytes,3,opt,name=value,proto3,oneof"`
}
type HeaderToMetadata_KeyValuePair_builder ¶
type HeaderToMetadata_KeyValuePair_builder struct {
// The namespace — if this is empty, the filter's namespace will be used.
MetadataNamespace string
// The key to use within the namespace.
Key string
// Fields of oneof ValueType:
// The value to pair with the given key.
//
// When used for on_present case, if value is non-empty it'll be used instead
// of the header value. If both are empty, the header value is used as-is.
//
// When used for on_missing case, a non-empty value must be provided.
Value *string
// If present, the header's value will be matched and substituted with this.
// If there is no match or substitution, the header value is used as-is.
//
// This is only used for on_present.
RegexValueRewrite *v3.RegexMatchAndSubstitute
// -- end of ValueType
// The value's type — defaults to string.
Type HeaderToMetadata_ValueType
// How is the value encoded, default is NONE (not encoded).
// The value will be decoded accordingly before storing to metadata.
Encode HeaderToMetadata_ValueEncode
// contains filtered or unexported fields
}
func (HeaderToMetadata_KeyValuePair_builder) Build ¶
func (b0 HeaderToMetadata_KeyValuePair_builder) Build() *HeaderToMetadata_KeyValuePair
type HeaderToMetadata_Rule ¶
type HeaderToMetadata_Rule struct {
// Specifies that a match will be performed on the value of a header.
//
// The header to be extracted.
Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// If the header is present, apply this metadata KeyValuePair.
//
// If the value in the KeyValuePair is non-empty, it'll be used instead
// of the header value.
OnPresent *HeaderToMetadata_KeyValuePair `protobuf:"bytes,2,opt,name=on_present,json=onPresent,proto3" json:"on_present,omitempty"`
// If the header is not present, apply this metadata KeyValuePair.
//
// The value in the KeyValuePair must be set, since it'll be used in lieu
// of the missing header value.
OnMissing *HeaderToMetadata_KeyValuePair `protobuf:"bytes,3,opt,name=on_missing,json=onMissing,proto3" json:"on_missing,omitempty"`
// Whether or not to remove the header after a rule is applied.
//
// This prevents headers from leaking.
Remove bool `protobuf:"varint,4,opt,name=remove,proto3" json:"remove,omitempty"`
// contains filtered or unexported fields
}
A Rule defines what metadata to apply when a header is present or missing.
func (*HeaderToMetadata_Rule) ClearOnMissing ¶
func (x *HeaderToMetadata_Rule) ClearOnMissing()
func (*HeaderToMetadata_Rule) ClearOnPresent ¶
func (x *HeaderToMetadata_Rule) ClearOnPresent()
func (*HeaderToMetadata_Rule) GetHeader ¶
func (x *HeaderToMetadata_Rule) GetHeader() string
func (*HeaderToMetadata_Rule) GetOnMissing ¶
func (x *HeaderToMetadata_Rule) GetOnMissing() *HeaderToMetadata_KeyValuePair
func (*HeaderToMetadata_Rule) GetOnPresent ¶
func (x *HeaderToMetadata_Rule) GetOnPresent() *HeaderToMetadata_KeyValuePair
func (*HeaderToMetadata_Rule) GetRemove ¶
func (x *HeaderToMetadata_Rule) GetRemove() bool
func (*HeaderToMetadata_Rule) HasOnMissing ¶
func (x *HeaderToMetadata_Rule) HasOnMissing() bool
func (*HeaderToMetadata_Rule) HasOnPresent ¶
func (x *HeaderToMetadata_Rule) HasOnPresent() bool
func (*HeaderToMetadata_Rule) ProtoMessage ¶
func (*HeaderToMetadata_Rule) ProtoMessage()
func (*HeaderToMetadata_Rule) ProtoReflect ¶
func (x *HeaderToMetadata_Rule) ProtoReflect() protoreflect.Message
func (*HeaderToMetadata_Rule) Reset ¶
func (x *HeaderToMetadata_Rule) Reset()
func (*HeaderToMetadata_Rule) SetHeader ¶
func (x *HeaderToMetadata_Rule) SetHeader(v string)
func (*HeaderToMetadata_Rule) SetOnMissing ¶
func (x *HeaderToMetadata_Rule) SetOnMissing(v *HeaderToMetadata_KeyValuePair)
func (*HeaderToMetadata_Rule) SetOnPresent ¶
func (x *HeaderToMetadata_Rule) SetOnPresent(v *HeaderToMetadata_KeyValuePair)
func (*HeaderToMetadata_Rule) SetRemove ¶
func (x *HeaderToMetadata_Rule) SetRemove(v bool)
func (*HeaderToMetadata_Rule) String ¶
func (x *HeaderToMetadata_Rule) String() string
type HeaderToMetadata_Rule_builder ¶
type HeaderToMetadata_Rule_builder struct {
// Specifies that a match will be performed on the value of a header.
//
// The header to be extracted.
Header string
// If the header is present, apply this metadata KeyValuePair.
//
// If the value in the KeyValuePair is non-empty, it'll be used instead
// of the header value.
OnPresent *HeaderToMetadata_KeyValuePair
// If the header is not present, apply this metadata KeyValuePair.
//
// The value in the KeyValuePair must be set, since it'll be used in lieu
// of the missing header value.
OnMissing *HeaderToMetadata_KeyValuePair
// Whether or not to remove the header after a rule is applied.
//
// This prevents headers from leaking.
Remove bool
// contains filtered or unexported fields
}
func (HeaderToMetadata_Rule_builder) Build ¶
func (b0 HeaderToMetadata_Rule_builder) Build() *HeaderToMetadata_Rule
type HeaderToMetadata_ValueEncode ¶
type HeaderToMetadata_ValueEncode int32
ValueEncode defines the encoding algorithm.
const ( // The value is not encoded. HeaderToMetadata_NONE HeaderToMetadata_ValueEncode = 0 // The value is encoded in `Base64 <https://tools.ietf.org/html/rfc4648#section-4>`_. // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the // non-ASCII characters in the header. HeaderToMetadata_BASE64 HeaderToMetadata_ValueEncode = 1 )
func (HeaderToMetadata_ValueEncode) Descriptor ¶
func (HeaderToMetadata_ValueEncode) Descriptor() protoreflect.EnumDescriptor
func (HeaderToMetadata_ValueEncode) Enum ¶
func (x HeaderToMetadata_ValueEncode) Enum() *HeaderToMetadata_ValueEncode
func (HeaderToMetadata_ValueEncode) Number ¶
func (x HeaderToMetadata_ValueEncode) Number() protoreflect.EnumNumber
func (HeaderToMetadata_ValueEncode) String ¶
func (x HeaderToMetadata_ValueEncode) String() string
func (HeaderToMetadata_ValueEncode) Type ¶
func (HeaderToMetadata_ValueEncode) Type() protoreflect.EnumType
type HeaderToMetadata_ValueType ¶
type HeaderToMetadata_ValueType int32
const ( HeaderToMetadata_STRING HeaderToMetadata_ValueType = 0 HeaderToMetadata_NUMBER HeaderToMetadata_ValueType = 1 // The value is a serialized `protobuf.Value // <https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto#L62>`_. HeaderToMetadata_PROTOBUF_VALUE HeaderToMetadata_ValueType = 2 )
func (HeaderToMetadata_ValueType) Descriptor ¶
func (HeaderToMetadata_ValueType) Descriptor() protoreflect.EnumDescriptor
func (HeaderToMetadata_ValueType) Enum ¶
func (x HeaderToMetadata_ValueType) Enum() *HeaderToMetadata_ValueType
func (HeaderToMetadata_ValueType) Number ¶
func (x HeaderToMetadata_ValueType) Number() protoreflect.EnumNumber
func (HeaderToMetadata_ValueType) String ¶
func (x HeaderToMetadata_ValueType) String() string
func (HeaderToMetadata_ValueType) Type ¶
func (HeaderToMetadata_ValueType) Type() protoreflect.EnumType
type HeaderToMetadata_builder ¶
type HeaderToMetadata_builder struct {
// The list of rules to apply to requests.
RequestRules []*HeaderToMetadata_Rule
// contains filtered or unexported fields
}
func (HeaderToMetadata_builder) Build ¶
func (b0 HeaderToMetadata_builder) Build() *HeaderToMetadata
Source Files
¶
- header_to_metadata.pb.go
Click to show internal directories.
Click to hide internal directories.