Documentation ¶
Index ¶
- func DefaultPreRunHooks(hook PreRunHookFun, defaults ...PreRunHookFun) func(*cobra.Command, []string)
- func Done() <-chan os.Signal
- func GetEndpoint(typ, host, listen string) string
- func GetFromStage(vs ...*viper.Viper) *viper.Viper
- func GetStageFromEnv(vs ...*viper.Viper) string
- func GetTokenFromEnv(vs ...*viper.Viper) string
- func InitManyStringMapFromConfigWithStage(opts []InitManyOption)
- func InitServiceConfigOptions(dst, src *ServiceConfigOptions)
- func InitStringMapFromConfigWithStage(dst *map[string]interface{}, key string)
- func LoadConfigFile(opt cmd_contrib.ConfigOptioner, v *viper.Viper) func()
- func PreRunHooks(hooks ...PreRunHookFun) func(*cobra.Command, []string)
- func Run(service string, fn func() error) func(cmd *cobra.Command, args []string)
- func RunWithArgs(service string, fn func(args []string) error) func(cmd *cobra.Command, args []string)
- func SetDefaultHooks(hooks ...PreRunHookFun)
- func UnmarshalConfig(dst interface{}, vs ...*viper.Viper)
- type ApplicationCredentialOption
- type EndpointOption
- type InitManyOption
- type LogOption
- type PreRunHookFun
- type RootOptions
- type ServiceConfigOption
- type ServiceConfigOptions
- type StorageOption
- type TokenOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPreRunHooks ¶
func DefaultPreRunHooks(hook PreRunHookFun, defaults ...PreRunHookFun) func(*cobra.Command, []string)
func GetEndpoint ¶
func GetStageFromEnv ¶
func GetTokenFromEnv ¶ added in v1.1.4
func InitManyStringMapFromConfigWithStage ¶ added in v1.1.26
func InitManyStringMapFromConfigWithStage(opts []InitManyOption)
func InitServiceConfigOptions ¶
func InitServiceConfigOptions(dst, src *ServiceConfigOptions)
func InitStringMapFromConfigWithStage ¶ added in v1.1.26
func LoadConfigFile ¶
func LoadConfigFile(opt cmd_contrib.ConfigOptioner, v *viper.Viper) func()
func PreRunHooks ¶
func PreRunHooks(hooks ...PreRunHookFun) func(*cobra.Command, []string)
func RunWithArgs ¶
func SetDefaultHooks ¶
func SetDefaultHooks(hooks ...PreRunHookFun)
func UnmarshalConfig ¶
Types ¶
type EndpointOption ¶
type InitManyOption ¶ added in v1.1.26
type PreRunHookFun ¶
type PreRunHookFun func()
type RootOptions ¶
type RootOptions struct { Config string Stage string Verbose bool Log LogOption ApplicationCredential ApplicationCredentialOption `mapstructure:"application_credential"` ServiceConfig ServiceConfigOptions `mapstructure:"service_config"` }
type ServiceConfigOption ¶
type ServiceConfigOption struct {
Address string
}
type ServiceConfigOptions ¶
type ServiceConfigOptions struct { CoreAgentd ServiceConfigOption `mapstructure:"core_agentd"` Cored ServiceConfigOption Identityd ServiceConfigOption Camerad ServiceConfigOption Sensord ServiceConfigOption Streamd ServiceConfigOption Metathingsd ServiceConfigOption }
type StorageOption ¶
type TokenOption ¶
type TokenOption struct {
Token string
}
Click to show internal directories.
Click to hide internal directories.