Documentation ¶
Index ¶
- func ApiErrHandler(err error) (int, interface{})
- func ApiErrorLog(name, msg string, v interface{})
- func ApiOKHandler(data interface{}) interface{}
- func CopyTo(source, dest interface{}, debug ...bool) (err error)
- func Duration(s, e time.Time) (time.Duration, error)
- func JsonTo(json string, dest interface{}) (err error)
- func JwtDecode(tokenString, secret string) (jwt.MapClaims, error)
- func JwtFromUid(secret string, expire, uid int64) (string, error)
- func Md5Sum(s string) string
- func RandString(n int64) string
- func Sec2MS(second int64, minuteTpl string, secondTpl string) (t string)
- func ToStr(dest interface{}) string
- func UidFromJwt(ctx context.Context) int64
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiErrHandler ¶
func ApiErrorLog ¶
func ApiErrorLog(name, msg string, v interface{})
ApiErrorLog 打印名为 name 的 API 产生的错误。
func ApiOKHandler ¶
func ApiOKHandler(data interface{}) interface{}
func RandString ¶
func UidFromJwt ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.