Documentation ¶ Index ¶ Constants type Token func (t *Token) CreateToken(UserID string, userType int32) (string, time.Duration, error) func (t *Token) GetToken(token string) (string, int32, error) Constants ¶ View Source const ( TokenUser = constant.NormalUser TokenAdmin = constant.AdminUser ) Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Token ¶ type Token struct { Expires time.Duration Secret string } func (*Token) CreateToken ¶ func (t *Token) CreateToken(UserID string, userType int32) (string, time.Duration, error) func (*Token) GetToken ¶ func (t *Token) GetToken(token string) (string, int32, error) Source Files ¶ View all Source files token_verify.go Click to show internal directories. Click to hide internal directories.