Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminRequired ¶
func AdminRequired() gin.HandlerFunc
AdminRequired funcion check user login or not
func Init ¶
func Init() error
Init function initialize and return gin engine @title gocomic api @version 1.0 @description This is a comic server. termsOfService https://github.com/fancxxy/gocomic/backend @licenese.name MIT @licenese.url https://github.com/fancxxy/gocomic/blob/master/LICENSE @host 127.0.0.1:8080
Types ¶
type Login ¶
type Login struct { Email string `json:"email" binding:"required"` Password string `json:"password" binding:"required"` }
Login contains login information
type Register ¶
type Register struct { Username string `json:"username" binding:"required"` Email string `json:"email" binding:"required"` Password string `json:"password" binding:"required"` }
Register contains register information
type Response ¶
type Response struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
Response struct
type Subscribe ¶
type Subscribe struct { Website string `json:"website" binding:"required"` Comic string `json:"comic" binding:"required"` }
Subscribe contains login information
type Unsubscribe ¶
type Unsubscribe struct {
ID int `json:"id" binding:"required"`
}
Unsubscribe contains login information
Click to show internal directories.
Click to hide internal directories.