feat: add go backend API docs

Signed-off-by: Kininaru <shiftregister233@outlook.com>
This commit is contained in:
Kininaru
2021-03-29 23:40:25 +08:00
parent 5c49693bc0
commit 3a13b8e73c
27 changed files with 2578 additions and 7 deletions

View File

@ -53,6 +53,15 @@ func (c *ApiController) HandleLoggedIn(userId string, form *RequestForm) *Respon
return resp
}
// @Title GetApplicationLogin
// @Description get application login
// @Param clientId query string true "client id"
// @Param responseType query string true "response type"
// @Param redirectUri query string true "redirect uri"
// @Param scope query string true "scope"
// @Param state query string true "state"
// @Success 200 {object} controllers.api_controller.Response The Response object
// @router /update-application [get]
func (c *ApiController) GetApplicationLogin() {
var resp Response
@ -72,6 +81,12 @@ func (c *ApiController) GetApplicationLogin() {
c.ServeJSON()
}
// @Title Login
// @Description login
// @Param oAuthParams query string true "oAuth parameters"
// @Param body body RequestForm true "Login information"
// @Success 200 {object} controllers.api_controller.Response The Response object
// @router /login [post]
func (c *ApiController) Login() {
resp := &Response{Status: "null", Msg: ""}
var form RequestForm