credentials

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compatibilitier

type Compatibilitier interface {
	AddDeprecated(deprecated ...string)
	AddRemoved(removed ...string)
	AddChanged(changed ...string)
}

Compatibilitier is the interface for the compatibility checker

type ConsoleWriter

type ConsoleWriter interface {
	Info(msg ...interface{})
	Warn(msg ...interface{})
	Error(msg ...interface{})
	Debug(msg ...interface{})
}

type Consoler

type Consoler interface {
	io.Writer
	ConsoleWriter
	PasswordReader
}

type CreateCredentialsEntrypoint

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

CreateCredentialsEntrypoint defines the entrypoint for the application

func NewCreateCredentialsEntrypoint

func NewCreateCredentialsEntrypoint(opts ...OptionsFunc) *CreateCredentialsEntrypoint

NewCreateCredentialsEntrypoint returns a new entrypoint

func (*CreateCredentialsEntrypoint) Execute

func (e *CreateCredentialsEntrypoint) Execute(
	ctx context.Context,
	args []string,
	conf *configuration.Configuration,
	inputEntrypointOptions *Options,
	inputHandlerOptions *handler.Options,
) error

Execute provides a mock function

func (*CreateCredentialsEntrypoint) Options

func (e *CreateCredentialsEntrypoint) Options(opts ...OptionsFunc)

Options provides the options for the entrypoint

type MockCreateCredentialsEntrypoint

type MockCreateCredentialsEntrypoint struct {
	mock.Mock
}

MockCreateCredentialsEntrypoint is a mock of Entrypoint interface

func NewMockCreateCredentialsEntrypoint

func NewMockCreateCredentialsEntrypoint() *MockCreateCredentialsEntrypoint

NewMockCreateCredentialsEntrypoint provides an implementation Entrypoint interface

func (*MockCreateCredentialsEntrypoint) Execute

func (e *MockCreateCredentialsEntrypoint) Execute(ctx context.Context,
	args []string,
	conf *configuration.Configuration,
	inputEntrypointOptions *Options,
	inputHandlerOptions *handler.Options) error

Execute provides a mock function

type Options

type Options struct {

	// AskPrivateKeyPassword is true if a privite key password should be asked
	AskPrivateKeyPassword bool
	// LocalStoragePath is the location of local storage
	LocalStoragePath string
	// DEPRECATEDRegistryHost is the registry host used as credentials id
	DEPRECATEDRegistryHost string
	// ForceCreate forces to create a credential
	ForceCreate bool
}

type OptionsFunc

type OptionsFunc func(opts *CreateCredentialsEntrypoint)

OptionsFunc defines the signature for an option function to set entrypoint attributes

func WithCompatibility

func WithCompatibility(c Compatibilitier) OptionsFunc

WithCompatibility sets the compatibility for the entrypoint

func WithConsole

func WithConsole(console Consoler) OptionsFunc

WithConsole sets the console writer/reader for the entrypoint

func WithFileSystem

func WithFileSystem(fs afero.Fs) OptionsFunc

WithFileSystem sets the writer for the entrypoint

type PasswordReader

type PasswordReader interface {
	ReadPassword(prompt string) (string, error)
}

Jump to

Keyboard shortcuts

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