Documentation
¶
Overview ¶
Package gs_dync provides dynamic properties and refreshable objects.
Index ¶
- type Errors
- type Properties
- func (p *Properties) Data() gs.Properties
- func (p *Properties) ObjectsCount() int
- func (p *Properties) Refresh(prop gs.Properties) (err error)
- func (p *Properties) RefreshBean(v gs.Refreshable, param conf.BindParam, watch bool) error
- func (p *Properties) RefreshField(v reflect.Value, param conf.BindParam, watch bool) error
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Errors ¶
type Errors struct {
// contains filtered or unexported fields
}
Errors represents a collection of errors.
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
Properties manages dynamic properties and refreshable objects.
func (*Properties) Data ¶
func (p *Properties) Data() gs.Properties
Data returns the current properties.
func (*Properties) ObjectsCount ¶
func (p *Properties) ObjectsCount() int
ObjectsCount returns the number of registered refreshable objects.
func (*Properties) Refresh ¶
func (p *Properties) Refresh(prop gs.Properties) (err error)
Refresh updates the properties and refreshes all bound objects as necessary.
func (*Properties) RefreshBean ¶
func (p *Properties) RefreshBean(v gs.Refreshable, param conf.BindParam, watch bool) error
RefreshBean refreshes a single refreshable object. Optionally registers the object as refreshable if watch is true.
func (*Properties) RefreshField ¶
RefreshField refreshes a field of a bean, optionally registering it as refreshable.
type Value ¶
type Value[T interface{}] struct {
// contains filtered or unexported fields
}
Value represents a thread-safe object that can dynamically refresh its value.
func (*Value[T]) MarshalJSON ¶
MarshalJSON serializes the stored value as JSON.