Documentation ¶
Overview ¶
Package values provides the functionality to store, retrieve and provide default configuration values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultBool ¶
type DefaultBool struct {
// contains filtered or unexported fields
}
DefaultBool implementation of `Bool` interface
func (DefaultBool) Attribute ¶
func (d DefaultBool) Attribute() output.Attribute
Attribute creates representation of the value to be used when exporting the configuration.
func (DefaultBool) Get ¶
func (d DefaultBool) Get() bool
Get the value if set otherwise return default value.
func (DefaultBool) Set ¶
func (d DefaultBool) Set(v bool)
Set the value and store it in configuration store.
type DefaultInt ¶
type DefaultInt struct {
// contains filtered or unexported fields
}
DefaultInt implementation of `Int` interface.
func (DefaultInt) Attribute ¶
func (d DefaultInt) Attribute() output.Attribute
Attribute creates representation of the value to be used when exporting the configuration.
func (DefaultInt) Get ¶
func (d DefaultInt) Get() int
Get the value if set otherwise return default value.
func (DefaultInt) Set ¶
func (d DefaultInt) Set(v int)
Set the value and store it in configuration store.
type DefaultString ¶
type DefaultString struct {
// contains filtered or unexported fields
}
DefaultString implementation of `String` interface.
func (DefaultString) Attribute ¶
func (d DefaultString) Attribute() output.Attribute
Attribute creates representation of the value to be used when exporting the configuration.
func (DefaultString) Get ¶
func (d DefaultString) Get() string
Get the value if set otherwise return default value.
func (DefaultString) Set ¶
func (d DefaultString) Set(v string)
Set the value and store it in configuration store.
type DefaultStringSlice ¶
type DefaultStringSlice struct {
// contains filtered or unexported fields
}
DefaultStringSlice implementation of `StringSlice` interface.
func (DefaultStringSlice) Attribute ¶
func (d DefaultStringSlice) Attribute() output.Attribute
Attribute creates representation of the value to be used when exporting the configuration.
func (DefaultStringSlice) Get ¶
func (d DefaultStringSlice) Get() []string
Get the value if set otherwise return default value.
func (DefaultStringSlice) Set ¶
func (d DefaultStringSlice) Set(v []string)
Set the value and store it in configuration store.
type Store ¶
type Store interface { GetString(key string) string GetStringSlice(key string) []string GetInt(key string) int GetBool(key string) bool IsSet(key string) bool Set(key string, value interface{}) }
Store provides the functions to retrieve values from configuration storage.
type StringSlice ¶
StringSlice interface to all Get, Set and exporting of `[]string` values.
func NewDefaultStringSlice ¶
func NewDefaultStringSlice(defVal []string, store Store, setting string) StringSlice
NewDefaultStringSlice create the `StringSlice` value.
Directories ¶
Path | Synopsis |
---|---|
Package valuestest is a generated GoMock package.
|
Package valuestest is a generated GoMock package. |