Documentation ¶
Index ¶
- Variables
- func DatabasePort() int
- func InitViper()
- func ListenAddress() string
- func SetViperDefaults(config *steampipeconfig.SteampipeConfig)
- func Viper() *viper.Viper
- type CmdBuilder
- func (c *CmdBuilder) AddBoolFlag(name, shorthand string, defaultValue bool, desc string, opts ...flagOpt) *CmdBuilder
- func (c *CmdBuilder) AddIntFlag(name, shorthand string, defaultValue int, desc string, opts ...flagOpt) *CmdBuilder
- func (c *CmdBuilder) AddStringFlag(name string, shorthand string, defaultValue string, desc string, ...) *CmdBuilder
- func (c *CmdBuilder) AddStringMapStringFlag(name, shorthand string, defaultValue map[string]string, desc string, ...) *CmdBuilder
- func (c *CmdBuilder) AddStringSliceFlag(name, shorthand string, defaultValue []string, desc string, opts ...flagOpt) *CmdBuilder
Constants ¶
This section is empty.
Variables ¶
View Source
var FlagOptions = struct { Required func() flagOpt Hidden func() flagOpt Deprecated func(string) flagOpt }{ Required: requiredOpt, Hidden: hiddenOpt, Deprecated: deprecatedOpt, }
FlagOptions :: shortcut for common flag options
Functions ¶
func ListenAddress ¶ added in v0.3.0
func ListenAddress() string
func SetViperDefaults ¶ added in v0.3.0
func SetViperDefaults(config *steampipeconfig.SteampipeConfig)
Types ¶
type CmdBuilder ¶ added in v0.3.0
type CmdBuilder struct {
// contains filtered or unexported fields
}
func OnCmd ¶
func OnCmd(cmd *cobra.Command) *CmdBuilder
OnCmd :: starts a config builder wrapping over the provided *cobra.Command
func (*CmdBuilder) AddBoolFlag ¶ added in v0.3.0
func (c *CmdBuilder) AddBoolFlag(name, shorthand string, defaultValue bool, desc string, opts ...flagOpt) *CmdBuilder
Helper function to add a boolean flag to a command
func (*CmdBuilder) AddIntFlag ¶ added in v0.3.0
func (c *CmdBuilder) AddIntFlag(name, shorthand string, defaultValue int, desc string, opts ...flagOpt) *CmdBuilder
Helper function to add an integer flag to a command
func (*CmdBuilder) AddStringFlag ¶ added in v0.3.0
func (c *CmdBuilder) AddStringFlag(name string, shorthand string, defaultValue string, desc string, opts ...flagOpt) *CmdBuilder
Helper function to add a string flag to a command
func (*CmdBuilder) AddStringMapStringFlag ¶ added in v0.3.0
func (c *CmdBuilder) AddStringMapStringFlag(name, shorthand string, defaultValue map[string]string, desc string, opts ...flagOpt) *CmdBuilder
Helper function to add a flag that accepts a map of strings
func (*CmdBuilder) AddStringSliceFlag ¶ added in v0.3.0
func (c *CmdBuilder) AddStringSliceFlag(name, shorthand string, defaultValue []string, desc string, opts ...flagOpt) *CmdBuilder
Helper function to add a flag that accepts an array of strings
Click to show internal directories.
Click to hide internal directories.