Documentation ¶
Index ¶
- Constants
- func Metadata(r io.Reader) func(*App) error
- func MetadataFile(file string) func(*App) error
- func WithAttachments(rootAppDir string) func(*App) error
- func WithCleanup(f func()) func(*App) error
- func WithComposeFiles(files ...string) func(*App) error
- func WithComposes(readers ...io.Reader) func(*App) error
- func WithName(name string) func(*App) error
- func WithParameters(readers ...io.Reader) func(*App) error
- func WithParametersFiles(files ...string) func(*App) error
- func WithPath(path string) func(*App) error
- func WithSource(source AppSourceKind) func(*App) error
- type App
- type AppSourceKind
- type Attachment
- type InitialComposeFile
- type InitialService
Constants ¶
const SingleFileSeparator = "\n---\n"
SingleFileSeparator is the separator used in single-file app
Variables ¶
This section is empty.
Functions ¶
func MetadataFile ¶
MetadataFile adds the specified metadata file to the app
func WithAttachments ¶ added in v0.6.0
WithAttachments adds all local files (exc. main files) to the app
func WithCleanup ¶
WithCleanup sets the cleanup function of the app
func WithComposeFiles ¶
WithComposeFiles adds the specified compose files to the app
func WithComposes ¶
WithComposes adds the specified compose readers to the app
func WithParameters ¶ added in v0.8.0
WithParameters adds the specified parameters readers to the app
func WithParametersFiles ¶ added in v0.8.0
WithParametersFiles adds the specified parameters files to the app
func WithSource ¶ added in v0.6.0
func WithSource(source AppSourceKind) func(*App) error
WithSource sets the source of the app
Types ¶
type App ¶
type App struct { Name string Path string Cleanup func() Source AppSourceKind // contains filtered or unexported fields }
App represents an app
func NewAppFromDefaultFiles ¶
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) Attachments ¶ added in v0.6.0
func (a *App) Attachments() []Attachment
Attachments returns the external files list
func (*App) Metadata ¶
func (a *App) Metadata() metadata.AppMetadata
Metadata returns the metadata struct
func (*App) MetadataRaw ¶ added in v0.5.0
MetadataRaw returns metadata file content
func (*App) Parameters ¶ added in v0.8.0
func (a *App) Parameters() parameters.Parameters
Parameters returns map of parameters
func (*App) ParametersRaw ¶ added in v0.8.0
ParametersRaw returns parameter files content
type AppSourceKind ¶ added in v0.6.0
type AppSourceKind int
AppSourceKind represents what format the app was in when read
const ( // AppSourceSplit represents an Application in multiple file format AppSourceSplit AppSourceKind = iota // AppSourceMerged represents an Application in single file format AppSourceMerged // AppSourceImage represents an Application pulled from an image AppSourceImage // AppSourceArchive represents an Application in an archive format AppSourceArchive )
func (AppSourceKind) ShouldRunInsideDirectory ¶ added in v0.8.0
func (a AppSourceKind) ShouldRunInsideDirectory() bool
ShouldRunInsideDirectory returns whether the package is run from a directory on disk
type Attachment ¶ added in v0.6.0
type Attachment struct {
// contains filtered or unexported fields
}
Attachment is a summary of an attachment (attached file) stored in the app definition
func (*Attachment) Path ¶ added in v0.6.0
func (f *Attachment) Path() string
Path returns the local file path
func (*Attachment) Size ¶ added in v0.6.0
func (f *Attachment) Size() int64
Size returns the file size in bytes
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)