Documentation
¶
Overview ¶
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Copyright 2022 GoFast Author(http://chende.ren). All rights reserved. Use of this source code is governed by a MIT license
Index ¶
- Constants
- func BindJsonBytes(dst any, content []byte, like int8) error
- func BindJsonBytesX(dst any, content []byte, opts *BindOptions) error
- func BindJsonReader(dst any, reader io.Reader, like int8) error
- func BindJsonReaderX(dst any, reader io.Reader, opts *BindOptions) error
- func BindKV(dst any, kvs cst.KV, like int8) error
- func BindKVX(dst any, kvs cst.KV, opts *BindOptions) error
- func BindSlice(dst any, src any, like int8) error
- func BindSliceX(dst any, src any, opts *BindOptions) error
- func BindYamlBytes(dst any, content []byte, like int8) error
- func BindYamlBytesX(dst any, content []byte, opts *BindOptions) error
- func BindYamlReader(dst any, reader io.Reader, like int8) error
- func BindYamlReaderX(dst any, reader io.Reader, opts *BindOptions) error
- func Optimize(dst any, like int8) error
- func OptimizeX(dst any, opts *BindOptions) error
- func UnmarshalYamlBytes(dest any, content []byte) error
- type BindOptions
- type StructSchema
Constants ¶
const ( LikeConfig int8 = iota // 采用解析配置文件的模式 LikeInput // 采用解析输入表单的模式 LikeLoadDB // 采用解析MySQL记录的模式 )
Variables ¶
This section is empty.
Functions ¶
func BindJsonBytes ¶ added in v0.4.4
+++ JSON Bytes
func BindJsonBytesX ¶ added in v0.4.4
func BindJsonBytesX(dst any, content []byte, opts *BindOptions) error
func BindJsonReader ¶ added in v0.4.4
+++ JSON Reader
func BindJsonReaderX ¶ added in v0.4.4
func BindJsonReaderX(dst any, reader io.Reader, opts *BindOptions) error
func BindSliceX ¶ added in v0.4.4
func BindSliceX(dst any, src any, opts *BindOptions) error
func BindYamlBytes ¶ added in v0.4.4
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func BindYamlBytesX ¶ added in v0.4.4
func BindYamlBytesX(dst any, content []byte, opts *BindOptions) error
func BindYamlReader ¶ added in v0.4.4
func BindYamlReaderX ¶ added in v0.4.4
func BindYamlReaderX(dst any, reader io.Reader, opts *BindOptions) error
func Optimize ¶ added in v0.4.3
根据结构体配置信息,优化字段值 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func OptimizeX ¶ added in v0.4.3
func OptimizeX(dst any, opts *BindOptions) error
func UnmarshalYamlBytes ¶ added in v0.4.4
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ yamlUnmarshal YAML to map[string]interface{} instead of map[interface{}]interface{}.
Types ¶
type BindOptions ¶ added in v0.4.4
type StructSchema ¶ added in v0.4.4
type StructSchema struct {
// contains filtered or unexported fields
}
表结构体Schema, 限制表最多127列(用int8计数)
func SchemaNoCacheOfType ¶ added in v0.4.3
func SchemaNoCacheOfType(rTyp reflect.Type, opts *BindOptions) *StructSchema
func SchemaOfType ¶
func SchemaOfType(rTyp reflect.Type, opts *BindOptions) *StructSchema
func (*StructSchema) AddrByIndex ¶ added in v0.4.4
func (ms *StructSchema) AddrByIndex(rVal *reflect.Value, index int8) any
func (*StructSchema) RefValueByIndex ¶ added in v0.4.4
func (*StructSchema) ValueByIndex ¶ added in v0.4.4
func (ms *StructSchema) ValueByIndex(rVal *reflect.Value, index int8) any
reflect