builder

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBuilder = "docker"

Functions

func CompressDockerFile

func CompressDockerFile(data []byte) io.Reader

func PlatformAdd

func PlatformAdd(opts appTypes.PlatformOptions) error

func PlatformRemove

func PlatformRemove(name string) error

func PlatformUpdate

func PlatformUpdate(opts appTypes.PlatformOptions) error

func Register

func Register(name string, builder Builder)

Register registers a new builder in the Builder registry.

Types

type BuildOpts

type BuildOpts struct {
	BuildFromFile       bool
	Rebuild             bool
	Redeploy            bool
	IsTsuruBuilderImage bool
	ArchiveURL          string
	ArchiveFile         io.Reader
	ArchiveTarFile      io.ReadCloser
	ArchiveSize         int64
	ImageID             string
	Tag                 string
}

type Builder

type Builder interface {
	Build(p provision.BuilderDeploy, app provision.App, evt *event.Event, opts *BuildOpts) (string, error)
}

Builder is the basic interface of this package.

func GetForProvisioner

func GetForProvisioner(p provision.Provisioner) (Builder, error)

GetForProvisioner gets the builder required by the provisioner.

func Registry

func Registry() ([]Builder, error)

Registry returns the list of registered builders.

type MockBuilder

type MockBuilder struct {
	OnBuild          func(provision.BuilderDeploy, provision.App, *event.Event, *BuildOpts) (string, error)
	OnPlatformAdd    func(appTypes.PlatformOptions) error
	OnPlatformUpdate func(appTypes.PlatformOptions) error
	OnPlatformRemove func(string) error
}

func (*MockBuilder) Build

func (b *MockBuilder) Build(p provision.BuilderDeploy, app provision.App, evt *event.Event, opts *BuildOpts) (string, error)

func (*MockBuilder) PlatformAdd

func (b *MockBuilder) PlatformAdd(opts appTypes.PlatformOptions) error

func (*MockBuilder) PlatformRemove

func (b *MockBuilder) PlatformRemove(name string) error

func (*MockBuilder) PlatformUpdate

func (b *MockBuilder) PlatformUpdate(opts appTypes.PlatformOptions) error

type PlatformBuilder

type PlatformBuilder interface {
	PlatformAdd(appTypes.PlatformOptions) error
	PlatformUpdate(appTypes.PlatformOptions) error
	PlatformRemove(name string) error
}

PlatformBuilder is a builder where administrators can manage platforms (automatically adding, removing and updating platforms).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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