platforms

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedPlatforms = []Platform{
	&java.Platform{},
	&golang.Platform{},
	&node.Platform{},
}

SupportedPlatforms is the canonical list of platforms Fabric supports

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Registry *Registry
	Client   *docker.Client
}

func (*Builder) GenerateDockerBuild

func (b *Builder) GenerateDockerBuild(ccType, path string, codePackage io.Reader) (io.Reader, error)

type PackageWriter

type PackageWriter interface {
	Write(name string, payload []byte, tw *tar.Writer) error
}

type PackageWriterWrapper

type PackageWriterWrapper func(name string, payload []byte, tw *tar.Writer) error

func (PackageWriterWrapper) Write

func (pw PackageWriterWrapper) Write(name string, payload []byte, tw *tar.Writer) error

type Platform

type Platform interface {
	Name() string
	GenerateDockerfile() (string, error)
	DockerBuildOptions(path string) (util.DockerBuildOptions, error)
}

Interface for validating the specification and writing the package for the given platform

type Registry

type Registry struct {
	Platforms     map[string]Platform
	PackageWriter PackageWriter
}

func NewRegistry

func NewRegistry(platformTypes ...Platform) *Registry

func (*Registry) GenerateDockerBuild

func (r *Registry) GenerateDockerBuild(ccType, path string, codePackage io.Reader, client *docker.Client) (io.Reader, error)

func (*Registry) GenerateDockerfile

func (r *Registry) GenerateDockerfile(ccType string) (string, error)

func (*Registry) StreamDockerBuild

func (r *Registry) StreamDockerBuild(ccType, path string, codePackage io.Reader, inputFiles map[string][]byte, tw *tar.Writer, client *docker.Client) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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