buildctx

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact interface {
	GetPath() string
}

type Artifacts

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

func NewArtifacts

func NewArtifacts(logger logging.Logger) *Artifacts

func (*Artifacts) AddAnonymous

func (ds *Artifacts) AddAnonymous(disposable DisposableArtifact)

func (*Artifacts) Dispose

func (ds *Artifacts) Dispose() error

func (*Artifacts) Get

func (ds *Artifacts) Get(ctx Context, kind Kind) (Artifact, error)

func (*Artifacts) RegisterBuilder

func (ds *Artifacts) RegisterBuilder(kind Kind, builder func(ctx Context) (Artifact, error))

type ArtifactsI

type ArtifactsI interface {
	RegisterBuilder(kind Kind, builder func(ctx Context) (Artifact, error))
	AddAnonymous(disposable DisposableArtifact)
	Get(ctx Context, kind Kind) (Artifact, error)
	Dispose() error
}

type Context

type Context struct {
	TempDir   string
	Logger    logging.Logger
	Ctx       context.Context
	Artifacts ArtifactsI
	Cfg       cfgtypes.Config
}

func NewContext

func NewContext(ctx context.Context, cfg cfgtypes.Config, artifacts ArtifactsI, logger logging.Logger) Context

func (Context) Deadline

func (c Context) Deadline() (deadline time.Time, ok bool)

func (Context) Done

func (c Context) Done() <-chan struct{}

func (Context) Err

func (c Context) Err() error

func (Context) NewTempDir

func (c Context) NewTempDir(dirName string) (*fs_resource.TempDir, error)

func (Context) NewTempFile

func (c Context) NewTempFile(fileName string) (*fs_resource.TempFile, error)

func (Context) Value

func (c Context) Value(key any) any

func (Context) WithContext

func (c Context) WithContext(ctx context.Context) Context

func (Context) WriteTempFile

func (c Context) WriteTempFile(bytes []byte, fileName string) (*fs_resource.TempFile, error)

type Disposable

type Disposable interface {
	Dispose() error
}

type DisposableArtifact

type DisposableArtifact interface {
	Artifact
	Disposable
}

type Disposables

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

func NewDisposables

func NewDisposables() *Disposables

func (*Disposables) Add

func (ds *Disposables) Add(d Disposable)

func (*Disposables) AddIfDisposable

func (ds *Disposables) AddIfDisposable(obj any)

func (*Disposables) Dispose

func (ds *Disposables) Dispose() error

type ImgSourcePath

type ImgSourcePath string

ImgSourcePath points to a source image for conversion. Can be just a file path or can have optional format specifier and layer index: FORMAT:some/file/path.png[layerIndex] where layerIndex is a positive index of a layer in a multi-layer image

func (ImgSourcePath) Components

func (s ImgSourcePath) Components() (components ImgSourcePathComponents, err error)

type ImgSourcePathComponents

type ImgSourcePathComponents struct {
	Format     string
	FilePath   string
	LayerIndex int
}

func (ImgSourcePathComponents) ToSourcePath

func (s ImgSourcePathComponents) ToSourcePath() ImgSourcePath

type Kind

type Kind string
const (
	KindBinTempDir                Kind = "bin_temp_dir"
	KindIcon                      Kind = "icon"
	KindDefaultPngIcon            Kind = "default_png_icon"
	KindPngIcon                   Kind = "png_icon"
	KindIcoIcon                   Kind = "ico_icon"
	KindWinManifest               Kind = "win_manifest"
	KindMacosPlist                Kind = "macos_plist"
	KindMacosIconSet              Kind = "macos_icon_set"
	KindLinuxDesktopEntry         Kind = "linux_desktop_entry"
	KindMacosCreateDmgDockerImage Kind = "macos_create_dmg_docker_image"
)

func BinKind

func BinKind(os consts.Os, arch consts.Arch) Kind

func LinuxDebKind

func LinuxDebKind(arch consts.Arch) Kind

func MacosBundleKind

func MacosBundleKind(arch consts.Arch) Kind

func MacosDmgKind

func MacosDmgKind(arch consts.Arch) Kind

func WinSysoKind

func WinSysoKind(arch consts.Arch) Kind

Jump to

Keyboard shortcuts

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