json_to_metadatav3

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JsonToMetadata_ValueType_name = map[int32]string{
		0: "PROTOBUF_VALUE",
		1: "STRING",
		2: "NUMBER",
	}
	JsonToMetadata_ValueType_value = map[string]int32{
		"PROTOBUF_VALUE": 0,
		"STRING":         1,
		"NUMBER":         2,
	}
)

Enum value maps for JsonToMetadata_ValueType.

View Source
var File_envoy_extensions_filters_http_json_to_metadata_v3_json_to_metadata_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type JsonToMetadata

type JsonToMetadata struct {

	// At least one of request_rules and response_rules must be provided.
	// Rules to match json body of requests.
	RequestRules *JsonToMetadata_MatchRules `protobuf:"bytes,1,opt,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"`
	// Rules to match json body of responses.
	ResponseRules *JsonToMetadata_MatchRules `protobuf:"bytes,2,opt,name=response_rules,json=responseRules,proto3" json:"response_rules,omitempty"`
	// contains filtered or unexported fields
}

func (*JsonToMetadata) Descriptor deprecated

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

Deprecated: Use JsonToMetadata.ProtoReflect.Descriptor instead.

func (*JsonToMetadata) GetRequestRules

func (x *JsonToMetadata) GetRequestRules() *JsonToMetadata_MatchRules

func (*JsonToMetadata) GetResponseRules

func (x *JsonToMetadata) GetResponseRules() *JsonToMetadata_MatchRules

func (*JsonToMetadata) ProtoMessage

func (*JsonToMetadata) ProtoMessage()

func (*JsonToMetadata) ProtoReflect

func (x *JsonToMetadata) ProtoReflect() protoreflect.Message

func (*JsonToMetadata) Reset

func (x *JsonToMetadata) Reset()

func (*JsonToMetadata) String

func (x *JsonToMetadata) String() string

func (*JsonToMetadata) Validate

func (m *JsonToMetadata) Validate() error

Validate checks the field values on JsonToMetadata 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 (*JsonToMetadata) ValidateAll

func (m *JsonToMetadata) ValidateAll() error

ValidateAll checks the field values on JsonToMetadata 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 JsonToMetadataMultiError, or nil if none found.

type JsonToMetadataMultiError

type JsonToMetadataMultiError []error

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

func (JsonToMetadataMultiError) AllErrors

