Documentation ¶
Index ¶
- Variables
- func Create(db *gorm.DB, cachemanage *cachemanage.Manage, needlogin bool) *gin.Engine
- type Api
- func (a *Api) AuthRequired(c *gin.Context)
- func (a *Api) Authorized(c *gin.Context)
- func (api *Api) Close()
- func (a *Api) Order(c *gin.Context)
- func (a *Api) OrderList(c *gin.Context)
- func (a *Api) RePass(c *gin.Context)
- func (a *Api) SignIn(c *gin.Context)
- func (a *Api) SignUp(c *gin.Context)
- func (a *Api) Takeout(c *gin.Context)
- func (a *Api) UnAuthorized(c *gin.Context)
- type ReqDataOrder
- type ReqDataOrderList
- type ReqDataRePass
- type ReqDataSignIn
- type ReqDataSignUp
- type ReqDataTakeOut
- type RespDataOrderList
- type RespDataTakeout
- type TakeOutItem
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestBind = []func(*Api, *gin.Engine){}
Functions ¶
Types ¶
type Api ¶
type Api struct { DB *gorm.DB Cache *cachemanage.Manage NeedLogin bool }
func (*Api) AuthRequired ¶
func (a *Api) AuthRequired(c *gin.Context)
func (*Api) Authorized ¶
func (a *Api) Authorized(c *gin.Context)
func (*Api) UnAuthorized ¶
func (a *Api) UnAuthorized(c *gin.Context)
type ReqDataOrder ¶
type ReqDataOrder struct {
OrderId uint `json:"order_id" binding:"required"`
}
type ReqDataOrderList ¶
type ReqDataRePass ¶
type ReqDataRePass struct { Name string `json:"name" form:"name" binding:"required"` Pass string `json:"password" form:"password" binding:"required"` NewPass string `json:"new_password" form:"new_password" binding:"required"` NewPassConfirm string `json:"new_password_confirmation" form:"new_password_confirmation" binding:"required"` }
type ReqDataSignIn ¶
type ReqDataSignUp ¶
type ReqDataTakeOut ¶
type ReqDataTakeOut struct { AuthUser string `json:"authuser" binding:"required"` Address string `json:"address" binding:"required"` Tag string `json:"tag"` Items []TakeOutItem `json:"items"` }
type RespDataOrderList ¶
type RespDataTakeout ¶
type RespDataTakeout struct {
OrderId uint `json:"order_id" binding:"required"`
}
type TakeOutItem ¶
Click to show internal directories.
Click to hide internal directories.