backend

package
v0.35.4-geaaru Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImgBackend      = "img"
	DockerBackend   = "docker"
	Dockerv2Backend = "dockerv2"
	Dockerv3Backend = "dockerv3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendWriter

type BackendWriter struct {
	BufferedOutput bool
	Buffer         *bytes.Buffer
}

func NewBackendWriter

func NewBackendWriter(buffered bool) *BackendWriter

func (*BackendWriter) Close

func (b *BackendWriter) Close() error

func (*BackendWriter) GetCombinedOutput

func (b *BackendWriter) GetCombinedOutput() string

func (*BackendWriter) Write

func (b *BackendWriter) Write(p []byte) (int, error)

type Dockerv2

type Dockerv2 struct {
	*SimpleDocker
}

func NewDockerv2Backend

func NewDockerv2Backend() *Dockerv2

func (*Dockerv2) ExportImage

func (d *Dockerv2) ExportImage(opts Options) error

func (*Dockerv2) ExtractRootfs

func (b *Dockerv2) ExtractRootfs(opts Options, keepPerms bool) error

func (*Dockerv2) ImageDefinitionToTar

func (s *Dockerv2) ImageDefinitionToTar(opts Options) error

type Dockerv3

type Dockerv3 struct {
	*SimpleDocker
}

func NewDockerv3Backend

func NewDockerv3Backend() *Dockerv3

func (*Dockerv3) ExportImage

func (d *Dockerv3) ExportImage(opts Options) error

func (*Dockerv3) ExtractRootfs

func (b *Dockerv3) ExtractRootfs(opts Options, keepPerms bool) error

func (*Dockerv3) ImageDefinitionToTar

func (s *Dockerv3) ImageDefinitionToTar(opts Options) error

type ManifestEntry

type ManifestEntry struct {
	Layers []string `json:"Layers"`
}

type Options

type Options struct {
	ImageName      string
	SourcePath     string
	DockerFileName string
	Destination    string
	Context        string
	BackendArgs    []string
	PackageDir     string
}

type SimpleDocker

type SimpleDocker struct{}

func NewSimpleDockerBackend

func NewSimpleDockerBackend() *SimpleDocker

func (*SimpleDocker) BuildImage

func (*SimpleDocker) BuildImage(opts Options) error

TODO: Missing still: labels, and build args expansion

func (*SimpleDocker) CopyImage

func (*SimpleDocker) CopyImage(src, dst string) error

func (*SimpleDocker) DownloadImage

func (*SimpleDocker) DownloadImage(opts Options) error

func (*SimpleDocker) ExportImage

func (*SimpleDocker) ExportImage(opts Options) error

func (*SimpleDocker) ExtractRootfs

func (b *SimpleDocker) ExtractRootfs(opts Options, keepPerms bool) error

func (*SimpleDocker) ImageAvailable

func (*SimpleDocker) ImageAvailable(imagename string) bool

func (*SimpleDocker) ImageDefinitionToTar

func (s *SimpleDocker) ImageDefinitionToTar(opts Options) error

func (*SimpleDocker) ImageExists

func (*SimpleDocker) ImageExists(imagename string) bool

func (*SimpleDocker) Push

func (*SimpleDocker) Push(opts Options) error

func (*SimpleDocker) RemoveImage

func (*SimpleDocker) RemoveImage(opts Options) error

type SimpleImg

type SimpleImg struct{}

func NewSimpleImgBackend

func NewSimpleImgBackend() *SimpleImg

func (*SimpleImg) BuildImage

func (*SimpleImg) BuildImage(opts Options) error

TODO: Missing still: labels, and build args expansion

func (*SimpleImg) CopyImage

func (*SimpleImg) CopyImage(src, dst string) error

func (*SimpleImg) DownloadImage

func (*SimpleImg) DownloadImage(opts Options) error

func (*SimpleImg) ExportImage

func (*SimpleImg) ExportImage(opts Options) error

func (*SimpleImg) ExtractRootfs

func (s *SimpleImg) ExtractRootfs(opts Options, keepPerms bool) error

ExtractRootfs extracts the docker image content inside the destination

func (*SimpleImg) ImageAvailable

func (*SimpleImg) ImageAvailable(imagename string) bool

func (*SimpleImg) ImageDefinitionToTar

func (s *SimpleImg) ImageDefinitionToTar(opts Options) error

func (*SimpleImg) ImageExists

func (*SimpleImg) ImageExists(imagename string) bool

ImageExists check if the given image is available locally

func (*SimpleImg) Push

func (*SimpleImg) Push(opts Options) error

func (*SimpleImg) RemoveImage

func (*SimpleImg) RemoveImage(opts Options) error

Jump to

Keyboard shortcuts

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