Documentation ¶
Index ¶
- func NormalizeBool(value string) (bool, error)
- func ParseOption(arg string, lib *OptionLibrary) (string, bool, error)
- type BoolOptions
- func (o *BoolOptions) Apply(n models.ConfigurationMap, changed ChangedFunc, data interface{}) int
- func (bo *BoolOptions) DeepCopy() *BoolOptions
- func (o *BoolOptions) Delete(key string)
- func (o *BoolOptions) Dump()
- func (o *BoolOptions) GetFmtList() string
- func (o *BoolOptions) GetFmtOpt(name string) string
- func (bo *BoolOptions) GetModel() *models.Configuration
- func (o *BoolOptions) InheritDefault(parent *BoolOptions, key string)
- func (o *BoolOptions) IsEnabled(key string) bool
- func (o *BoolOptions) Set(key string, value bool)
- func (o *BoolOptions) SetIfUnset(key string, value bool)
- func (o *BoolOptions) Validate(n models.ConfigurationMap) error
- type ChangedFunc
- type Option
- type OptionLibrary
- type OptionMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeBool ¶
func ParseOption ¶
func ParseOption(arg string, lib *OptionLibrary) (string, bool, error)
Types ¶
type BoolOptions ¶
type BoolOptions struct { Opts OptionMap `json:"map"` Library *OptionLibrary `json:"-"` }
func NewBoolOptions ¶
func NewBoolOptions(lib *OptionLibrary) *BoolOptions
func (*BoolOptions) Apply ¶
func (o *BoolOptions) Apply(n models.ConfigurationMap, changed ChangedFunc, data interface{}) int
func (*BoolOptions) DeepCopy ¶
func (bo *BoolOptions) DeepCopy() *BoolOptions
func (*BoolOptions) Delete ¶
func (o *BoolOptions) Delete(key string)
func (*BoolOptions) Dump ¶
func (o *BoolOptions) Dump()
func (*BoolOptions) GetFmtList ¶
func (o *BoolOptions) GetFmtList() string
func (*BoolOptions) GetFmtOpt ¶
func (o *BoolOptions) GetFmtOpt(name string) string
GetFmtOpt returns #define name if option exists and is set to true in endpoint's Opts map or #undef name if option does not exist or exists but is set to false
func (*BoolOptions) GetModel ¶
func (bo *BoolOptions) GetModel() *models.Configuration
func (*BoolOptions) InheritDefault ¶
func (o *BoolOptions) InheritDefault(parent *BoolOptions, key string)
func (*BoolOptions) IsEnabled ¶
func (o *BoolOptions) IsEnabled(key string) bool
func (*BoolOptions) Set ¶
func (o *BoolOptions) Set(key string, value bool)
func (*BoolOptions) SetIfUnset ¶
func (o *BoolOptions) SetIfUnset(key string, value bool)
func (*BoolOptions) Validate ¶
func (o *BoolOptions) Validate(n models.ConfigurationMap) error
type ChangedFunc ¶
type OptionLibrary ¶
func (OptionLibrary) Define ¶
func (l OptionLibrary) Define(name string) string
func (OptionLibrary) Validate ¶
func (l OptionLibrary) Validate(name string) error
Click to show internal directories.
Click to hide internal directories.