Documentation
¶
Overview ¶
Package cli handles shell completions
Package cli handles environment variables ¶
Package cli handles CLI flag parsing ¶
Package cli handles help output ¶
Package cli handles context for all operations
Index ¶
- Constants
- func DefaultConfigs() []string
- func GenerateCompletions(w io.Writer) error
- func Usage(w io.Writer) error
- type CommandType
- type Completion
- type Settings
- func (s Settings) AllowApplication(input string) bool
- func (s *Settings) CompileApplicationFilter(filter string, negate bool) error
- func (s Settings) FilterApplications() bool
- func (s Settings) LogCore(cat logging.Category, msg string, a ...any)
- func (s Settings) LogDebug(cat logging.Category, msg string, a ...any)
- func (s Settings) ParseToken(t core.Token) (string, error)
Constants ¶
View Source
const ( // ListCommand will list the active applications ListCommand CommandType = "list" // PurgeCommand is used to delete old artifacts/dirs/etc. PurgeCommand CommandType = "purge" // UpgradeCommand is used to update packages UpgradeCommand CommandType = "upgrade" // VersionCommand displays version information VersionCommand = "version" // CompletionsCommand generates completions CompletionsCommand = "completions" // CommitFlag confirms and therefore commits changes CommitFlag = "commit" // VerbosityFlag changes logging output VerbosityFlag = "verbosity" // ApplicationsFlag enables selected applications ApplicationsFlag = "filter-applications" // CleanDirFlag indicates directory cleanup should occur CleanDirFlag = "directories" // ReDeployFlag will indicate all apps should ignore the redeployment rules and force redeploy ReDeployFlag = "force-redeploy" // NegateFilter means to IGNORE filter applications NegateFilter = "negate-filter" )
View Source
const (
// ConfigFileEnv is the environment variable for config file override
ConfigFileEnv = "BLAP_CONFIG_FILE"
)
View Source
const InfoVerbosity = 2
InfoVerbosity is the default info level for outputs
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigs ¶
func DefaultConfigs() []string
DefaultConfigs is the list of options for config files
func GenerateCompletions ¶
GenerateCompletions will generate shell completions
Types ¶
type Completion ¶
type Completion struct {
Executable string
Command struct {
Purge string
Upgrade string
List string
}
Params struct {
Upgrade string
Purge string
List string
}
Arg struct {
Applications string
ForceDeploy string
Negate string
Confirm string
CleanDirs string
}
}
Completion is the shell completion template object
type Settings ¶
type Settings struct {
DryRun bool
Purge bool
Writer io.Writer
Verbosity int
CleanDirs bool
ReDeploy bool
// contains filtered or unexported fields
}
Settings are the core settings
func (Settings) AllowApplication ¶
AllowApplication indicates if an application is allowed
func (*Settings) CompileApplicationFilter ¶
CompileApplicationFilter will compile the necessary app filter
func (Settings) FilterApplications ¶
FilterApplications indicates if the
Click to show internal directories.
Click to hide internal directories.