Versions in this module Expand all Collapse all v0 v0.0.2 Oct 8, 2019 v0.0.1 Oct 8, 2019 Changes in this version + const XFilterTagName + const XOrmTagName + func Filter(src map[string]interface{}, rules []string, selects ...map[string]interface{}) (map[string]interface{}, *gvalid.Error) + func FilterJson(src map[string]interface{}, jsonRule string, selects ...map[string]interface{}) (map[string]interface{}, *gvalid.Error) + func FilterJsonOnly(src map[string]interface{}, jsonRule string, selects ...map[string]interface{}) (map[string]interface{}, *gvalid.Error) + func FilterMap(src map[string]interface{}, rules map[string]string, ...) (map[string]interface{}, *gvalid.Error) + func FilterOnly(src map[string]interface{}, rules []string, selects ...map[string]interface{}) (map[string]interface{}, *gvalid.Error) + func FilterStruct(src map[string]interface{}, rules interface{}, ...) (map[string]interface{}, *gvalid.Error) + func FilterStructOnly(src map[string]interface{}, rules interface{}, ...) (map[string]interface{}, *gvalid.Error) + type DefValueFunc func(params ...interface{}) interface + type FieldDataType string + type FieldName string + type FilterTag struct + func GetFilterFromArray(arr []string, selects ...map[string]interface{}) []*FilterTag + func GetFilterFromJson(js string, selects ...map[string]interface{}) []*FilterTag + func GetFilterFromMap(mp map[string]string, selects ...map[string]interface{}) []*FilterTag + func GetFilterFromStruct(obj interface{}, selects ...map[string]interface{}) []*FilterTag + func NewTag(structTag ...string) *FilterTag + func (f *FilterTag) FromJson(v map[string]interface{}) + func (f *FilterTag) GetDataType() FieldDataType + func (f *FilterTag) GetDefValue() interface{} + func (f *FilterTag) GetFieldName() FieldName + func (f *FilterTag) GetFormatter() string + func (f *FilterTag) GetParamName() string + func (f *FilterTag) GetRules() string + func (f *FilterTag) GetValidMsg() string + func (f *FilterTag) Parse(structTag string) + func (f *FilterTag) SetDataType(dataType FieldDataType) + func (f *FilterTag) SetDefValue(v interface{}) + func (f *FilterTag) SetFieldName(fieldName FieldName) + func (f *FilterTag) SetFormatter(formatter string) + func (f *FilterTag) SetParamName(paramName string) + func (f *FilterTag) SetRules(rules string) + func (f *FilterTag) SetValidMsg(msg string) + func (f *FilterTag) String() string + func (f *FilterTag) ToJson() string + func (f *FilterTag) ToMap() map[string]interface{} + func (f *FilterTag) ToRuleTag() string + type IFuncManager interface + Call func(fnName string, params ...interface{}) (interface{}, error) + Format func(fnName string, params ...interface{}) (interface{}, error) + HasFormatter func(fnName string) bool + HasFunc func(fnName string) bool + Register func(name string, fn DefValueFunc) bool + RegisterFormat func(name string, fn DefValueFunc) bool + Unregister func(fnName string) bool + UnregisterFormat func(name string) bool + func FuncManager(name ...string) IFuncManager