Documentation
¶
Index ¶
- type EnvConfig
- type EnvConfigKubernetes
- type EnvConfigVault
- type EnvTool
- 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) ConfigGetBool(configKey string) bool
- func (stim *Stim) ConfigGetCacheDir(subDir string) string
- func (stim *Stim) ConfigGetDuration(configKey string) time.Duration
- func (stim *Stim) ConfigGetRaw(configKey string) interface{}
- func (stim *Stim) ConfigGetStimConfigDir() (string, error)
- func (stim *Stim) ConfigGetStimConfigFile() (string, error)
- func (stim *Stim) ConfigGetString(configKey string) string
- func (stim *Stim) ConfigHasValue(configKey string) bool
- func (stim *Stim) ConfigRemoveKey(key string) error
- func (stim *Stim) ConfigSetBool(key string, value bool) error
- func (stim *Stim) ConfigSetDefaultValues()
- func (stim *Stim) ConfigSetRaw(key string, value interface{}) error
- func (stim *Stim) ConfigSetString(key string, value string) error
- func (stim *Stim) Debug(message string)
- func (stim *Stim) DebugError(err error)
- func (stim *Stim) Env(config *EnvConfig) *env.Env
- func (stim *Stim) Execute()
- func (stim *Stim) Fatal(err error)
- func (stim *Stim) GetCompletion(shell string) error
- func (stim *Stim) GetLogger() stimlog.StimLogger
- func (stim *Stim) GetVersion() string
- func (stim *Stim) IsAutomated() bool
- 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, defaultedValue string, regex 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) Slack() *slack.Slack
- 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 EnvConfig ¶ added in v0.1.3
type EnvConfig struct { // EnvVars slice of environment variables to be set // Values look like "FOO=BAR" EnvVars []string // Kubernetes env config Kubernetes *EnvConfigKubernetes // Kubernetes env config Vault *EnvConfigVault // WorkDir sets the working directory where any shell commands will be executed WorkDir string // Tools should contains a list of supported binary tools to install and link Tools map[string]EnvTool }
EnvConfig represets a environment configuration
type EnvConfigKubernetes ¶ added in v0.1.3
type EnvConfigKubernetes struct { // Cluster is the name of the Kubernetes cluster to set up Cluster string // ServiceAccount to use when connecting to Kubernetes ServiceAccount string // DefaultNamespace to use when setting up Kubernetes DefaultNamespace string }
EnvConfig represets a environment's Kubernetes configuration
type EnvConfigVault ¶ added in v0.1.3
type EnvConfigVault struct { // SecretItems to load into the environment SecretItems []*vaulttoenvs.SecretItem }
EnvConfig represets a environment's Vault configuration
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) ConfigGetBool ¶ added in v0.0.7
GetConfigBool takes a config key and returns the boolean result
func (*Stim) ConfigGetCacheDir ¶ added in v0.1.3
ConfigGetStimCacheDir returns the stim cache directory subdir paramter optionally provides a subdirectory within the cache
func (*Stim) ConfigGetDuration ¶ added in v0.3.0
func (*Stim) ConfigGetRaw ¶ added in v0.0.7
func (*Stim) ConfigGetStimConfigDir ¶ added in v0.0.7
func (*Stim) ConfigGetStimConfigFile ¶ added in v0.0.7
ConfigGetStimConfigFile gets the current stim config file (creating it if necessary)
func (*Stim) ConfigGetString ¶ added in v0.0.7
func (*Stim) ConfigHasValue ¶ added in v0.0.7
func (*Stim) ConfigRemoveKey ¶ added in v0.0.7
func (*Stim) ConfigSetBool ¶ added in v0.0.7
func (*Stim) ConfigSetDefaultValues ¶ added in v0.3.0
func (stim *Stim) ConfigSetDefaultValues()
func (*Stim) ConfigSetRaw ¶ added in v0.0.7
func (*Stim) ConfigSetString ¶ added in v0.0.7
func (*Stim) DebugError ¶
func (*Stim) Env ¶ added in v0.1.3
Env sets up an environment based on the given config Shell commands can be executed against the environment
func (*Stim) GetCompletion ¶ added in v0.2.0
func (*Stim) GetLogger ¶ added in v0.0.4
func (stim *Stim) GetLogger() stimlog.StimLogger
GetLogger for Stim
func (*Stim) GetVersion ¶
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 ¶
func (stim *Stim) PromptListVault(vaultPath string, label string, defaultedValue string, regex string) (string, error)
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) UpdateVaultUser ¶
UpdateVaultUser updates the user's stim config file with given username This username will be the default option when authenticating against Vault