Documentation ¶
Index ¶
- Variables
- type AuthController
- func (a *AuthController) Login(req *requests.LoginRequest, user *models.User) (services.Response, error)
- func (a *AuthController) LoginForm() (string, app.Data)
- func (a *AuthController) Logout(c *gin.Context) (services.Response, error)
- func (a *AuthController) Me() (services.Response, error)
- func (a *AuthController) Register(req *requests.RegisterRequest, user *models.User) (services.Response, error)
- func (a *AuthController) RegisterForm() (string, app.Data)
- type ExcpController
- type HomeController
Constants ¶
This section is empty.
Variables ¶
View Source
var Auth = new(AuthController)
View Source
var Excp = new(ExcpController)
View Source
var Home = new(HomeController)
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
type AuthController struct {
app.Controller
}
func (*AuthController) Login ¶
func (a *AuthController) Login(req *requests.LoginRequest, user *models.User) (services.Response, error)
Login 执行登录
func (*AuthController) LoginForm ¶
func (a *AuthController) LoginForm() (string, app.Data)
LoginForm 登录页面
func (*AuthController) Register ¶
func (a *AuthController) Register(req *requests.RegisterRequest, user *models.User) (services.Response, error)
Register 执行注册
func (*AuthController) RegisterForm ¶
func (a *AuthController) RegisterForm() (string, app.Data)
RegisterForm 注册页面
type ExcpController ¶
type ExcpController struct {
app.Controller
}
func (*ExcpController) BadRequest ¶
func (e *ExcpController) BadRequest(req *requests.ExcpRequest) services.Response
BadRequest 异常请求
func (*ExcpController) NotFound ¶
func (e *ExcpController) NotFound(req *requests.ExcpRequest) services.Response
NotFound 404 未找到资源
type HomeController ¶
type HomeController struct {
app.Controller
}
Click to show internal directories.
Click to hide internal directories.