Documentation ¶
Index ¶
- type Stim
- func (stim *Stim) AddStimpack(s Stimpack)
- func (stim *Stim) Aws(accessKey string, secretKey string) *aws.Aws
- func (stim *Stim) BindCommand(command *cobra.Command, parentCommand *cobra.Command)
- func (stim *Stim) CreateConfigFile() (string, error)
- func (stim *Stim) CreateDirIfNotExist(dir string) error
- func (stim *Stim) Debug(message string)
- func (stim *Stim) DebugError(err error)
- func (stim *Stim) Execute()
- func (stim *Stim) Fatal(err error)
- func (stim *Stim) Get(configKey string) interface{}
- func (stim *Stim) GetConfig(configKey string) string
- func (stim *Stim) GetConfigBool(configKey string) bool
- func (stim *Stim) GetLogger() stimlog.StimLogger
- func (stim *Stim) GetStimPath() (string, error)
- func (stim *Stim) GetVersion() string
- func (stim *Stim) IsAutomated() bool
- func (stim *Stim) Kubernetes() *kubernetes.Kubernetes
- func (stim *Stim) Pagerduty() *pagerduty.Pagerduty
- func (stim *Stim) Prometheus() *prometheus.Prometheus
- func (stim *Stim) PromptBool(label string, override bool, defaultvalue bool) (bool, error)
- func (stim *Stim) PromptList(label string, list []string, override string) (string, error)
- func (stim *Stim) PromptListVault(vaultPath string, label string, override string) (string, error)
- func (stim *Stim) PromptSearchList(label string, list []string) (string, error)
- func (stim *Stim) PromptString(label string, defaultvalue string) (string, error)
- func (stim *Stim) Set(key string, value string)
- func (stim *Stim) Slack() *slack.Slack
- func (stim *Stim) UpdateConfigFileKey(key string, value string) error
- func (stim *Stim) UpdateVaultUser(username string) error
- func (stim *Stim) User() (string, error)
- func (stim *Stim) Vault() *vault.Vault
- type Stimpack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stim ¶
type Stim struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Stim
New gets the Stim struct, which is treated like a singleton so you will get the same one as everywhere when this is called
func (*Stim) AddStimpack ¶ added in v0.0.3
func (*Stim) BindCommand ¶
func (*Stim) CreateConfigFile ¶ added in v0.0.3
CreateConfigFile will create the stim config file if it doesn't exist Used the frist time this code is ran so sub functions do not get errors when writting to the config.
func (*Stim) CreateDirIfNotExist ¶ added in v0.0.3
func (*Stim) DebugError ¶
func (*Stim) GetConfigBool ¶
GetConfigBool takes a config key and returns the boolean result
func (*Stim) GetLogger ¶ added in v0.0.4
func (stim *Stim) GetLogger() stimlog.StimLogger
GetLogger for Stim
func (*Stim) GetStimPath ¶ added in v0.0.4
func (*Stim) GetVersion ¶
func (*Stim) IsAutomated ¶
IsAutomated simply guesses if a build is invoking this code Used to disable user input prompts
func (*Stim) Kubernetes ¶
func (stim *Stim) Kubernetes() *kubernetes.Kubernetes
func (*Stim) Prometheus ¶
func (stim *Stim) Prometheus() *prometheus.Prometheus
func (*Stim) PromptBool ¶
PromptBool asks the user a yes/no question
func (*Stim) PromptList ¶
PromptList prompts the user to select from the list of string provided If override string is not empty it will be returned without
func (*Stim) PromptListVault ¶
PromptListVault uses a path from vault and prompts to select the list of secrets within that list. Returns the value selected. If override string is not empty it will be returned without
func (*Stim) PromptSearchList ¶ added in v0.0.3
PromptSearchList takes a label, list of selectable values and prompts the user to select the results. If override string is not empty it will be returned without prompting
func (*Stim) PromptString ¶
PromptString prompts the user to enter a string
func (*Stim) UpdateConfigFileKey ¶
func (*Stim) UpdateVaultUser ¶
UpdateVaultUser updates the user's stim config file with given username This username will be the default option when authenticating against Vault