ident

package
v0.10.0-rc4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidProviderName   = errors.New("invalid or empty ident provider name")
	ErrProviderAlreadyExists = errors.New("ident provider already exists")
	ErrNilProvider           = errors.New("ident provider is nil")
	ErrProviderNotFound      = errors.New("ident provider not found")
)

Functions

func RegisterProvider

func RegisterProvider(name string, provider func() Provider) error

Types

type EnvIdentOption added in v0.6.0

type EnvIdentOption func(*EnvIdentOptions)

func WithVariableName added in v0.6.0

func WithVariableName(name string) EnvIdentOption

type EnvIdentOptions added in v0.6.0

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

type NamedProvider

type NamedProvider interface {
	Provider
	Name() string
}

func GetProvider

func GetProvider(name string) (NamedProvider, error)

type Provider

type Provider interface {
	UniqueIdentifier(ctx context.Context) (string, error)
}

func NewEnvProvider added in v0.6.0

func NewEnvProvider(opts ...EnvIdentOption) Provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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