Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capture ¶
func Capture(opts Options) (*model.Invocation, error)
Capture builds an Invocation from the given options.
func ResolveComposeFiles ¶
ResolveComposeFiles returns absolute compose file paths when possible.
Types ¶
type EnvProvider ¶
EnvProvider supplies process environment for capture (mockable).
type ExecGit ¶
type ExecGit struct{}
ExecGit runs git via the shell.
type ExecVersions ¶
type ExecVersions struct{}
ExecVersions runs docker / docker compose version commands.
func (ExecVersions) ComposeVersion ¶
func (ExecVersions) ComposeVersion() (string, error)
ComposeVersion returns the Compose plugin version.
func (ExecVersions) DockerContext ¶
func (ExecVersions) DockerContext() (string, error)
DockerContext returns the active docker context name.
func (ExecVersions) DockerVersion ¶
func (ExecVersions) DockerVersion() (string, error)
DockerVersion returns the Docker server version.
type GitProvider ¶
type GitProvider interface {
Root(cwd string) (string, error)
Commit(cwd string) (string, error)
Dirty(cwd string) (bool, error)
}
GitProvider supplies git metadata (mockable).
type OSEnv ¶
type OSEnv struct{}
OSEnv is the real process environment.
type Options ¶
type Options struct {
Command []string
IncludeEnvVals bool
Env EnvProvider
Git GitProvider
Versions VersionProvider
Now time.Time
}
Options controls Capture.
Click to show internal directories.
Click to hide internal directories.