build

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 54 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,
	inputEntrypointOptions *Options,
	inputHandlerOptions *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 {
	// Concurrency is the number of images builds that can be excuted at the same time
	Concurrency int
	// Debug if is true debug mode is enabled
	Debug bool
	// DryRun is true if the build should be a dry run
	DryRun bool
	// UserDockerNormalizedName when is true are used Docker normalized name references
	UseDockerNormalizedName bool
}

EntrypointOptions defines the options for the entrypoint that initialize a build application

type OptionsFunc

type OptionsFunc func(opts *Entrypoint)

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 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