xhash

package
v0.0.0-...-e8135f1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// XHashTag tag 的名称
	XHashTag = "redis"

	// XHashTagSep tag 的分隔符
	XHashTagSep = ";"
)

Variables

This section is empty.

Functions

func Hump2underline

func Hump2underline(name string) string

Hump2underline 将驼峰转为下划线

func Map2model

func Map2model(origin map[string]string, target interface{}) error

Map2model map 转模型,取得 hash 数据时用

func Model2map

func Model2map(origin interface{}) (map[string]interface{}, error)

Model2map 模型转 map,存储 hash 数据时用

Types

type FieldTag

type FieldTag struct {
	Name     string // 字段存储的名称
	IsIgnore bool   // 是否忽略该字段,不存储
}

FieldTag 分析后的 tag 数据结构

func ParseTag

func ParseTag(field reflect.StructField) *FieldTag

ParseTag 分析字段的 tag

Jump to

Keyboard shortcuts

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