Documentation ¶
Index ¶
- Variables
- func Add(f *flag.FlagSet, settings *config.Settings)
- func AddGlobal(f *flag.FlagSet) (configFile *string)
- func AddHub(f *flag.FlagSet, settings, def *config.HubConnectionSettings)
- func AddLocalBroker(f *flag.FlagSet, settings, def *config.LocalConnectionSettings)
- func AddLog(f *flag.FlagSet, settings, def *logger.LogSettings)
- func AddTLS(f *flag.FlagSet, settings, def *config.TLSSettings)
- func ConfigCheck(logger logger.Logger, configFile string)
- func Copy(f *flag.FlagSet) map[string]interface{}
- func Parse(f *flag.FlagSet, args []string, version string, exit func(code int)) error
- type LogLevelV
- type StringSliceV
- type URLV
Constants ¶
This section is empty.
Variables ¶
var ( // ErrParse is generic flags parse error ErrParse = errors.New("cannot parse flags") )
Functions ¶
func Add ¶
Add adds the Suite Connector flags and uses the provided settings to collect the provided values.
func AddHub ¶
func AddHub(f *flag.FlagSet, settings, def *config.HubConnectionSettings)
AddHub adds the Hub connection related flags.
func AddLocalBroker ¶
func AddLocalBroker(f *flag.FlagSet, settings, def *config.LocalConnectionSettings)
AddLocalBroker add the local connection related flags.
func AddLog ¶
func AddLog(f *flag.FlagSet, settings, def *logger.LogSettings)
AddLog adds the Logger related flags.
func AddTLS ¶
func AddTLS(f *flag.FlagSet, settings, def *config.TLSSettings)
AddTLS add the TLS connection related flags.
func ConfigCheck ¶
ConfigCheck checks for config file existence.
Types ¶
type LogLevelV ¶
type LogLevelV struct {
// contains filtered or unexported fields
}
LogLevelV represents LogLevel flag value.
func NewLogLevelV ¶
NewLogLevelV creates new flag variable for LogLevel definition.
type StringSliceV ¶
type StringSliceV struct {
// contains filtered or unexported fields
}
StringSliceV represents slice of strings flag value.
func NewStringSliceV ¶
func NewStringSliceV(setter *[]string) *StringSliceV
NewStringSliceV creates new flag variable for slice of strings definition.
func (*StringSliceV) Get ¶
func (f *StringSliceV) Get() interface{}
Get returns the flag converted value.
func (*StringSliceV) Provided ¶
func (f *StringSliceV) Provided() bool
Provided returns true if the flag value is provided.
func (*StringSliceV) Set ¶
func (f *StringSliceV) Set(value string) error
Set validates and applies the provided value if no error.
func (*StringSliceV) String ¶
func (f *StringSliceV) String() string
String returns the flag string value.
type URLV ¶
type URLV struct {
// contains filtered or unexported fields
}
URLV represents URL flag value.