promote

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: 37 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 {
	Debug(msg ...interface{})
	Error(msg ...interface{})
	Info(msg ...interface{})
	Warn(msg ...interface{})
	Write(data []byte) (int, error)
}

type Entrypoint

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

Entrypoint defines the entrypoint for the build application

func NewEntrypoint

func NewEntrypoint(opts ...OptionsFunc) *Entrypoint

NewEntrypoint returns a new entrypoint

func (*Entrypoint) Execute

func (e *Entrypoint) Execute(ctx context.Context, args []string, conf *configuration.Configuration, entrypointOptions *Options, handlerOptions *handler.Options) error

Execute is a pseudo-main method for the command

func (*Entrypoint) Options

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

Options provides the options for the entrypoint

type MockEntrypoint

type MockEntrypoint struct {
	mock.Mock
}

MockEntrypoint is a mock of Entrypoint interface

func NewMockEntrypoint

func NewMockEntrypoint() *MockEntrypoint

NewMockEntrypoint provides a mock of Entrypoint interface

func (*MockEntrypoint) Execute

func (e *MockEntrypoint) Execute(ctx context.Context, args []string, conf *configuration.Configuration, entrypointOptions *Options, handlerOptions *handler.Options) error

Execute provides a mock function

type Options

type Options struct {
	// UserDockerNormalizedName when is true are used Docker normalized name references
	UseDockerNormalizedName bool
}

Options represents the options for the entrypoint

type OptionsFunc

type OptionsFunc func(opts *Entrypoint)

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

func WithCompatibility

func WithCompatibility(compatibility Compatibilitier) OptionsFunc

WithCompatibility sets the compatibility for the entrypoint

func WithFileSystem

func WithFileSystem(fs afero.Fs) OptionsFunc

WithFileSystem sets the writer for the entrypoint

func WithWriter

func WithWriter(w ConsoleWriter) OptionsFunc

WithWriter sets the writer for the entrypoint

Jump to

Keyboard shortcuts

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