Documentation ¶
Index ¶
- type BoolOptField
- type BoolTOptField
- type DurationOptField
- type DurationSliceOptField
- type Float64OptField
- type Float64SliceOptField
- type Int32OptField
- type Int64OptField
- type IntOptField
- type IntSliceOptField
- type SafeValue
- type StringOptField
- type StringSliceOptField
- type TimeOptField
- type Uint32OptField
- type Uint64OptField
- type UintOptField
- type UintSliceOptField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolOptField ¶
type BoolOptField struct {
// contains filtered or unexported fields
}
BoolOptField represents the bool option field of the struct.
The default is false.
func (*BoolOptField) Default ¶
func (f *BoolOptField) Default() interface{}
Default implements OptField.Default().
func (*BoolOptField) Get ¶
func (f *BoolOptField) Get() bool
Get returns the value of the option field.
func (*BoolOptField) Parse ¶
func (f *BoolOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
type BoolTOptField ¶
type BoolTOptField struct {
// contains filtered or unexported fields
}
BoolTOptField represents the bool option field of the struct.
The default is true.
func (*BoolTOptField) Default ¶
func (f *BoolTOptField) Default() interface{}
Default implements OptField.Default().
func (*BoolTOptField) Get ¶
func (f *BoolTOptField) Get() bool
Get returns the value of the option field.
func (*BoolTOptField) Parse ¶
func (f *BoolTOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*BoolTOptField) Set ¶
func (f *BoolTOptField) Set(v interface{})
Set implements OptField.Set().
type DurationOptField ¶
type DurationOptField struct {
// contains filtered or unexported fields
}
DurationOptField represents the time.Duration option field of the struct.
func (*DurationOptField) Default ¶
func (f *DurationOptField) Default() interface{}
Default implements OptField.Default().
func (*DurationOptField) Get ¶
func (f *DurationOptField) Get() time.Duration
Get returns the value of the option field.
func (*DurationOptField) Parse ¶
func (f *DurationOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*DurationOptField) Set ¶
func (f *DurationOptField) Set(v interface{})
Set implements OptField.Set().
type DurationSliceOptField ¶
type DurationSliceOptField struct {
// contains filtered or unexported fields
}
DurationSliceOptField represents the []time.Duration option field of the struct.
func (*DurationSliceOptField) Default ¶
func (f *DurationSliceOptField) Default() interface{}
Default implements OptField.Default().
func (*DurationSliceOptField) Get ¶
func (f *DurationSliceOptField) Get() []time.Duration
Get returns the value of the option field.
func (*DurationSliceOptField) Parse ¶
func (f *DurationSliceOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*DurationSliceOptField) Set ¶
func (f *DurationSliceOptField) Set(v interface{})
Set implements OptField.Set().
type Float64OptField ¶
type Float64OptField struct {
// contains filtered or unexported fields
}
Float64OptField represents the float64 option field of the struct.
func (*Float64OptField) Default ¶
func (f *Float64OptField) Default() interface{}
Default implements OptField.Default().
func (*Float64OptField) Get ¶
func (f *Float64OptField) Get() float64
Get returns the value of the option field.
func (*Float64OptField) Parse ¶
func (f *Float64OptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*Float64OptField) Set ¶
func (f *Float64OptField) Set(v interface{})
Set implements OptField.Set().
type Float64SliceOptField ¶
type Float64SliceOptField struct {
// contains filtered or unexported fields
}
Float64SliceOptField represents the []float64 option field of the struct.
func (*Float64SliceOptField) Default ¶
func (f *Float64SliceOptField) Default() interface{}
Default implements OptField.Default().
func (*Float64SliceOptField) Get ¶
func (f *Float64SliceOptField) Get() []float64
Get returns the value of the option field.
func (*Float64SliceOptField) Parse ¶
func (f *Float64SliceOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*Float64SliceOptField) Set ¶
func (f *Float64SliceOptField) Set(v interface{})
Set implements OptField.Set().
type Int32OptField ¶
type Int32OptField struct {
// contains filtered or unexported fields
}
Int32OptField represents the int32 option field of the struct.
func (*Int32OptField) Default ¶
func (f *Int32OptField) Default() interface{}
Default implements OptField.Default().
func (*Int32OptField) Get ¶
func (f *Int32OptField) Get() int32
Get returns the value of the option field.
func (*Int32OptField) Parse ¶
func (f *Int32OptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*Int32OptField) Set ¶
func (f *Int32OptField) Set(v interface{})
Set implements OptField.Set().
type Int64OptField ¶
type Int64OptField struct {
// contains filtered or unexported fields
}
Int64OptField represents the int64 option field of the struct.
func (*Int64OptField) Default ¶
func (f *Int64OptField) Default() interface{}
Default implements OptField.Default().
func (*Int64OptField) Get ¶
func (f *Int64OptField) Get() int64
Get returns the value of the option field.
func (*Int64OptField) Parse ¶
func (f *Int64OptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*Int64OptField) Set ¶
func (f *Int64OptField) Set(v interface{})
Set implements OptField.Set().
type IntOptField ¶
type IntOptField struct {
// contains filtered or unexported fields
}
IntOptField represents the int option field of the struct.
func (*IntOptField) Default ¶
func (f *IntOptField) Default() interface{}
Default implements OptField.Default().
func (*IntOptField) Get ¶
func (f *IntOptField) Get() int
Get returns the value of the option field.
func (*IntOptField) Parse ¶
func (f *IntOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
type IntSliceOptField ¶
type IntSliceOptField struct {
// contains filtered or unexported fields
}
IntSliceOptField represents the []int option field of the struct.
func (*IntSliceOptField) Default ¶
func (f *IntSliceOptField) Default() interface{}
Default implements OptField.Default().
func (*IntSliceOptField) Get ¶
func (f *IntSliceOptField) Get() []int
Get returns the value of the option field.
func (*IntSliceOptField) Parse ¶
func (f *IntSliceOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*IntSliceOptField) Set ¶
func (f *IntSliceOptField) Set(v interface{})
Set implements OptField.Set().
type SafeValue ¶
type SafeValue struct {
// contains filtered or unexported fields
}
SafeValue is used to set and get the value safely.
Notice: it is embedded in OptField in general.
type StringOptField ¶
type StringOptField struct {
// contains filtered or unexported fields
}
StringOptField represents the string option field of the struct.
func (*StringOptField) Default ¶
func (f *StringOptField) Default() interface{}
Default implements OptField.Default().
func (*StringOptField) Get ¶
func (f *StringOptField) Get() string
Get returns the value of the option field.
func (*StringOptField) Parse ¶
func (f *StringOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*StringOptField) Set ¶
func (f *StringOptField) Set(v interface{})
Set implements OptField.Set().
type StringSliceOptField ¶
type StringSliceOptField struct {
// contains filtered or unexported fields
}
StringSliceOptField represents the []string option field of the struct.
func (*StringSliceOptField) Default ¶
func (f *StringSliceOptField) Default() interface{}
Default implements OptField.Default().
func (*StringSliceOptField) Get ¶
func (f *StringSliceOptField) Get() []string
Get returns the value of the option field.
func (*StringSliceOptField) Parse ¶
func (f *StringSliceOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*StringSliceOptField) Set ¶
func (f *StringSliceOptField) Set(v interface{})
Set implements OptField.Set().
type TimeOptField ¶
type TimeOptField struct {
// contains filtered or unexported fields
}
TimeOptField represents the time.Time option field of the struct.
func (*TimeOptField) Default ¶
func (f *TimeOptField) Default() interface{}
Default implements OptField.Default().
func (*TimeOptField) Get ¶
func (f *TimeOptField) Get() time.Time
Get returns the value of the option field.
func (*TimeOptField) Parse ¶
func (f *TimeOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
type Uint32OptField ¶
type Uint32OptField struct {
// contains filtered or unexported fields
}
Uint32OptField represents the uint32 option field of the struct.
func (*Uint32OptField) Default ¶
func (f *Uint32OptField) Default() interface{}
Default implements OptField.Default().
func (*Uint32OptField) Get ¶
func (f *Uint32OptField) Get() uint32
Get returns the value of the option field.
func (*Uint32OptField) Parse ¶
func (f *Uint32OptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*Uint32OptField) Set ¶
func (f *Uint32OptField) Set(v interface{})
Set implements OptField.Set().
type Uint64OptField ¶
type Uint64OptField struct {
// contains filtered or unexported fields
}
Uint64OptField represents the uint64 option field of the struct.
func (*Uint64OptField) Default ¶
func (f *Uint64OptField) Default() interface{}
Default implements OptField.Default().
func (*Uint64OptField) Get ¶
func (f *Uint64OptField) Get() uint64
Get returns the value of the option field.
func (*Uint64OptField) Parse ¶
func (f *Uint64OptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*Uint64OptField) Set ¶
func (f *Uint64OptField) Set(v interface{})
Set implements OptField.Set().
type UintOptField ¶
type UintOptField struct {
// contains filtered or unexported fields
}
UintOptField represents the uint option field of the struct.
func (*UintOptField) Default ¶
func (f *UintOptField) Default() interface{}
Default implements OptField.Default().
func (*UintOptField) Get ¶
func (f *UintOptField) Get() uint
Get returns the value of the option field.
func (*UintOptField) Parse ¶
func (f *UintOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
type UintSliceOptField ¶
type UintSliceOptField struct {
// contains filtered or unexported fields
}
UintSliceOptField represents the []uint option field of the struct.
func (*UintSliceOptField) Default ¶
func (f *UintSliceOptField) Default() interface{}
Default implements OptField.Default().
func (*UintSliceOptField) Get ¶
func (f *UintSliceOptField) Get() []uint
Get returns the value of the option field.
func (*UintSliceOptField) Parse ¶
func (f *UintSliceOptField) Parse(input interface{}) (output interface{}, err error)
Parse implements OptField.Parse().
func (*UintSliceOptField) Set ¶
func (f *UintSliceOptField) Set(v interface{})
Set implements OptField.Set().