reflectutils

package
v1.4.133 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TAG_GOCFG = "gocfg"

	TAG_ENV  = "env"
	TAG_JSON = "json"
	TAG_GODI = "godi"
	TAG_GROM = "gorm"
)

Variables

This section is empty.

Functions

func ParseGocfgTag added in v1.4.128

func ParseGocfgTag(v any) *linkedhashmap.Map

Types

type ReflectTag

type ReflectTag struct {
	Tag      string //env gorm json
	Field    string //id
	TagName  string //${web.server.name}
	TagValue string //web.server.com
}

Db int32 `env:"${web.server.name}" gorm:"column:id;type:int(11);PRIMARY_KEY;comment:”" json:"id"`

func NewReflectTag

func NewReflectTag() *ReflectTag

func (*ReflectTag) ParseEnv added in v1.0.6

func (this *ReflectTag) ParseEnv(tagstr string) *ReflectTag

func (*ReflectTag) ParseTag

func (this *ReflectTag) ParseTag(tagstr string) *ReflectTag

type ReflectTags

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

func Default added in v1.4.126

func Default() *ReflectTags

func NewReflectTags

func NewReflectTags() *ReflectTags

func (*ReflectTags) Log

func (this *ReflectTags) Log()

func (*ReflectTags) Parse added in v1.0.6

func (this *ReflectTags) Parse(key string, v any) *ReflectTags

func (*ReflectTags) ParseEnv added in v1.0.6

func (this *ReflectTags) ParseEnv(v any)

func (*ReflectTags) ParseGocfgTag added in v1.4.128

func (this *ReflectTags) ParseGocfgTag(v any)

func (*ReflectTags) ParseGorm added in v1.0.6

func (this *ReflectTags) ParseGorm(v any)

func (*ReflectTags) ParseJson added in v1.0.6

func (this *ReflectTags) ParseJson(v any)

func (*ReflectTags) ParseOne

func (this *ReflectTags) ParseOne(v any, FieldName string, tagName string)

func (*ReflectTags) SetTagMap

func (this *ReflectTags) SetTagMap(tagMap *linkedhashmap.Map)

func (*ReflectTags) TagMap

func (this *ReflectTags) TagMap() *linkedhashmap.Map

func (*ReflectTags) ToString

func (this *ReflectTags) ToString() string

Jump to

Keyboard shortcuts

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