Documentation
¶
Index ¶
- Variables
- func BuildMap(entity IEntity) map[string]interface{}
- func BuildMapList(entityList []IEntity) []map[string]interface{}
- func BuildPoList(entityList []IEntity) []map[string]interface{}
- func GetIDList(entityList []IEntity) []int64
- func GetKeyList(entityList []IEntity) []string
- func GetPoReflectType(entityType string) (string, reflect.Type, error)
- func MakeServiceKey(slic []string) string
- func SortEntityList(entityList []IEntity)
- func SortMapList(mapList []map[string]interface{})
- type BaseEntity
- type IEntity
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Factory *factory
)
Functions ¶
func BuildMapList ¶ added in v1.0.1
func BuildPoList ¶ added in v1.0.1
func GetKeyList ¶ added in v1.0.2
func MakeServiceKey ¶
MakeServiceKey Java的编码格式范例:"[mqtt-client, 范例:MQTT客户端]",注意,它带""的字符串
func SortEntityList ¶ added in v1.0.1
func SortEntityList(entityList []IEntity)
func SortMapList ¶ added in v1.0.1
func SortMapList(mapList []map[string]interface{})
Types ¶
type BaseEntity ¶
BaseEntity 基础信息
type IEntity ¶
type IEntity interface {
Type() string // 类型名称
GetBaseEntity() *BaseEntity // 基础信息
NewEntity() IEntity // 实例化一个Entity,它的各成员部位nil
NewPo() interface{} // 实例化一个PO,它的各成员部位nil
MakeServiceKey() string // 生成string格式的key
MakeServiceKeyList() []string // 生成[]string格式的key
TableName() string // 数据库表名称,默认名称,在持久化的时候对应哪个数据库表
BuildByJson(jsn *string) error // 构造实体
BuildToJson() (string, error) // 构造实体
BuildByPo(interface{}) // 构造实体
BuildToPo() interface{} // 构造实体
}
IEntity 定义接口
Click to show internal directories.
Click to hide internal directories.