func (m JsonToMetadataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (JsonToMetadataMultiError) Error

func (m JsonToMetadataMultiError) Error() string

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

type JsonToMetadataValidationError

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

JsonToMetadataValidationError is the validation error returned by JsonToMetadata.Validate if the designated constraints aren't met.

func (JsonToMetadataValidationError) Cause

Cause function returns cause value.

func (JsonToMetadataValidationError) Error

Error satisfies the builtin error interface

func (JsonToMetadataValidationError) ErrorName

func (e JsonToMetadataValidationError) ErrorName() string

ErrorName returns error name.

func (JsonToMetadataValidationError) Field

Field function returns field value.

func (JsonToMetadataValidationError) Key

Key function returns key value.

func (JsonToMetadataValidationError) Reason

Reason function returns reason value.

type JsonToMetadata_KeyValuePair

type JsonToMetadata_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:
	//
	//	*JsonToMetadata_KeyValuePair_Value
	ValueType isJsonToMetadata_KeyValuePair_ValueType `protobuf_oneof:"value_type"`
	// The value's type — defaults to protobuf.Value.
	Type JsonToMetadata_ValueType `` /* 142-byte string literal not displayed */
	// False if we want to overwrite the existing metadata value. Default to false.
	PreserveExistingMetadataValue bool `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

[#next-free-field: 6]

func (*JsonToMetadata_KeyValuePair) Descriptor deprecated

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

Deprecated: Use JsonToMetadata_KeyValuePair.ProtoReflect.Descriptor instead.

func (*JsonToMetadata_KeyValuePair) GetKey

func (x *JsonToMetadata_KeyValuePair) GetKey() string

func (*JsonToMetadata_KeyValuePair) GetMetadataNamespace

func (x *JsonToMetadata_KeyValuePair) GetMetadataNamespace() string

func (*JsonToMetadata_KeyValuePair) GetPreserveExistingMetadataValue

func (x *JsonToMetadata_KeyValuePair) GetPreserveExistingMetadataValue() bool

func (*JsonToMetadata_KeyValuePair) GetType

func (*JsonToMetadata_KeyValuePair) GetValue

func (x *JsonToMetadata_KeyValuePair) GetValue() *_struct.Value

func (*JsonToMetadata_KeyValuePair) GetValueType

func (m *JsonToMetadata_KeyValuePair) GetValueType() isJsonToMetadata_KeyValuePair_ValueType

func (*JsonToMetadata_KeyValuePair) ProtoMessage

func (*JsonToMetadata_KeyValuePair) ProtoMessage()

func (*JsonToMetadata_KeyValuePair) ProtoReflect

func (*JsonToMetadata_KeyValuePair) Reset

func (x *JsonToMetadata_KeyValuePair) Reset()

func (*JsonToMetadata_KeyValuePair) String

func (x *JsonToMetadata_KeyValuePair) String() string

func (*JsonToMetadata_KeyValuePair) Validate

func (m *JsonToMetadata_KeyValuePair) Validate() error

Validate checks the field values on JsonToMetadata_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 (*JsonToMetadata_KeyValuePair) ValidateAll

func (m *JsonToMetadata_KeyValuePair) ValidateAll() error

ValidateAll checks the field values on JsonToMetadata_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 JsonToMetadata_KeyValuePairMultiError, or nil if none found.

type JsonToMetadata_KeyValuePairMultiError

type JsonToMetadata_KeyValuePairMultiError []error

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

func (JsonToMetadata_KeyValuePairMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (JsonToMetadata_KeyValuePairMultiError) Error

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

type JsonToMetadata_KeyValuePairValidationError

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

JsonToMetadata_KeyValuePairValidationError is the validation error returned by JsonToMetadata_KeyValuePair.Validate if the designated constraints aren't met.

func (JsonToMetadata_KeyValuePairValidationError) Cause

Cause function returns cause value.

func (JsonToMetadata_KeyValuePairValidationError) Error

Error satisfies the builtin error interface

func (JsonToMetadata_KeyValuePairValidationError) ErrorName

ErrorName returns error name.

func (JsonToMetadata_KeyValuePairValidationError) Field

Field function returns field value.

func (JsonToMetadata_KeyValuePairValidationError) Key

Key function returns key value.

func (JsonToMetadata_KeyValuePairValidationError) Reason

Reason function returns reason value.

type JsonToMetadata_KeyValuePair_Value

type JsonToMetadata_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 the value of the JSON key. If both are empty, the the value of the
	// JSON key is used as-is.
	//
	// When used for on_missing/on_error case, a non-empty value
	// must be provided.
	//
	// It ignores ValueType, i.e., not type casting.
	Value *_struct.Value `protobuf:"bytes,3,opt,name=value,proto3,oneof"`
}

type JsonToMetadata_MatchRules

type JsonToMetadata_MatchRules struct {

	// The list of rules to apply.
	Rules []*JsonToMetadata_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// Allowed content-type for json to metadata transformation.
	// Default to “{"application/json"}“.
	//
	// Set “allow_empty_content_type“ if empty/missing content-type header
	// is allowed.
	AllowContentTypes []string `protobuf:"bytes,2,rep,name=allow_content_types,json=allowContentTypes,proto3" json:"allow_content_types,omitempty"`
	// Allowed empty content-type for json to metadata transformation.
	// Default to false.
	AllowEmptyContentType bool `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*JsonToMetadata_MatchRules) Descriptor deprecated

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

Deprecated: Use JsonToMetadata_MatchRules.ProtoReflect.Descriptor instead.

func (*JsonToMetadata_MatchRules) GetAllowContentTypes

func (x *JsonToMetadata_MatchRules) GetAllowContentTypes() []string

func (*JsonToMetadata_MatchRules) GetAllowEmptyContentType

func (x *JsonToMetadata_MatchRules) GetAllowEmptyContentType() bool

func (*JsonToMetadata_MatchRules) GetRules

func (*JsonToMetadata_MatchRules) ProtoMessage

func (*JsonToMetadata_MatchRules) ProtoMessage()

func (*JsonToMetadata_MatchRules) ProtoReflect

func (*JsonToMetadata_MatchRules) Reset

func (x *JsonToMetadata_MatchRules) Reset()

func (*JsonToMetadata_MatchRules) String

func (x *JsonToMetadata_MatchRules) String() string

func (*JsonToMetadata_MatchRules) Validate

func (m *JsonToMetadata_MatchRules) Validate() error

