common

package
v3.0.8-alpha.10+incomp... Latest Latest
Warning

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

Go to latest
Published: May 28, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTags

func GetTags(target interface{}) []string

GetTags parse a object and get the all tags

func SetValueToMapStrByTags

func SetValueToMapStrByTags(source interface{}) types.MapStr

SetValueToMapStrByTags convert a struct to MapStr by tags

func SetValueToStructByTags

func SetValueToStructByTags(target interface{}, values types.MapStr) error

SetValueToStructByTags set the struct object field value by tags

func UUID

func UUID() string

UUID a gloable id

Types

type Condition

type Condition interface {
	SetStart(start int)
	GetStart() int
	SetLimit(limit int)
	GetLimit() int
	SetSort(sort string)
	GetSort() string
	Field(fieldName string) Field
	ToMapStr() types.MapStr
}

Condition condition interface

func CreateCondition

func CreateCondition() Condition

CreateCondition create a condition object

type Field

type Field interface {
	Eq(val interface{}) Condition
	NotEq(val interface{}) Condition
	Like(val interface{}) Condition
	In(val interface{}) Condition
	NotIn(val interface{}) Condition
	Lt(val interface{}) Condition
	Lte(val interface{}) Condition
	Gt(val interface{}) Condition
	Gte(val interface{}) Condition
	ToMapStr() types.MapStr
}

Field create a field

Jump to

Keyboard shortcuts

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