Documentation ¶
Index ¶
- Variables
- func AvatarExists(id uint32) bool
- func AvatarName(id uint32) string
- func Route(router *gin.Engine, token *config.Token)
- type Avatar
- type Claims
- type RouterHandler
- type RouterManager
- type User
- func (user *User) AvatarName() string
- func (user *User) AvatarPath() string
- func (user *User) Delete(context *gin.Context)
- func (user *User) Refresh(context *gin.Context, token *config.Token) string
- func (user *User) RefreshWithToken(context *gin.Context, token string)
- func (user *User) ToJson() map[string]string
- func (user *User) ToToken(token *config.Token) (string, error)
- func (user *User) Valid(*jwt.ValidationHelper) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AvatarMap map[uint32]string
View Source
var AvatarValues = []Avatar{
{0x1f43b, "bear"},
{0x1f417, "boar"},
{0x1f431, "cat"},
{0x1f414, "chicken"},
{0x1f42e, "cow"},
{0x1f98c, "deer"},
{0x1f436, "dog"},
{0x1f432, "dragon"},
{0x1f985, "eagle"},
{0x1f98a, "fox"},
{0x1f438, "frog"},
{0x1f992, "giraffe"},
{0x1f98d, "gorilla"},
{0x1f439, "hamster"},
{0x1f434, "horse"},
{0x1f428, "koala"},
{0x1f981, "lion"},
{0x1f435, "monkey"},
{0x1f42d, "mouse"},
{0x1f43c, "panda"},
{0x1f437, "pig"},
{0x1f4a9, "poop"},
{0x1f430, "rabbit"},
{0x1f99d, "raccoon"},
{0x1f98f, "rhinoceros"},
{0x1f42f, "tiger"},
{0x1f984, "unicorn"},
{0x1f43a, "wolf"},
{0x1f993, "zebra"},
}
Functions ¶
func AvatarExists ¶
func AvatarName ¶
Types ¶
type RouterHandler ¶
type RouterHandler struct {
// contains filtered or unexported fields
}
type RouterManager ¶
type RouterManager struct {
// contains filtered or unexported fields
}
type User ¶
type User struct { Id uuid.UUID `json:"id"` Name string `json:"name"` Avatar uint32 `json:"avatar"` }
func NewUserFromCookie ¶
func NewUserFromToken ¶
func (*User) AvatarName ¶
func (*User) AvatarPath ¶
func (*User) RefreshWithToken ¶
Click to show internal directories.
Click to hide internal directories.