Validate checks the field values on JsonToMetadata_MatchRules 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 (*JsonToMetadata_MatchRules) ValidateAll

func (m *JsonToMetadata_MatchRules) ValidateAll() error

ValidateAll checks the field values on JsonToMetadata_MatchRules 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 JsonToMetadata_MatchRulesMultiError, or nil if none found.

type JsonToMetadata_MatchRulesMultiError

type JsonToMetadata_MatchRulesMultiError []error

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

func (JsonToMetadata_MatchRulesMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (JsonToMetadata_MatchRulesMultiError) Error

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

type JsonToMetadata_MatchRulesValidationError

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

JsonToMetadata_MatchRulesValidationError is the validation error returned by JsonToMetadata_MatchRules.Validate if the designated constraints aren't met.

func (JsonToMetadata_MatchRulesValidationError) Cause

Cause function returns cause value.

func (JsonToMetadata_MatchRulesValidationError) Error

Error satisfies the builtin error interface

func (JsonToMetadata_MatchRulesValidationError) ErrorName

ErrorName returns error name.

func (JsonToMetadata_MatchRulesValidationError) Field

Field function returns field value.

func (JsonToMetadata_MatchRulesValidationError) Key

Key function returns key value.

func (JsonToMetadata_MatchRulesValidationError) Reason

Reason function returns reason value.

type JsonToMetadata_Rule

type JsonToMetadata_Rule struct {

	// Specifies that a match will be performed on the value of a property.
	// Here's an example to match on 1 in {"foo": {"bar": 1}, "bar": 2}
	//
	// selectors:
	// - key: foo
	// - key: bar
	Selectors []*JsonToMetadata_Selector `protobuf:"bytes,1,rep,name=selectors,proto3" json:"selectors,omitempty"`
	// If the attribute is present, apply this metadata KeyValuePair.
	OnPresent *JsonToMetadata_KeyValuePair `protobuf:"bytes,2,opt,name=on_present,json=onPresent,proto3" json:"on_present,omitempty"`
	// If the attribute is missing, apply this metadata KeyValuePair.
	//
	// The value in the KeyValuePair must be set.
	OnMissing *JsonToMetadata_KeyValuePair `protobuf:"bytes,3,opt,name=on_missing,json=onMissing,proto3" json:"on_missing,omitempty"`
	// If the body is too large or fail to parse, apply this metadata KeyValuePair.
	//
	// The value in the KeyValuePair must be set.
	OnError *JsonToMetadata_KeyValuePair `protobuf:"bytes,4,opt,name=on_error,json=onError,proto3" json:"on_error,omitempty"`
	// contains filtered or unexported fields
}

A Rule defines what metadata to apply when a key-value is present, missing in the json or fail to parse the payload.

func (*JsonToMetadata_Rule) Descriptor deprecated

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

Deprecated: Use JsonToMetadata_Rule.ProtoReflect.Descriptor instead.

func (*JsonToMetadata_Rule) GetOnError

func (*JsonToMetadata_Rule) GetOnMissing

func (*JsonToMetadata_Rule) GetOnPresent

func (*JsonToMetadata_Rule) GetSelectors

func (x *JsonToMetadata_Rule) GetSelectors() []*JsonToMetadata_Selector

func (*JsonToMetadata_Rule) ProtoMessage

func (*JsonToMetadata_Rule) ProtoMessage()

func (*JsonToMetadata_Rule) ProtoReflect

func (x *JsonToMetadata_Rule) ProtoReflect() protoreflect.Message

func (*JsonToMetadata_Rule) Reset

func (x *JsonToMetadata_Rule) Reset()

func (*JsonToMetadata_Rule) String

func (x *JsonToMetadata_Rule) String() string

func (*JsonToMetadata_Rule) Validate

func (m *JsonToMetadata_Rule) Validate() error

Validate checks the field values on JsonToMetadata_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 (*JsonToMetadata_Rule) ValidateAll

func (m *JsonToMetadata_Rule) ValidateAll() error

ValidateAll checks the field values on JsonToMetadata_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 JsonToMetadata_RuleMultiError, or nil if none found.

type JsonToMetadata_RuleMultiError

type JsonToMetadata_RuleMultiError []error

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

func (JsonToMetadata_RuleMultiError) AllErrors

func (m JsonToMetadata_RuleMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (JsonToMetadata_RuleMultiError) Error

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

type JsonToMetadata_RuleValidationError

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

JsonToMetadata_RuleValidationError is the validation error returned by JsonToMetadata_Rule.Validate if the designated constraints aren't met.

func (JsonToMetadata_RuleValidationError) Cause

Cause function returns cause value.

func (JsonToMetadata_RuleValidationError) Error

Error satisfies the builtin error interface

func (JsonToMetadata_RuleValidationError) ErrorName

ErrorName returns error name.

func (JsonToMetadata_RuleValidationError) Field

Field function returns field value.

func (JsonToMetadata_RuleValidationError) Key

Key function returns key value.

func (JsonToMetadata_RuleValidationError) Reason

Reason function returns reason value.

type JsonToMetadata_Selector

type JsonToMetadata_Selector struct {

	// Types that are assignable to Selector:
	//
	//	*JsonToMetadata_Selector_Key
	Selector isJsonToMetadata_Selector_Selector `protobuf_oneof:"selector"`
	// contains filtered or unexported fields
}

func (*JsonToMetadata_Selector) Descriptor deprecated

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

Deprecated: Use JsonToMetadata_Selector.ProtoReflect.Descriptor instead.

func (*JsonToMetadata_Selector) GetKey

func (x *JsonToMetadata_Selector) GetKey() string

func (*JsonToMetadata_Selector) GetSelector

func (m *JsonToMetadata_Selector) GetSelector() isJsonToMetadata_Selector_Selector

func (*JsonToMetadata_Selector) ProtoMessage

func (*JsonToMetadata_Selector) ProtoMessage()

func (*JsonToMetadata_Selector) ProtoReflect

func (x *JsonToMetadata_Selector) ProtoReflect() protoreflect.Message

func (*JsonToMetadata_Selector) Reset

func (x *JsonToMetadata_Selector) Reset()

func (*JsonToMetadata_Selector) String

func (x *JsonToMetadata_Selector) String() string

func (*JsonToMetadata_Selector) Validate

func (m *JsonToMetadata_Selector) Validate() error

Validate checks the field values on JsonToMetadata_Selector 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 (*JsonToMetadata_Selector) ValidateAll

func (m *JsonToMetadata_Selector) ValidateAll() error

ValidateAll checks the field values on JsonToMetadata_Selector 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 JsonToMetadata_SelectorMultiError, or nil if none found.

type JsonToMetadata_SelectorMultiError

type JsonToMetadata_SelectorMultiError []error

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

func (JsonToMetadata_SelectorMultiError) AllErrors

func (m JsonToMetadata_SelectorMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (JsonToMetadata_SelectorMultiError) Error

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

type JsonToMetadata_SelectorValidationError

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

JsonToMetadata_SelectorValidationError is the validation error returned by JsonToMetadata_Selector.Validate if the designated constraints aren't met.

func (JsonToMetadata_SelectorValidationError) Cause

Cause function returns cause value.

func (JsonToMetadata_SelectorValidationError) Error

Error satisfies the builtin error interface

func (JsonToMetadata_SelectorValidationError) ErrorName

ErrorName returns error name.

func (JsonToMetadata_SelectorValidationError) Field

Field function returns field value.

func (JsonToMetadata_SelectorValidationError) Key

Key function returns key value.

func (JsonToMetadata_SelectorValidationError) Reason

Reason function returns reason value.

type JsonToMetadata_Selector_Key

type JsonToMetadata_Selector_Key struct {
	// key to match
	Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"`
}

type JsonToMetadata_ValueType

type JsonToMetadata_ValueType int32
const (
	// The value is a serialized `protobuf.Value
	// <https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto#L62>`_.
	JsonToMetadata_PROTOBUF_VALUE JsonToMetadata_ValueType = 0
	JsonToMetadata_STRING         JsonToMetadata_ValueType = 1
	JsonToMetadata_NUMBER         JsonToMetadata_ValueType = 2
)

func (JsonToMetadata_ValueType) Descriptor

func (JsonToMetadata_ValueType) Enum

func (JsonToMetadata_ValueType) EnumDescriptor deprecated

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

Deprecated: Use JsonToMetadata_ValueType.Descriptor instead.

func (JsonToMetadata_ValueType) Number

func (JsonToMetadata_ValueType) String

func (x JsonToMetadata_ValueType) String() string

func (JsonToMetadata_ValueType) Type

Jump to

Keyboard shortcuts

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