gs_dync

package
v1.2.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 错误列表

func (*Errors) Append

func (e *Errors) Append(err error)

Append 添加一个错误

func (*Errors) Error

func (e *Errors) Error() string

Error 实现 error 接口

func (*Errors) Len

func (e *Errors) Len() int

Len 错误数量

type Properties

type Properties struct {
	// contains filtered or unexported fields
}

Properties 动态属性

func New

func New() *Properties

New 创建一个 Properties 对象

func (*Properties) Data

func (p *Properties) Data() gs.Properties

Data 获取属性列表

func (*Properties) ObjectsCount

func (p *Properties) ObjectsCount() int

ObjectsCount 绑定的可刷新对象数量

func (*Properties) Refresh

func (p *Properties) Refresh(prop gs.Properties) (err error)

Refresh 更新属性列表以及绑定的可刷新对象

func (*Properties) RefreshBean

func (p *Properties) RefreshBean(v gs.Refreshable, param conf.BindParam, watch bool) error

RefreshBean 刷新一个 bean 对象,根据 watch 的值决定是否添加监听

func (*Properties) RefreshField

func (p *Properties) RefreshField(v reflect.Value, param conf.BindParam, watch bool) error

RefreshField 刷新一个 bean 的 field,根据 watch 的值决定是否添加监听

type Value

type Value[T interface{}] struct {
	// contains filtered or unexported fields
}

Value 可动态刷新的对象

func (*Value[T]) MarshalJSON

func (r *Value[T]) MarshalJSON() ([]byte, error)

MarshalJSON 实现 json.Marshaler 接口

func (*Value[T]) OnRefresh

func (r *Value[T]) OnRefresh(prop gs.Properties, param conf.BindParam) error

OnRefresh 实现 Refreshable 接口

func (*Value[T]) Value

func (r *Value[T]) Value() T

Value 获取值

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL