types

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const SingleFileSeparator = "\n---\n"

SingleFileSeparator is the separator used in single-file app

Variables

This section is empty.

Functions

func Metadata

func Metadata(r io.Reader) func(*App) error

Metadata adds the specified metadata reader to the app

func MetadataFile

func MetadataFile(file string) func(*App) error

MetadataFile adds the specified metadata file to the app

func WithCleanup

func WithCleanup(f func()) func(*App) error

WithCleanup sets the cleanup function of the app

func WithComposeFiles

func WithComposeFiles(files ...string) func(*App) error

WithComposeFiles adds the specified compose files to the app

func WithComposes

func WithComposes(readers ...io.Reader) func(*App) error

WithComposes adds the specified compose readers to the app

func WithName

func WithName(name string) func(*App) error

WithName sets the application name

func WithPath

func WithPath(path string) func(*App) error

WithPath sets the original path of the app

func WithSettings

func WithSettings(readers ...io.Reader) func(*App) error

WithSettings adds the specified settings readers to the app

func WithSettingsFiles

func WithSettingsFiles(files ...string) func(*App) error

WithSettingsFiles adds the specified settings files to the app

Types

type App

type App struct {
	Name    string
	Path    string
	Cleanup func()
	// contains filtered or unexported fields
}

App represents an app

func NewApp

func NewApp(path string, ops ...func(*App) error) (*App, error)

NewApp creates a new docker app with the specified path and struct modifiers

func NewAppFromDefaultFiles

func NewAppFromDefaultFiles(path string, ops ...func(*App) error) (*App, error)

NewAppFromDefaultFiles creates a new docker app using the default files in the specified path. If one of those file doesn't exists, it will error out.

func (*App) Composes

func (a *App) Composes() [][]byte

Composes returns compose files content

func (*App) Extract added in v0.4.1

func (a *App) Extract(path string) error

Extract writes the app in the specified folder

func (*App) Metadata

func (a *App) Metadata() []byte

Metadata returns metadata file content

func (*App) Settings

func (a *App) Settings() [][]byte

Settings returns setting files content

type InitialComposeFile

type InitialComposeFile struct {
	Version  string
	Services map[string]InitialService
}

InitialComposeFile represents an initial composefile (used by the init command)

func NewInitialComposeFile

func NewInitialComposeFile() InitialComposeFile

NewInitialComposeFile returns an empty InitialComposeFile object

type InitialService

type InitialService struct {
	Image string
}

InitialService represents an initial service (used by the init command)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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