Documentation
¶
Index ¶
- func Authenticator() gin.HandlerFunc
- func ConnectDB(dataURL string) (err error)
- func ConnectSession(key string)
- func DBConnector() gin.HandlerFunc
- func GetDB(c *gin.Context) *mgo.Session
- func GetLogger(c *gin.Context) *logrus.Logger
- func GetToken(c *gin.Context) (*models.Token, error)
- func GetUserID(c *gin.Context) string
- func Logger() gin.HandlerFunc
- func Recoverer() gin.HandlerFunc
- func SetToken(c *gin.Context, token *models.Token) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authenticator ¶
func Authenticator() gin.HandlerFunc
func ConnectSession ¶
func ConnectSession(key string)
func DBConnector ¶
func DBConnector() gin.HandlerFunc
func Logger ¶
func Logger() gin.HandlerFunc
func Recoverer ¶
func Recoverer() gin.HandlerFunc
Recoverer catches the panic from the handler gracefully and logs the error with stack trace.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.