Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetRequestRules() []*Config_Rule
- func (m *Config) GetResponseRules() []*Config_Rule
- func (m *Config) Marshal() (dAtA []byte, err error)
- func (m *Config) MarshalTo(dAtA []byte) (int, error)
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) Size() (n int)
- func (m *Config) String() string
- func (m *Config) Unmarshal(dAtA []byte) error
- func (m *Config) Validate() error
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type ConfigValidationError
- type Config_KeyValuePair
- func (*Config_KeyValuePair) Descriptor() ([]byte, []int)
- func (m *Config_KeyValuePair) GetKey() string
- func (m *Config_KeyValuePair) GetMetadataNamespace() string
- func (m *Config_KeyValuePair) GetType() Config_ValueType
- func (m *Config_KeyValuePair) GetValue() string
- func (m *Config_KeyValuePair) Marshal() (dAtA []byte, err error)
- func (m *Config_KeyValuePair) MarshalTo(dAtA []byte) (int, error)
- func (*Config_KeyValuePair) ProtoMessage()
- func (m *Config_KeyValuePair) Reset()
- func (m *Config_KeyValuePair) Size() (n int)
- func (m *Config_KeyValuePair) String() string
- func (m *Config_KeyValuePair) Unmarshal(dAtA []byte) error
- func (m *Config_KeyValuePair) Validate() error
- func (m *Config_KeyValuePair) XXX_DiscardUnknown()
- func (m *Config_KeyValuePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Config_KeyValuePair) XXX_Merge(src proto.Message)
- func (m *Config_KeyValuePair) XXX_Size() int
- func (m *Config_KeyValuePair) XXX_Unmarshal(b []byte) error
- type Config_KeyValuePairValidationError
- type Config_Rule
- func (*Config_Rule) Descriptor() ([]byte, []int)
- func (m *Config_Rule) GetHeader() string
- func (m *Config_Rule) GetOnHeaderMissing() *Config_KeyValuePair
- func (m *Config_Rule) GetOnHeaderPresent() *Config_KeyValuePair
- func (m *Config_Rule) GetRemove() bool
- func (m *Config_Rule) Marshal() (dAtA []byte, err error)
- func (m *Config_Rule) MarshalTo(dAtA []byte) (int, error)
- func (*Config_Rule) ProtoMessage()
- func (m *Config_Rule) Reset()
- func (m *Config_Rule) Size() (n int)
- func (m *Config_Rule) String() string
- func (m *Config_Rule) Unmarshal(dAtA []byte) error
- func (m *Config_Rule) Validate() error
- func (m *Config_Rule) XXX_DiscardUnknown()
- func (m *Config_Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Config_Rule) XXX_Merge(src proto.Message)
- func (m *Config_Rule) XXX_Size() int
- func (m *Config_Rule) XXX_Unmarshal(b []byte) error
- type Config_RuleValidationError
- type Config_ValueType
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHeaderToMetadata = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHeaderToMetadata = fmt.Errorf("proto: integer overflow") )
var Config_ValueType_name = map[int32]string{
0: "STRING",
1: "NUMBER",
}
var Config_ValueType_value = map[string]int32{
"STRING": 0,
"NUMBER": 1,
}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The list of rules to apply to requests. RequestRules []*Config_Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules" json:"request_rules,omitempty"` // The list of rules to apply to responses. ResponseRules []*Config_Rule `protobuf:"bytes,2,rep,name=response_rules,json=responseRules" json:"response_rules,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config) Descriptor ¶
func (*Config) GetRequestRules ¶
func (m *Config) GetRequestRules() []*Config_Rule
func (*Config) GetResponseRules ¶
func (m *Config) GetResponseRules() []*Config_Rule
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) Validate ¶
Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶
func (*Config) XXX_Unmarshal ¶
type ConfigValidationError ¶
ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.
func (ConfigValidationError) Error ¶
func (e ConfigValidationError) Error() string
Error satisfies the builtin error interface
type Config_KeyValuePair ¶
type Config_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"` // The value to pair with the given key. // // When used for a `on_header_present` case, if value is non-empty it'll be used // instead of the header value. If both are empty, no metadata is added. // // When used for a `on_header_missing` case, a non-empty value must be provided // otherwise no metadata is added. Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // The value's type — defaults to string. Type Config_ValueType `` /* 131-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config_KeyValuePair) Descriptor ¶
func (*Config_KeyValuePair) Descriptor() ([]byte, []int)
func (*Config_KeyValuePair) GetKey ¶
func (m *Config_KeyValuePair) GetKey() string
func (*Config_KeyValuePair) GetMetadataNamespace ¶
func (m *Config_KeyValuePair) GetMetadataNamespace() string
func (*Config_KeyValuePair) GetType ¶
func (m *Config_KeyValuePair) GetType() Config_ValueType
func (*Config_KeyValuePair) GetValue ¶
func (m *Config_KeyValuePair) GetValue() string
func (*Config_KeyValuePair) Marshal ¶
func (m *Config_KeyValuePair) Marshal() (dAtA []byte, err error)
func (*Config_KeyValuePair) MarshalTo ¶
func (m *Config_KeyValuePair) MarshalTo(dAtA []byte) (int, error)
func (*Config_KeyValuePair) ProtoMessage ¶
func (*Config_KeyValuePair) ProtoMessage()
func (*Config_KeyValuePair) Reset ¶
func (m *Config_KeyValuePair) Reset()
func (*Config_KeyValuePair) Size ¶
func (m *Config_KeyValuePair) Size() (n int)
func (*Config_KeyValuePair) String ¶
func (m *Config_KeyValuePair) String() string
func (*Config_KeyValuePair) Unmarshal ¶
func (m *Config_KeyValuePair) Unmarshal(dAtA []byte) error
func (*Config_KeyValuePair) Validate ¶
func (m *Config_KeyValuePair) Validate() error
Validate checks the field values on Config_KeyValuePair with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Config_KeyValuePair) XXX_DiscardUnknown ¶
func (m *Config_KeyValuePair) XXX_DiscardUnknown()
func (*Config_KeyValuePair) XXX_Marshal ¶
func (m *Config_KeyValuePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Config_KeyValuePair) XXX_Merge ¶
func (dst *Config_KeyValuePair) XXX_Merge(src proto.Message)
func (*Config_KeyValuePair) XXX_Size ¶
func (m *Config_KeyValuePair) XXX_Size() int
func (*Config_KeyValuePair) XXX_Unmarshal ¶
func (m *Config_KeyValuePair) XXX_Unmarshal(b []byte) error
type Config_KeyValuePairValidationError ¶
Config_KeyValuePairValidationError is the validation error returned by Config_KeyValuePair.Validate if the designated constraints aren't met.
func (Config_KeyValuePairValidationError) Error ¶
func (e Config_KeyValuePairValidationError) Error() string
Error satisfies the builtin error interface
type Config_Rule ¶
type Config_Rule struct { // The header that triggers this rule — required. 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. OnHeaderPresent *Config_KeyValuePair `protobuf:"bytes,2,opt,name=on_header_present,json=onHeaderPresent" json:"on_header_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. OnHeaderMissing *Config_KeyValuePair `protobuf:"bytes,3,opt,name=on_header_missing,json=onHeaderMissing" json:"on_header_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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A Rule defines what metadata to apply when a header is present or missing.
func (*Config_Rule) Descriptor ¶
func (*Config_Rule) Descriptor() ([]byte, []int)
func (*Config_Rule) GetHeader ¶
func (m *Config_Rule) GetHeader() string
func (*Config_Rule) GetOnHeaderMissing ¶
func (m *Config_Rule) GetOnHeaderMissing() *Config_KeyValuePair
func (*Config_Rule) GetOnHeaderPresent ¶
func (m *Config_Rule) GetOnHeaderPresent() *Config_KeyValuePair
func (*Config_Rule) GetRemove ¶
func (m *Config_Rule) GetRemove() bool
func (*Config_Rule) Marshal ¶
func (m *Config_Rule) Marshal() (dAtA []byte, err error)
func (*Config_Rule) ProtoMessage ¶
func (*Config_Rule) ProtoMessage()
func (*Config_Rule) Reset ¶
func (m *Config_Rule) Reset()
func (*Config_Rule) Size ¶
func (m *Config_Rule) Size() (n int)
func (*Config_Rule) String ¶
func (m *Config_Rule) String() string
func (*Config_Rule) Unmarshal ¶
func (m *Config_Rule) Unmarshal(dAtA []byte) error
func (*Config_Rule) Validate ¶
func (m *Config_Rule) Validate() error
Validate checks the field values on Config_Rule with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Config_Rule) XXX_DiscardUnknown ¶
func (m *Config_Rule) XXX_DiscardUnknown()
func (*Config_Rule) XXX_Marshal ¶
func (m *Config_Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Config_Rule) XXX_Merge ¶
func (dst *Config_Rule) XXX_Merge(src proto.Message)
func (*Config_Rule) XXX_Size ¶
func (m *Config_Rule) XXX_Size() int
func (*Config_Rule) XXX_Unmarshal ¶
func (m *Config_Rule) XXX_Unmarshal(b []byte) error
type Config_RuleValidationError ¶
Config_RuleValidationError is the validation error returned by Config_Rule.Validate if the designated constraints aren't met.
func (Config_RuleValidationError) Error ¶
func (e Config_RuleValidationError) Error() string
Error satisfies the builtin error interface
type Config_ValueType ¶
type Config_ValueType int32
const ( Config_STRING Config_ValueType = 0 Config_NUMBER Config_ValueType = 1 )
func (Config_ValueType) EnumDescriptor ¶
func (Config_ValueType) EnumDescriptor() ([]byte, []int)
func (Config_ValueType) String ¶
func (x Config_ValueType) String() string