Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ContextOverride string
)
Functions ¶
func FindWorkspaceFile ¶ added in v0.2.4
modified from the go source code: src/cmd/go/internal/modload/init.go
func SetContext ¶ added in v0.2.0
func SetContext(new Context)
func SetDefaultContext ¶ added in v0.2.0
Types ¶
type API ¶ added in v0.0.3
type API struct {
ImageName string `mapstructure:"image_name" yaml:"image_name"`
}
type Context ¶ added in v0.2.0
type Context struct {
Name string
Repo string
Root string
TrunkBranch string `mapstructure:"trunk_branch" yaml:"trunk_branch"`
API API `mapstructure:"api" yaml:"api"`
IsWorkspace bool
Infra map[string]InfraService
}
func GetContext ¶ added in v0.2.0
func GetContext() Context
GetContext will return the current context or exit if none is found. You can call this function multiple times in a single command execution and it will only process context lookup logic once and then return the found context every subsequent call. The current context is found using the following precedence:
1. Currently set in-memory context (singleton)
2. The context override set by the user using the --context flag
3. The context of the current (or any parent) directory
4. The default context as set in the dctl config
func LoadWorkspaceContext ¶ added in v0.2.0
type InfraService ¶ added in v0.2.4
type InfraService struct {
ImageName string `mapstructure:"image_name" yaml:"image_name"`
}
Click to show internal directories.
Click to hide internal directories.