Documentation ¶
Index ¶
- Constants
- Variables
- func AdminAuthed(c *gin.Context) bool
- func AdminUid(c *gin.Context) int
- func DefaultContextUser(c *gin.Context) mysql.User
- func DefaultSessionUser(c *gin.Context) (mysql.User, bool)
- func LoginAPIRequired() gin.HandlerFunc
- func LoginRequired() gin.HandlerFunc
- func Logout(c *gin.Context) error
- func UpdateUser(c *gin.Context, a mysql.User) error
- func ValidateGoods(c *gin.Context) (g common.Goods, err error)
- func ValidateGoodsByParam(gp common.Goods) (g common.Goods, err error)
- func WechatAccessLogin() gin.HandlerFunc
- func WechatAccessMustLogin() gin.HandlerFunc
- func WechatMaybeUid(c *gin.Context) (uid int, flag bool)
- func WechatUid(c *gin.Context) int
- func WechatUserName(c *gin.Context) (username string)
Constants ¶
View Source
const ContextUser = "mdw/member"
View Source
const SessionDefaultKey = "i2eco/mdw/session"
Variables ¶
View Source
var DefaultWechatUid = "github.com/i2eco/egoshop/wechatuid"
View Source
var DefaultWechatUsername = "github.com/i2eco/egoshop/wechatUsername"
Functions ¶
func UpdateUser ¶
UpdateUser updates the User object stored in the session. This is useful incase a change is made to the user model that needs to persist across requests.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.