dynamic

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCredentialProviderResponse = errors.New(
	"invalid response type returned by external credential provider",
)
View Source
var (
	ErrUnsupportedMirrorCredentialStrategy = errors.New("unsupported mirror credential strategy")
)

Functions

func NewProviderFromConfigFile

func NewProviderFromConfigFile(fName string) (plugin.CredentialProvider, error)

Types

type Plugin

type Plugin interface {
	ExecPlugin(
		ctx context.Context,
		image string,
	) (*credentialproviderapi.CredentialProviderResponse, error)
}

Plugin is the interface calling ExecPlugin. This is mainly for testability so tests don't have to actually exec any processes.

type Provider

type Provider interface {
	Provide(image string) (*credentialproviderapi.CredentialProviderResponse, error)
	DefaultCacheDuration() time.Duration
}

Jump to

Keyboard shortcuts

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