utils

package
v0.0.0-...-2ada7e8 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComLogNotice

func ComLogNotice(c *gin.Context, dltag string, m map[string]interface{})

普通日志

func ComLogWarning

func ComLogWarning(c *gin.Context, dltag string, m map[string]interface{})

错误日志

func ContextError

func ContextError(c context.Context, dltag string, m map[string]interface{})

错误日志

func ContextNotice

func ContextNotice(c context.Context, dltag string, m map[string]interface{})

普通日志

func ContextWarning

func ContextWarning(c context.Context, dltag string, m map[string]interface{})

错误日志

func DefaultGetValidParams

func DefaultGetValidParams(c *gin.Context, params interface{}) error

func GenSaltPwd

func GenSaltPwd(salt, password string) string

func GetGinTraceContext

func GetGinTraceContext(c *gin.Context) *lib.TraceContext

从gin的Context中获取数据

func GetTraceContext

func GetTraceContext(c context.Context) *lib.TraceContext

从Context中获取数据

func GetTranslation

func GetTranslation(c *gin.Context) (ut.Translator, error)

func GetValidator

func GetValidator(c *gin.Context) (*validator.Validate, error)

func MD5

func MD5(text string) (string, error)

func Obj2Json

func Obj2Json(obj interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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