Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RealWorkDir ¶
Types ¶
type Context ¶
type Context interface {
// Context is the golang context to use
Context() context2.Context
SetContext(ctx context2.Context)
// WorkingDir is the current working dir. Functions
// that receive this context should prefer this working directory
// instead of using the global one.
WorkingDir() string
// RunID is the current Ankor CLI run id, which differs in each
// run of the CLI. This can be used to save certain information
// during the run.
RunID() string
// Environ is the environment for command execution
Environ() expand.Environ
// Log is the currently used logger
Log() log.Logger
// Config is the loaded Ankor config
Config() config.Config
// IsDone checks if the context expired
IsDone() bool
// ResolvePath resolves a relative path according to the
// current working directory
ResolvePath(relPath string) string
WithNewTomb() (Context, *tomb2.Tomb)
WithWorkingDir(workingDir string) Context
WithConfig(conf config.Config) Context
WithContext(ctx context2.Context) Context
WithEnviron(environ expand.Environ) Context
WithLogger(logger log.Logger) Context
AttachGlobalFolders() Context
RootFolders() *util.Dirs
GetTemplateFs() embed.FS
SetTemplateFs(templateFs embed.FS)
GetVersion() string
SetVersion(v string)
SetOnline(online bool)
GetOnline() bool
}
Click to show internal directories.
Click to hide internal directories.