Documentation ¶
Overview ¶
* @Author: lihuan * @Date: 2021-12-04 22:14:15 * @LastEditors: lihuan * @LastEditTime: 2021-12-05 13:42:41 * @Email: 17719495105@163.com
* @Author: lihuan * @Date: 2021-10-09 10:08:01 * @LastEditTime: 2021-10-13 10:56:46 * @Email: 17719495105@163.com
Index ¶
- Constants
- func ErrorReponse(ctx *gin.Context, r interface{})
- func ErrorTranslate(e validator.ValidationErrors) string
- func GenerateToken(id int, username, secret_password string, secret []byte, exp int) (string, error)
- func GetMsg(code int) string
- func SuccessResponse(ctx *gin.Context, data interface{})
- func Validator()
- type Application
- type Claims
- type Conf
- type Md5
- type Token
Constants ¶
View Source
const ( Success = 2000 ParamsParseError = 2001 RpcError = 2002 InvalidToken = 2003 TokenTimeout = 2004 TokenParse = 2005 )
Variables ¶
This section is empty.
Functions ¶
func ErrorReponse ¶
func ErrorTranslate ¶
func ErrorTranslate(e validator.ValidationErrors) string
func GenerateToken ¶
func SuccessResponse ¶
Types ¶
type Application ¶
type Claims ¶
type Conf ¶
type Conf struct { Application Application Token Token Md5 Md5 }
Click to show internal directories.
Click to hide internal directories.