hmac_auth

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Name = "hmacAuth"
)

Variables

View Source
var (
	Algorithm_name = map[int32]string{
		0: "HMAC_SHA256",
		1: "HMAC_SHA384",
		2: "HMAC_SHA512",
	}
	Algorithm_value = map[string]int32{
		"HMAC_SHA256": 0,
		"HMAC_SHA384": 1,
		"HMAC_SHA512": 2,
	}
)

Enum value maps for Algorithm.

View Source
var File_types_plugins_hmac_auth_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Algorithm

type Algorithm int32
const (
	Algorithm_HMAC_SHA256 Algorithm = 0
	Algorithm_HMAC_SHA384 Algorithm = 1
	Algorithm_HMAC_SHA512 Algorithm = 2
)

func (Algorithm) Descriptor

func (Algorithm) Descriptor() protoreflect.EnumDescriptor

func (Algorithm) Enum

func (x Algorithm) Enum() *Algorithm

func (Algorithm) EnumDescriptor deprecated

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

Deprecated: Use Algorithm.Descriptor instead.

func (Algorithm) Number

func (x Algorithm) Number() protoreflect.EnumNumber

func (Algorithm) String

func (x Algorithm) String() string

func (Algorithm) Type

type Config

type Config struct {
	SignatureHeader string `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"`
	AccessKeyHeader string `protobuf:"bytes,2,opt,name=access_key_header,json=accessKeyHeader,proto3" json:"access_key_header,omitempty"`
	DateHeader      string `protobuf:"bytes,3,opt,name=date_header,json=dateHeader,proto3" json:"date_header,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetAccessKeyHeader

func (x *Config) GetAccessKeyHeader() string

func (*Config) GetDateHeader

func (x *Config) GetDateHeader() string

func (*Config) GetSignatureHeader

func (x *Config) GetSignatureHeader() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

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

func (m *Config) ValidateAll() error

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

type ConfigMultiError

type ConfigMultiError []error

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

func (ConfigMultiError) AllErrors

func (m ConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConfigMultiError) Error

func (m ConfigMultiError) Error() string

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

type ConfigValidationError

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

ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.

func (ConfigValidationError) Cause

func (e ConfigValidationError) Cause() error

Cause function returns cause value.

func (ConfigValidationError) Error

func (e ConfigValidationError) Error() string

Error satisfies the builtin error interface

func (ConfigValidationError) ErrorName

func (e ConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ConfigValidationError) Field

func (e ConfigValidationError) Field() string

Field function returns field value.

func (ConfigValidationError) Key

func (e ConfigValidationError) Key() bool

Key function returns key value.

func (ConfigValidationError) Reason

func (e ConfigValidationError) Reason() string

Reason function returns reason value.

type ConsumerConfig

type ConsumerConfig struct {
	AccessKey string `protobuf:"bytes,1,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"`
	SecretKey string `protobuf:"bytes,2,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
	// default to HMAC_SHA256
	Algorithm     Algorithm `protobuf:"varint,3,opt,name=algorithm,proto3,enum=types.plugins.hmac_auth.Algorithm" json:"algorithm,omitempty"`
	SignedHeaders []string  `protobuf:"bytes,4,rep,name=signed_headers,json=signedHeaders,proto3" json:"signed_headers,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumerConfig) Descriptor deprecated

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

Deprecated: Use ConsumerConfig.ProtoReflect.Descriptor instead.

func (*ConsumerConfig) GetAccessKey

func (x *ConsumerConfig) GetAccessKey() string

func (*ConsumerConfig) GetAlgorithm

func (x *ConsumerConfig) GetAlgorithm() Algorithm

func (*ConsumerConfig) GetSecretKey

func (x *ConsumerConfig) GetSecretKey() string

func (*ConsumerConfig) GetSignedHeaders

func (x *ConsumerConfig) GetSignedHeaders() []string

func (*ConsumerConfig) Index

func (conf *ConsumerConfig) Index() string

func (*ConsumerConfig) ProtoMessage

func (*ConsumerConfig) ProtoMessage()

func (*ConsumerConfig) ProtoReflect

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

func (*ConsumerConfig) Reset

func (x *ConsumerConfig) Reset()

func (*ConsumerConfig) String

func (x *ConsumerConfig) String() string

func (*ConsumerConfig) Validate

func (m *ConsumerConfig) Validate() error

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

func (m *ConsumerConfig) ValidateAll() error

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

type ConsumerConfigMultiError

type ConsumerConfigMultiError []error

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

func (ConsumerConfigMultiError) AllErrors

func (m ConsumerConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConsumerConfigMultiError) Error

func (m ConsumerConfigMultiError) Error() string

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

type ConsumerConfigValidationError

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

ConsumerConfigValidationError is the validation error returned by ConsumerConfig.Validate if the designated constraints aren't met.

func (ConsumerConfigValidationError) Cause

Cause function returns cause value.

func (ConsumerConfigValidationError) Error

Error satisfies the builtin error interface

func (ConsumerConfigValidationError) ErrorName

func (e ConsumerConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ConsumerConfigValidationError) Field

Field function returns field value.

func (ConsumerConfigValidationError) Key

Key function returns key value.

func (ConsumerConfigValidationError) Reason

Reason function returns reason value.

type Plugin

type Plugin struct {
	plugins.PluginMethodDefaultImpl
}

func (*Plugin) Config

func (p *Plugin) Config() api.PluginConfig

func (*Plugin) ConsumerConfig

func (p *Plugin) ConsumerConfig() api.PluginConsumerConfig

func (*Plugin) Order

func (p *Plugin) Order() plugins.PluginOrder

func (*Plugin) Type

func (p *Plugin) Type() plugins.PluginType

Jump to

Keyboard shortcuts

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