Documentation ¶
Index ¶
- func EncodeMD5(value string) string
- func FormJson(jsonStr string, obj interface{}) error
- func GenerateToken(username, password string) (string, error)
- func ParseToken(token string) (interface{}, error)
- func RandomString(n int, alphabets ...byte) string
- func Setup()
- func ShowError(where string, err error)
- func ToJson(obj interface{}) (string, error)
- func TransToCharacter(s string) string
- type CustomClaims
- type JSONTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
GenerateToken generate tokens used for auth
Types ¶
type CustomClaims ¶
type CustomClaims struct { Username string `json:"username"` jwt.StandardClaims }
type JSONTime ¶
JSONTime format json time field by myself
func (JSONTime) MarshalJSON ¶
MarshalJSON on JSONTime format Time field with %Y-%m-%d %H:%M:%S
Click to show internal directories.
Click to hide internal directories.