Documentation
¶
Overview ¶
package compose is a wrapper around the docker compose cli. it provides a programmatic interface for managing docker compose projects. it is not a complete 1:1 mapping of the docker compose cli, but provides a programmatic interface for managing docker compose projects in Go, making it useful for automation, tooling, or embedding docker compose behavior.
Index ¶
- Variables
- func IsComposeDownError(err error) bool
- func IsComposeError(err error) bool
- func IsComposeFlagError(err error) bool
- func IsComposeLogsError(err error) bool
- func IsComposeUpError(err error) bool
- func NewCompose(project *create.Project) *compose
- type ComposeDownError
- type ComposeDownOptions
- type ComposeError
- type ComposeFlagError
- type ComposeLogsError
- type ComposeLogsOptions
- type ComposeUpError
- type ComposeUpOptions
- type ComposeUpScale
- type SetComposeDownOption
- type SetComposeLogsOption
- type SetComposeUpOption
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsComposeDownError ¶
func IsComposeError ¶
func IsComposeFlagError ¶
func IsComposeLogsError ¶
func IsComposeUpError ¶
func NewCompose ¶
Types ¶
type ComposeDownError ¶
type ComposeDownError struct {
Message string
}
ComposeDownError is the error for the compose down command
func NewComposeDownError ¶
func NewComposeDownError(err error) *ComposeDownError
func (*ComposeDownError) Error ¶
func (e *ComposeDownError) Error() string
func (*ComposeDownError) Unwrap ¶
func (e *ComposeDownError) Unwrap() error
type ComposeDownOptions ¶
type ComposeDownOptions struct {
RemoveOrphans bool
Timeout *int
RemoveImage *string
RemoveVolumes bool
Flags []string
Writer io.Writer
Profiles []string
}
ComposeDownOptions is the options for the compose down command
func (*ComposeDownOptions) GenerateFlags ¶
func (opt *ComposeDownOptions) GenerateFlags() ([]string, error)
type ComposeError ¶
type ComposeError struct {
Message string
}
ComposeError is the error for the compose command
func NewComposeError ¶
func NewComposeError(err error) *ComposeError
func (*ComposeError) Error ¶
func (e *ComposeError) Error() string
func (*ComposeError) Unwrap ¶
func (e *ComposeError) Unwrap() error
type ComposeFlagError ¶
ComposeFlagError is the error for the compose flag
func NewComposeFlagError ¶
func NewComposeFlagError(flag, message string) *ComposeFlagError
func (*ComposeFlagError) Error ¶
func (e *ComposeFlagError) Error() string
func (*ComposeFlagError) Unwrap ¶
func (e *ComposeFlagError) Unwrap() error
type ComposeLogsError ¶
type ComposeLogsError struct {
Message string
}
ComposeLogsError is the error for the compose logs command
func NewComposeLogsError ¶
func NewComposeLogsError(err error) *ComposeLogsError
func (*ComposeLogsError) Error ¶
func (e *ComposeLogsError) Error() string
func (*ComposeLogsError) Unwrap ¶
func (e *ComposeLogsError) Unwrap() error
type ComposeLogsOptions ¶
type ComposeLogsOptions struct {
Tail *int
Follow bool
NoLogPrefix bool
Writer io.Writer
Flags []string
Profiles []string
}
ComposeLogsOptions is the options for the compose logs command
func (*ComposeLogsOptions) GenerateFlags ¶
func (opt *ComposeLogsOptions) GenerateFlags() ([]string, error)
type ComposeUpError ¶
type ComposeUpError struct {
Message string
}
ComposeUpError is the error for the compose up command
func NewComposeUpError ¶
func NewComposeUpError(err error) *ComposeUpError
func (*ComposeUpError) Error ¶
func (e *ComposeUpError) Error() string
func (*ComposeUpError) Unwrap ¶
func (e *ComposeUpError) Unwrap() error
type ComposeUpOptions ¶
type ComposeUpOptions struct {
Detach bool
AbortOnContainerExit bool
AbortOnContainerFailure bool
AlwaysRecreateDeps bool
Attach *string
AttachDependencies bool
Build bool
NoBuild bool
ForceRecreate bool
Menu bool
ExitCodeFrom *string
NoAttach *string
NoColor bool
NoDeps bool
NoLogPrefix bool
NoRecreate bool
Pull *string
NoStart bool
QuietPull bool
RemoveOrphans bool
RenewAnonVolumes bool
Scale []ComposeUpScale
Timeout *int
Timestamps bool
Wait bool
WaitTimeout *int
Watch bool
Yes bool
Profiles []string
Flags []string
Writer io.Writer
Errs []error
}
ComposeUpOptions is the options for the compose up command
func (*ComposeUpOptions) GenerateFlags ¶
func (opt *ComposeUpOptions) GenerateFlags() (flags []string, err error)
GenerateFlags generates the flags for the compose up command
It will return a slice of flags to append to the command Eg.
[]string{"up", "--detach", ...}
type ComposeUpScale ¶
ComposeUpScale is the scale for the compose up command
type SetComposeDownOption ¶
type SetComposeDownOption func(*ComposeDownOptions) error
SetComposeDownOption is a function that sets a ComposeDownOptions
type SetComposeLogsOption ¶
type SetComposeLogsOption func(*ComposeLogsOptions) error
SetComposeLogsOption is a function that sets a ComposeLogsOptions
type SetComposeUpOption ¶
type SetComposeUpOption func(*ComposeUpOptions) error
SetComposeUpOption is a function that sets a ComposeUpOptions
Directories
¶
| Path | Synopsis |
|---|---|
|
options
|
|
|
down
Package down is the package for the compose down options
|
Package down is the package for the compose down options |
|
logs
Package logs is the package for the compose logs options
|
Package logs is the package for the compose logs options |
|
up
Package up provides options for the compose up command
|
Package up provides options for the compose up command |