Versions in this module Expand all Collapse all v1 v1.0.1 Feb 3, 2021 Changes in this version + func DeleteAllSession() v1.0.0 Jan 18, 2021 Changes in this version + const DefaultAge + const TopicSession + func DeleteSession(token string) + func DeleteSessionByUserId(userId string) + func GetRequestBody(c *gin.Context, body interface{}) error + func SessionMiddle() gin.HandlerFunc + func UpdateSession(token string) + type Controller interface + DELETE func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + DELETEWithSession func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + GET func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + GETWithSession func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + Group func() *gin.RouterGroup + HEAD func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + HEADWithSession func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + OPTIONS func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + OPTIONSWithSession func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + PATCH func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + PATCHWithSession func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + POST func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + POSTWithSession func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + PUT func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + PUTWithSession func(relativePath string, handler HandlerFunc, middle ...gin.HandlerFunc) + func New(prefix string) (Controller, error) + type HandlerFunc func(context *gin.Context, session *Session) (interface{}, error) + type Response struct + Data interface{} + Error string + Result bool + type Session struct + Context interface{} + Ip string + Token string + UserId string + Username string + func CreateSession(userId string, username string, ip string, context interface{}) (*Session, error) + func GetSession(token string) (*Session, error)