Documentation ¶
Index ¶
- Constants
- func ComLogNotice(c *gin.Context, tag string, m map[string]interface{})
- func ContextWarning(c context.Context, tag string, m map[string]interface{})
- func DefaultGetValidParams(c *gin.Context, params interface{}) error
- func GenSaltPassword(salt, password string) string
- func GetGinTraceContext(c *gin.Context) *lib.TraceContext
- func GetTraceContext(c context.Context) *lib.TraceContext
- func GetTranslation(c *gin.Context) (ut.Translator, error)
- func GetValidator(c *gin.Context) (*validator.Validate, error)
- func InStringSlice(slice []string, str string) bool
- func MD5(s string) string
- func Obj2Json(s interface{}) string
Constants ¶
View Source
const ( ValidatorKey = "ValidatorKey" TranslatorKey = "TranslatorKey" )
Variables ¶
This section is empty.
Functions ¶
func ContextWarning ¶
错误日志
func DefaultGetValidParams ¶
func GenSaltPassword ¶
func GetGinTraceContext ¶
func GetGinTraceContext(c *gin.Context) *lib.TraceContext
从gin的Context中获取数据
func GetTranslation ¶
func GetTranslation(c *gin.Context) (ut.Translator, error)
func GetValidator ¶
func InStringSlice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.