Documentation ¶
Index ¶
- func CreateAdminToken() (string, error)
- func CreateToken(oid primitive.ObjectID, isLec bool) (string, error)
- func ParseAdminToken(authToken string, claims *AdminClaims) (*jwt.Token, error)
- func ParseToken(authToken string, claims *UserClaims) (*jwt.Token, error)
- func SendMail(toUser string, email string, subject string, content string) error
- type AdminClaims
- type Config
- type UserClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAdminToken ¶
func ParseAdminToken ¶
func ParseAdminToken(authToken string, claims *AdminClaims) (*jwt.Token, error)
func ParseToken ¶
func ParseToken(authToken string, claims *UserClaims) (*jwt.Token, error)
Types ¶
type AdminClaims ¶
type AdminClaims struct {
jwt.StandardClaims
}
type Config ¶
func LoadConfigFile ¶
type UserClaims ¶
Click to show internal directories.
Click to hide internal directories.