types

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 8 Imported by: 12 modules, 27 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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() metadata.AppMetadata

Metadata returns the metadata struct

func (*App) MetadataRaw added in v0.5.0

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

MetadataRaw returns metadata file content

func (*App) Settings

func (a *App) Settings() settings.Settings

Settings returns map of settings

func (*App) SettingsRaw added in v0.5.0

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

SettingsRaw 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