Documentation
¶
Index ¶
- type Manager
- type Plugin
- func Support() Plugin
- func SupportBanner() Plugin
- func SupportCluster() Plugin
- func SupportConfig(defaultConfig []string) Plugin
- func SupportDotEnv(autoload bool) Plugin
- func SupportHelp() Plugin
- func SupportLogLevel(defaultLevel logger.Level) Plugin
- func SupportVar() Plugin
- func SupportVersion() Plugin
- type PluginParameter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Build ¶
func (m *Manager) Build(parameters *PluginParameter) error
type Plugin ¶
type Plugin func(p *PluginParameter) error
func SupportCluster ¶
func SupportCluster() Plugin
SupportCluster will create clusters when --clusters is exist
func SupportConfig ¶
SupportConfig will add several things listed below: 1. --pwd for resolve directory (default is current directory) 2. --configs for specify configuration files or directories 3. command 'config' for list config For parameters: defaultPrefix is environment prefix defaultConfig is default configs if no flag provided
func SupportDotEnv ¶
SupportDotEnv will create --envs option for custom load .env files
For parameters:
If autoload is true, it will try to load $PWD/.env and log warn if not exist; otherwise, it will not try to load any thing by default.
func SupportHelp ¶
func SupportHelp() Plugin
SupportHelp will add --help, -h, and help command to show help message
func SupportLogLevel ¶
func SupportVar ¶
func SupportVar() Plugin
SupportVar will add --var "<name>=<value>" for assign data to variables.*
func SupportVersion ¶
func SupportVersion() Plugin
SupportVersion will add '--version', '-v', 'version' to get metadata version