docker

package
Version: v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAvailable

func IsAvailable() bool

func WithDockerAvailable

func WithDockerAvailable(block func())

Types

type BuildRequest

type BuildRequest struct {
	Before         []Builder
	DockerfilePath string
	Workspace      string
	Destinations   []string
}

type Builder

type Builder interface {
	BuildDryRun() (string, error)
	Build(ctx context.Context) error
}

func NewBuilder

func NewBuilder(request BuildRequest) (Builder, error)

type Docker

type Docker struct {
	BuildRequest
	// contains filtered or unexported fields
}

func (*Docker) Build

func (docker *Docker) Build(ctx context.Context) error

func (*Docker) BuildDryRun

func (docker *Docker) BuildDryRun() (string, error)

type Engine

type Engine interface {
	Ping(context.Context) (types.Ping, error)
	ImageBuild(context.Context, io.Reader, types.ImageBuildOptions) (types.ImageBuildResponse, error)
}

type MockBuilder

type MockBuilder struct {
	mock.Mock
}

func (*MockBuilder) Build

func (client *MockBuilder) Build(ctx context.Context) error

func (*MockBuilder) BuildDryRun

func (client *MockBuilder) BuildDryRun() (string, error)

type MockEngine

type MockEngine struct {
	mock.Mock
}

func (MockEngine) ImageBuild

func (engine MockEngine) ImageBuild(ctx context.Context, reader io.Reader, opts types.ImageBuildOptions) (types.ImageBuildResponse, error)

func (MockEngine) Ping

func (engine MockEngine) Ping(ctx context.Context) (types.Ping, error)

Jump to

Keyboard shortcuts

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