Documentation
¶
Index ¶
- func GetProperty(prop *conf.Properties, param conf.BindParam) (string, error)
- func Validate(val interface{}, param conf.BindParam) error
- type Bool
- type Duration
- func (x *Duration) MarshalJSON() ([]byte, error)
- func (x *Duration) OnValidate(f DurationValidateFunc)
- func (x *Duration) Refresh(prop *conf.Properties, param conf.BindParam) error
- func (x *Duration) Validate(prop *conf.Properties, param conf.BindParam) error
- func (x *Duration) Value() time.Duration
- type DurationValidateFunc
- type Event
- type EventFunc
- type EventValidateFunc
- type Field
- type Float32
- type Float32ValidateFunc
- type Float64
- type Float64ValidateFunc
- type Int32
- type Int32ValidateFunc
- type Int64
- type Int64ValidateFunc
- type Properties
- func (p *Properties) Bind(i interface{}, opts ...conf.BindOption) error
- func (p *Properties) BindValue(v reflect.Value, param conf.BindParam) error
- func (p *Properties) Get(key string, opts ...conf.GetOption) string
- func (p *Properties) Has(key string) bool
- func (p *Properties) Keys() []string
- func (p *Properties) Refresh(prop *conf.Properties) (err error)
- func (p *Properties) Resolve(s string) (string, error)
- func (p *Properties) Update(m map[string]interface{}) error
- type Ref
- func (r *Ref) Init(i interface{}) error
- func (r *Ref) MarshalJSON() ([]byte, error)
- func (r *Ref) OnValidate(f RefValidateFunc)
- func (r *Ref) Refresh(prop *conf.Properties, param conf.BindParam) error
- func (r *Ref) Validate(prop *conf.Properties, param conf.BindParam) error
- func (r *Ref) Value() interface{}
- type RefValidateFunc
- type String
- type StringValidateFunc
- type Time
- type TimeValidateFunc
- type Uint32
- type Uint32ValidateFunc
- type Uint64
- type Uint64ValidateFunc
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProperty ¶
Types ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
func (*Bool) MarshalJSON ¶
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
func (*Duration) MarshalJSON ¶
func (*Duration) OnValidate ¶
func (x *Duration) OnValidate(f DurationValidateFunc)
type DurationValidateFunc ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) MarshalJSON ¶
func (*Event) OnValidate ¶
func (e *Event) OnValidate(h EventValidateFunc)
type EventValidateFunc ¶
type EventValidateFunc func(prop *conf.Properties, param conf.BindParam) error
type Float32 ¶
type Float32 struct {
// contains filtered or unexported fields
}
func (*Float32) MarshalJSON ¶
func (*Float32) OnValidate ¶
func (x *Float32) OnValidate(f Float32ValidateFunc)
type Float32ValidateFunc ¶
type Float64 ¶
type Float64 struct {
// contains filtered or unexported fields
}
func (*Float64) MarshalJSON ¶
func (*Float64) OnValidate ¶
func (x *Float64) OnValidate(f Float64ValidateFunc)
type Float64ValidateFunc ¶
type Int32 ¶
type Int32 struct {
// contains filtered or unexported fields
}
func (*Int32) MarshalJSON ¶
func (*Int32) OnValidate ¶
func (x *Int32) OnValidate(f Int32ValidateFunc)
type Int32ValidateFunc ¶
type Int64 ¶
type Int64 struct {
// contains filtered or unexported fields
}
func (*Int64) MarshalJSON ¶
func (*Int64) OnValidate ¶
func (x *Int64) OnValidate(f Int64ValidateFunc)
type Int64ValidateFunc ¶
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
Properties 动态属性
func New ¶
func New() *Properties
func (*Properties) Bind ¶
func (p *Properties) Bind(i interface{}, opts ...conf.BindOption) error
func (*Properties) Has ¶
func (p *Properties) Has(key string) bool
func (*Properties) Keys ¶
func (p *Properties) Keys() []string
func (*Properties) Refresh ¶
func (p *Properties) Refresh(prop *conf.Properties) (err error)
func (*Properties) Update ¶
func (p *Properties) Update(m map[string]interface{}) error
type Ref ¶
type Ref struct {
// contains filtered or unexported fields
}
func (*Ref) MarshalJSON ¶
func (*Ref) OnValidate ¶
func (r *Ref) OnValidate(f RefValidateFunc)
type RefValidateFunc ¶
type RefValidateFunc func(v interface{}) error
type String ¶
type String struct {
// contains filtered or unexported fields
}
func (*String) MarshalJSON ¶
func (*String) OnValidate ¶
func (x *String) OnValidate(f StringValidateFunc)
type StringValidateFunc ¶
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
func (*Time) MarshalJSON ¶
func (*Time) OnValidate ¶
func (x *Time) OnValidate(f TimeValidateFunc)
type TimeValidateFunc ¶
type Uint32 ¶
type Uint32 struct {
// contains filtered or unexported fields
}
func (*Uint32) MarshalJSON ¶
func (*Uint32) OnValidate ¶
func (x *Uint32) OnValidate(f Uint32ValidateFunc)
type Uint32ValidateFunc ¶
type Uint64 ¶
type Uint64 struct {
// contains filtered or unexported fields
}
func (*Uint64) MarshalJSON ¶
func (*Uint64) OnValidate ¶
func (x *Uint64) OnValidate(f Uint64ValidateFunc)
type Uint64ValidateFunc ¶
Click to show internal directories.
Click to hide internal directories.