Documentation ¶
Index ¶
- Constants
- func CastValue(value interface{}, dataType string) interface{}
- func Copy(src interface{}) interface{}
- func CopyMap(src map[string]interface{}) map[string]interface{}
- func CopyRecursive(src, dst reflect.Value)
- func CopyRecursivePtr(src, dst reflect.Value)
- func CopyWithPtr(src interface{}) interface{}
- func CreateDirs(path string) error
- func CurrentDateFormat(timeLayout string) string
- func CurrentDateTime() string
- func FileName(filePath string) string
- func GetAppKey(key string) string
- func GetDataValueMapIter(name string, data interface{}) *reflect.MapIter
- func GetDataValueStr(name string, data interface{}) string
- func GetFieldValueList(fields []string, params map[string]interface{}) []string
- func GetJSONData(value interface{}) string
- func GetMapKeys(data map[string]interface{}) []string
- func GetMapValues(data map[string]interface{}) []interface{}
- func GetRenderVarName(name string) string
- func GetSafeData(name string, data map[string]interface{}) interface{}
- func GetServiceParam(serviceParam map[string]interface{}, params map[string]interface{}, ...) map[string]interface{}
- func IsArray(value any) bool
- func IsEmpty(name string, data map[string]interface{}) bool
- func IsMap(name string, data interface{}) bool
- func IsMultipleField(field string) bool
- func IsPathExist(path string) bool
- func IsRenderVar(name string) bool
- func IsValueEmpty(value any) bool
- func LoadAppProperties(path string)
- func MultiplyJoin(content string, times int, sep string) string
- func MultiplyJoinComma(content string, times int) string
- func ParentDirName(filePath string) string
- func ParseValueByField(field reflect.Value, value interface{}) interface{}
- func ReadFileBytes(filePath string) ([]byte, bool)
- func ReadFileContent(filePath string) (string, bool)
- func RenderTpl(Tpl *text_template.Template, params map[string]interface{}) string
- func RenderTplBool(Tpl *text_template.Template, params map[string]interface{}) bool
- func RenderTplData(Tpl *text_template.Template, params map[string]interface{}) interface{}
- func RenderTplDataBool(Tpl *text_template.Template, params map[string]interface{}) bool
- func RenderTplDataWithType(Tpl *text_template.Template, params map[string]interface{}, dataType string) interface{}
- func RenderTplExec(Tpl *text_template.Template, params map[string]interface{}, exec bool) interface{}
- func RenderVar(name string, params map[string]interface{}) interface{}
- func RenderVarOrValue(name interface{}, params map[string]interface{}) interface{}
- func RenderVarToArrMap(name string, params map[string]interface{}) ([]map[string]interface{}, string)
- func RenderVarToMap(name string, params map[string]interface{}) (map[string]interface{}, string)
- func SetDataValue(name string, value interface{}, data interface{}) interface{}
- func SetDataValueByParams(params map[string]interface{}, data interface{}, ignoreFields []string, ...) (map[string]interface{}, []string)
- func StringArrayContain(list []string, value string) bool
- func Strval(value interface{}) string
- func Throw(up Exception)
- func ToInt32(value interface{}) int32
- func ToSchemaName(name string) string
- func ToSqlNullTime(value interface{}) sql.NullTime
- func ToTime(value interface{}) time.Time
- type Block
- type Exception
- type Interface
- type Properties
Constants ¶
View Source
const ItemName = "item"
Item name的名称
View Source
const RightName = "right"
Variables ¶
This section is empty.
Functions ¶
func CopyRecursive ¶
func CopyRecursivePtr ¶
func CreateDirs ¶
func CurrentDateFormat ¶
func CurrentDateTime ¶
func CurrentDateTime() string
func GetDataValueMapIter ¶
func GetDataValueStr ¶
* * 根据字符串,获取结构体里面字段值
func GetFieldValueList ¶
func GetJSONData ¶
func GetJSONData(value interface{}) string
func GetMapKeys ¶
func GetMapValues ¶
func GetMapValues(data map[string]interface{}) []interface{}
func GetRenderVarName ¶
func GetSafeData ¶
* * 判断对象里面值是否为空 *
func GetServiceParam ¶
func IsMultipleField ¶
func IsPathExist ¶
func IsRenderVar ¶
func LoadAppProperties ¶
func LoadAppProperties(path string)
func MultiplyJoin ¶
* * 将字符串先乘以几次,然后以sep转成一个字符串 *
func MultiplyJoinComma ¶
* * 将字符串先乘以几次,然后以逗号拼接转成一个字符串 *
func ParentDirName ¶
func ParseValueByField ¶
ParseValueByField 根据model 里面的字段类型,转值
func RenderTpl ¶
func RenderTpl(Tpl *text_template.Template, params map[string]interface{}) string
RenderTpl 根据模板渲染数据
func RenderTplBool ¶
func RenderTplBool(Tpl *text_template.Template, params map[string]interface{}) bool
func RenderTplData ¶
func RenderTplData(Tpl *text_template.Template, params map[string]interface{}) interface{}
RenderTplData 根据模板渲染数据,优选取参数里面的字段
func RenderTplDataBool ¶
func RenderTplDataBool(Tpl *text_template.Template, params map[string]interface{}) bool
func RenderTplDataWithType ¶
func RenderTplDataWithType(Tpl *text_template.Template, params map[string]interface{}, dataType string) interface{}
RenderTplDataWithType 执行结果转类型
func RenderTplExec ¶
func RenderTplExec(Tpl *text_template.Template, params map[string]interface{}, exec bool) interface{}
- @param exec 是计算,是否执行运算结果
- 比如计算分页 start: template: " ({{.page}}-1) * {{.size}}" exec: true type: int
func RenderVarOrValue ¶
func RenderVarOrValue(name interface{}, params map[string]interface{}) interface{}
取参数变量、或者取值
func RenderVarToArrMap ¶
func RenderVarToMap ¶
func SetDataValue ¶
func SetDataValue(name string, value interface{}, data interface{}) interface{}
* @name 字段名称 * @value 值 * @data 目标对象,可以是指针地址,也可以是目标对象 *
func SetDataValueByParams ¶
func StringArrayContain ¶
func Strval ¶
func Strval(value interface{}) string
Strval 获取变量的字符串值 浮点型 3.0将会转换成字符串3, "3" 非数值或字符类型的变量将会被转换成JSON格式字符串
func ToSchemaName ¶
func ToSqlNullTime ¶
Types ¶
type Properties ¶
Click to show internal directories.
Click to hide internal directories.