header_to_metadatav3

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 19 Imported by: 11

Documentation

Index

Constants

This section is empty.

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) Descriptor deprecated

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

Deprecated: Use HeaderToMetadata.ProtoReflect.Descriptor instead.

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

func (x *HeaderToMetadata) String() string

func (*HeaderToMetadata) Validate

func (m *HeaderToMetadata) Validate() error

Validate checks the field values on HeaderToMetadata with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HeaderToMetadata) ValidateAll

func (m *HeaderToMetadata) ValidateAll() error

ValidateAll checks the field values on HeaderToMetadata with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HeaderToMetadataMultiError, or nil if none found.

type HeaderToMetadataMultiError

type HeaderToMetadataMultiError []error

HeaderToMetadataMultiError is an error wrapping multiple validation errors returned by HeaderToMetadata.ValidateAll() if the designated constraints aren't met.

func (HeaderToMetadataMultiError) AllErrors

func (m HeaderToMetadataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HeaderToMetadataMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type HeaderToMetadataValidationError

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

HeaderToMetadataValidationError is the validation error returned by HeaderToMetadata.Validate if the designated constraints aren't met.

func (HeaderToMetadataValidationError) Cause

Cause function returns cause value.

func (HeaderToMetadataValidationError) Error

Error satisfies the builtin error interface

func (HeaderToMetadataValidationError) ErrorName

ErrorName returns error name.

func (HeaderToMetadataValidationError) Field

Field function returns field value.

func (HeaderToMetadataValidationError) Key

Key function returns key value.

func (HeaderToMetadataValidationError) Reason

Reason function returns reason value.

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 assignable 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) Descriptor deprecated

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

Deprecated: Use HeaderToMetadata_KeyValuePair.ProtoReflect.Descriptor instead.

func (*HeaderToMetadata_KeyValuePair) GetEncode

func (*HeaderToMetadata_KeyValuePair) GetKey

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 (*HeaderToMetadata_KeyValuePair) GetValue

func (x *HeaderToMetadata_KeyValuePair) GetValue() string

func (*HeaderToMetadata_KeyValuePair) GetValueType

func (m *HeaderToMetadata_KeyValuePair) GetValueType() isHeaderToMetadata_KeyValuePair_ValueType

func (*HeaderToMetadata_KeyValuePair) ProtoMessage

func (*HeaderToMetadata_KeyValuePair) ProtoMessage()

func (*HeaderToMetadata_KeyValuePair) ProtoReflect

func (*HeaderToMetadata_KeyValuePair) Reset

func (x *HeaderToMetadata_KeyValuePair) Reset()

func (*HeaderToMetadata_KeyValuePair) String

func (*HeaderToMetadata_KeyValuePair) Validate

func (m *HeaderToMetadata_KeyValuePair) Validate() error

Validate checks the field values on HeaderToMetadata_KeyValuePair with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HeaderToMetadata_KeyValuePair) ValidateAll

func (m *HeaderToMetadata_KeyValuePair) ValidateAll() error

ValidateAll checks the field values on HeaderToMetadata_KeyValuePair with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HeaderToMetadata_KeyValuePairMultiError, or nil if none found.

type HeaderToMetadata_KeyValuePairMultiError

type HeaderToMetadata_KeyValuePairMultiError []error

HeaderToMetadata_KeyValuePairMultiError is an error wrapping multiple validation errors returned by HeaderToMetadata_KeyValuePair.ValidateAll() if the designated constraints aren't met.

func (HeaderToMetadata_KeyValuePairMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (HeaderToMetadata_KeyValuePairMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type HeaderToMetadata_KeyValuePairValidationError

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

HeaderToMetadata_KeyValuePairValidationError is the validation error returned by HeaderToMetadata_KeyValuePair.Validate if the designated constraints aren't met.

func (HeaderToMetadata_KeyValuePairValidationError) Cause

Cause function returns cause value.

func (HeaderToMetadata_KeyValuePairValidationError) Error

Error satisfies the builtin error interface

func (HeaderToMetadata_KeyValuePairValidationError) ErrorName

ErrorName returns error name.

func (HeaderToMetadata_KeyValuePairValidationError) Field

Field function returns field value.

func (HeaderToMetadata_KeyValuePairValidationError) Key

Key function returns key value.

func (HeaderToMetadata_KeyValuePairValidationError) Reason

Reason function returns reason value.

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_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) Descriptor deprecated

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

Deprecated: Use HeaderToMetadata_Rule.ProtoReflect.Descriptor instead.

func (*HeaderToMetadata_Rule) GetHeader

func (x *HeaderToMetadata_Rule) GetHeader() string

func (*HeaderToMetadata_Rule) GetOnMissing

func (*HeaderToMetadata_Rule) GetOnPresent

func (*HeaderToMetadata_Rule) GetRemove

func (x *HeaderToMetadata_Rule) GetRemove() 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) String

func (x *HeaderToMetadata_Rule) String() string

func (*HeaderToMetadata_Rule) Validate

func (m *HeaderToMetadata_Rule) Validate() error

Validate checks the field values on HeaderToMetadata_Rule with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*HeaderToMetadata_Rule) ValidateAll

func (m *HeaderToMetadata_Rule) ValidateAll() error

ValidateAll checks the field values on HeaderToMetadata_Rule with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HeaderToMetadata_RuleMultiError, or nil if none found.

type HeaderToMetadata_RuleMultiError

type HeaderToMetadata_RuleMultiError []error

HeaderToMetadata_RuleMultiError is an error wrapping multiple validation errors returned by HeaderToMetadata_Rule.ValidateAll() if the designated constraints aren't met.

func (HeaderToMetadata_RuleMultiError) AllErrors

func (m HeaderToMetadata_RuleMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HeaderToMetadata_RuleMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type HeaderToMetadata_RuleValidationError

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

HeaderToMetadata_RuleValidationError is the validation error returned by HeaderToMetadata_Rule.Validate if the designated constraints aren't met.

func (HeaderToMetadata_RuleValidationError) Cause

Cause function returns cause value.

func (HeaderToMetadata_RuleValidationError) Error

Error satisfies the builtin error interface

func (HeaderToMetadata_RuleValidationError) ErrorName

ErrorName returns error name.

func (HeaderToMetadata_RuleValidationError) Field

Field function returns field value.

func (HeaderToMetadata_RuleValidationError) Key

Key function returns key value.

func (HeaderToMetadata_RuleValidationError) Reason

Reason function returns reason value.

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

func (HeaderToMetadata_ValueEncode) EnumDescriptor deprecated

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

Deprecated: Use HeaderToMetadata_ValueEncode.Descriptor instead.

func (HeaderToMetadata_ValueEncode) Number

func (HeaderToMetadata_ValueEncode) String

func (HeaderToMetadata_ValueEncode) Type

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

func (HeaderToMetadata_ValueType) EnumDescriptor deprecated

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

Deprecated: Use HeaderToMetadata_ValueType.Descriptor instead.

func (HeaderToMetadata_ValueType) Number

func (HeaderToMetadata_ValueType) String

func (HeaderToMetadata_ValueType) Type

Jump to

Keyboard shortcuts

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