Documentation ¶
Index ¶
- func GetFieldTag(field reflect.StructField) string
- func GetGtTags(model interface{}) map[string]gtTags
- func GetJsonTags(model interface{}) map[string]string
- func GetPartTags(model interface{}) (arr []string)
- func GetTags(model interface{}) (arr []string)
- func IsGtTagIgnore(tag reflect.StructTag) bool
- func IsTagIgnore(tag reflect.StructTag, tagName string, exist bool, extTags ...string) bool
- func ObtainMoreTags(typ reflect.Type, tagNames []string, fs ...func(reflect.StructTag) bool) map[string]map[string]string
- func ObtainTags(ref reflect.Type, tagName string, fs ...func(reflect.StructTag) bool) map[string]string
- func ParseFieldTag(sTag reflect.StructTag, tagV, field string) (tag, tagTable string, b bool)
- func ParseGtTag(sTag reflect.StructTag) (tag, tagTable string, b bool)
- func ParseGtTags(ref reflect.Type, fs ...func(reflect.StructTag) bool) map[string]gtTags
- func ParseJsonTags(ref reflect.Type, fs ...func(reflect.StructTag) bool) map[string]string
- func ParseTag(field reflect.StructField) (tag, tagTable, jsonTag string, b bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFieldTag ¶
func GetFieldTag(field reflect.StructField) string
GetFieldTag get json field tag if no, use HumpToLine
func GetGtTags ¶
func GetGtTags(model interface{}) map[string]gtTags
GetGtTags gt:"-" gt:"ignore" gt:"sub_sql" gt:"excel:NAME" gt:"field:table.column" gt:"field:table.column;excel:NAME" GetGtTags use to analyze and obtain GT tags in the structure model
func GetJsonTags ¶
GetJsonTags use to analyze and obtain JSON tags in the structure model, but it will ignore the ignored value of json
func GetPartTags ¶
func GetPartTags(model interface{}) (arr []string)
GetPartTags remove some like id,_id
func GetTags ¶
func GetTags(model interface{}) (arr []string)
GetTags get struct model fields tag []string include gt tag rule
func IsGtTagIgnore ¶
IsGtTagIgnore can determine gt-tags whether you do not need to parse
func IsTagIgnore ¶
IsTagIgnore can determine tags whether you do not need to parse
func ObtainMoreTags ¶
func ObtainMoreTags(typ reflect.Type, tagNames []string, fs ...func(reflect.StructTag) bool) map[string]map[string]string
ObtainMoreTags use to get the specified tag in the structure fs use to filter specified tags, true means filtering
func ObtainTags ¶
func ObtainTags(ref reflect.Type, tagName string, fs ...func(reflect.StructTag) bool) map[string]string
ObtainTags use to get the specified tag in the structure fs use to filter specified tags, true means filtering
func ParseFieldTag ¶ added in v1.30.30
ParseFieldTag gorm:"column:field"
func ParseGtTag ¶
ParseGtTag gt:"field:table.column"
func ParseGtTags ¶
ParseGtTags use to get all gt tags
func ParseJsonTags ¶
Types ¶
This section is empty.