ident

package
v0.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 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(args ...any) 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
}

type Provider

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

func NewEnvProvider added in v0.6.0

func NewEnvProvider(opts ...EnvIdentOption) Provider

type ProviderBuilder added in v0.11.0

type ProviderBuilder func(args ...any) Provider

func GetProviderBuilder added in v0.11.0

func GetProviderBuilder(name string) (ProviderBuilder, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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