Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoShow = ShowFuncType(func() func(any) { return nil })
NoShow is a constant that represents a ShowFuncType that returns nil, meaning no output will be shown.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// Path to cache folder
Dir folder.Folder `mapstructure:"cache-dir" yaml:"cache-dir"`
// Disabled disables cache interaction
Disabled bool `mapstructure:"no-cache" yaml:"no-cache"`
}
Cache holds the configuration options for caching.
type Config ¶
type Config struct {
/* Subcommands */
// Dump contains the configuration for the `godyl dump` command
Dump dump.Dump `mapstructure:"dump" validate:"-" yaml:"dump"`
// Update contains the configuration for the `godyl update` command
Update update.Update `mapstructure:"update" validate:"-" yaml:"update"`
// Status contains the configuration for the `godyl status` command
Status status.Status `mapstructure:"status" validate:"-" yaml:"status"`
// Download contains the configuration for the `godyl download` command
Download download.Download `mapstructure:"download" validate:"-" yaml:"download"`
// Install contains the configuration for the `godyl install` command
Install install.Install `mapstructure:"install" validate:"-" yaml:"install"`
/* Flags */
// Tokens store authentication tokens for various sources
Tokens Tokens `mapstructure:",squash" yaml:",inline,flatten"`
// Inherit specifies the default scheme to inherit from when no scheme is specified
Inherit string `mapstructure:"inherit" yaml:"inherit"`
// ErrorFile specifies the file to log errors
ErrorFile file.File `mapstructure:"error-file" yaml:"error-file"`
// Tools specifies the tools file to be used
Tools string `mapstructure:"tools" yaml:"tools"`
// Defaults specifies the default file to be used
Defaults file.File `mapstructure:"defaults" yaml:"defaults"`
// ConfigFile specifies the configuration file to be used
ConfigFile file.File `mapstructure:"config-file" yaml:"config-file"`
// LogLevel specifies the logging level
LogLevel string `mapstructure:"log-level" validate:"oneof=silent debug info warn error always" yaml:"log-level"`
// EnvFile specifies the environment files to be used
EnvFile []file.File `mapstructure:"env-file" yaml:"env-file"`
// Cache holds the cache configuration options
Cache Cache `mapstructure:",squash" yaml:",inline,flatten"`
// Parallel specifies the number of parallel operations
Parallel int `mapstructure:"parallel" validate:"gte=0" yaml:"parallel"`
// Verbose specifies the verbosity level
Verbose int `mapstructure:"verbose" yaml:"verbose"`
// Show specifies the verbosity level for showing output
Show Verbosity `mapstructure:"show" yaml:"show"`
// NoVerifySSL disables SSL verification
NoVerifySSL bool `mapstructure:"no-verify-ssl" yaml:"no-verify-ssl"`
// NoProgress disables progress indicators
NoProgress bool `mapstructure:"no-progress" yaml:"no-progress"`
// Keyring enables the use of the keyring for retrieving tokens
Keyring bool `mapstructure:"keyring" yaml:"keyring"`
/* Other Options */
// Common contains a subset of common configuration options
Common common.Common `mapstructure:"-" yaml:"-"`
// Tracker embed the common tracker configuration, allowing to tracker
// whether configuration values have been explicitly set or defaulted
common.Tracker `mapstructure:"-" yaml:"-"`
}
Config holds the root level configuration options. It is split into sub-structs for each command.
func (Config) AllTokensSet ¶
AllTokensSet checks if all of the tokens are set.
func (*Config) ShowFunc ¶
ShowFunc returns the function to be used for showing the output based on the Verbosity level.
type ShowFuncType ¶
type ShowFuncType func() func(any)
ShowFuncType declares the type for the ShowFunc function.
type Tokens ¶
type Tokens struct {
// GitHub token for authentication
GitHub string `mapstructure:"github-token" mask:"fixed" yaml:"github-token"`
// GitLab token for authentication
GitLab string `mapstructure:"gitlab-token" mask:"fixed" yaml:"gitlab-token"`
// URL token for authentication
URL string `mapstructure:"url-token" mask:"fixed" yaml:"url-token"`
}
Tokens holds the configuration options for authentication tokens.
Click to show internal directories.
Click to hide internal directories.