key_auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "keyAuth"
)

Variables

View Source
var (
	Source_name = map[int32]string{
		0: "HEADER",
		1: "QUERY",
	}
	Source_value = map[string]int32{
		"HEADER": 0,
		"QUERY":  1,
	}
)

Enum value maps for Source.

View Source
var File_plugins_key_auth_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	Keys []*Key `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetKeys

func (x *Config) GetKeys() []*Key

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 {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*ConsumerConfig) Descriptor deprecated

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

Deprecated: Use ConsumerConfig.ProtoReflect.Descriptor instead.

func (*ConsumerConfig) GetKey

func (x *ConsumerConfig) GetKey() 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 Key

type Key struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// default to header
	Source Source `protobuf:"varint,2,opt,name=source,proto3,enum=plugins.key_auth.Source" json:"source,omitempty"`
	// contains filtered or unexported fields
}

func (*Key) Descriptor deprecated

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

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetName

func (x *Key) GetName() string

func (*Key) GetSource

func (x *Key) GetSource() Source

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) ProtoReflect

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

func (*Key) Reset

func (x *Key) Reset()

func (*Key) String

func (x *Key) String() string

func (*Key) Validate

func (m *Key) Validate() error

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

func (m *Key) ValidateAll() error

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

type KeyMultiError

type KeyMultiError []error

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

func (KeyMultiError) AllErrors

func (m KeyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (KeyMultiError) Error

func (m KeyMultiError) Error() string

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

type KeyValidationError

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

KeyValidationError is the validation error returned by Key.Validate if the designated constraints aren't met.

func (KeyValidationError) Cause

func (e KeyValidationError) Cause() error

Cause function returns cause value.

func (KeyValidationError) Error

func (e KeyValidationError) Error() string

Error satisfies the builtin error interface

func (KeyValidationError) ErrorName

func (e KeyValidationError) ErrorName() string

ErrorName returns error name.

func (KeyValidationError) Field

func (e KeyValidationError) Field() string

Field function returns field value.

func (KeyValidationError) Key

func (e KeyValidationError) Key() bool

Key function returns key value.

func (KeyValidationError) Reason

func (e KeyValidationError) Reason() string

Reason function returns reason value.

type Source

type Source int32
const (
	Source_HEADER Source = 0
	Source_QUERY  Source = 1
)

func (Source) Descriptor

func (Source) Descriptor() protoreflect.EnumDescriptor

func (Source) Enum

func (x Source) Enum() *Source

func (Source) EnumDescriptor deprecated

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

Deprecated: Use Source.Descriptor instead.

func (Source) Number

func (x Source) Number() protoreflect.EnumNumber

func (Source) String

func (x Source) String() string

func (Source) Type

func (Source) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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