public

package
v0.0.0-...-7ff4c9c Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidatorKey  = "ValidatorKey"
	TranslatorKey = "TranslatorKey"
)

Variables

This section is empty.

Functions

func ComLogNotice

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

普通日志

func ContextWarning

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

错误日志

func DefaultGetValidParams

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

func GenSaltPassword

func GenSaltPassword(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 InStringSlice

func InStringSlice(slice []string, str string) bool

func MD5

func MD5(s string) string

MD5 md5加密

func Obj2Json

func Obj2Json(s 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