Documentation ¶
Index ¶
- func CreateResetPasswordSession(c *gin.Context)
- func CreateVerifySession(c *gin.Context)
- func GetInfo(c *gin.Context)
- func GetProfile(c *gin.Context)
- func GetSetting(c *gin.Context)
- func GetSettingNotification(c *gin.Context)
- func PatchInfo(c *gin.Context)
- func PatchProfile(c *gin.Context)
- func PatchSetting(c *gin.Context)
- func PutSettingNotification(c *gin.Context)
- func ResetPassword(c *gin.Context)
- func SignIn(c *gin.Context)
- func SignOut(c *gin.Context)
- func SignUp(c *gin.Context)
- func VerifyWithEmail(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResetPasswordSession ¶
@Summary 啟動重設密碼階段 (忘記密碼時) @Description 發送可以重設密碼的連結到指定 email 中 @Tags accounts @Accept json @Produce json @Param email body string true "Account Email" @Param path body string true "Front End Reset Password URL's Path" @Success 200 {object} controllers.JSONResponse @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/info/password/reset [post]
func CreateVerifySession ¶
@Summary 啟動驗證階段 @Description 發送 Email 認證信 @Tags accounts @Accept json @Produce json @Security ApiKeyAuth @Param accountUUID path string true "Account UUID" @Param email body string true "Account Email" @Param type body string true "Verification type (Email)" @Param redirectPath body string true "驗證連結點擊後導轉終點" @Success 200 {object} controllers.JSONResponse @Failure 400 {object} controllers.JSONResponse @Failure 401 {object} controllers.JSONResponse @Failure 403 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/{accountUUID}/info/verification [post]
func GetInfo ¶
@Summary 取得 Account 資訊 @Description 取得 Account 相關資訊 (UUID, Email) @Tags accounts @Accept json @Produce json @Param accountUUID path string true "Account UUID" @Success 200 {object} controllers.JSONResponse{Data=getInfoResponsePayload} @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/info [get]
func GetProfile ¶
@Summary 取得 Account Profile @Description 取得 Account Profile (大頭貼、個人簽名檔、社群資訊、banner) @Tags accounts @Accept json @Produce json @Param accountUUID path string true "Account UUID" @Success 200 {object} controllers.JSONResponse{Data=getProfileResponsePayload} @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/profile [get]
func GetSetting ¶
@Summary 取得 Account 設定 @Description 取得 Account 相關設定 (暱稱、地區、第三方登入綁定資訊) @Tags accounts @Accept json @Produce json @Param accountUUID path string true "Account UUID" @Success 200 {object} controllers.JSONResponse{Data=getSettingResponsePayload} @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/setting [get]
func GetSettingNotification ¶
@Summary 取得 Account 通知設定 @Description 取得 Account 相關通知設定 @Tags accounts @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} controllers.JSONResponse{Data=getSettingNotificationResponsePayload} @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/setting/notification [get]
func PatchInfo ¶
@Summary 更新 Account 資訊 @Description 更新 Account 相關資訊 (UUID, Email) @Tags accounts @Accept json @Produce json @Security ApiKeyAuth @Param email body string false "Account Email" @Param password body string false "Account Password" @Param originalPassword body string false "Account Original Passsword" @Success 200 {object} controllers.JSONResponse @Failure 400 {object} controllers.JSONResponse @Failure 409 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/info [patch]
func PatchProfile ¶
@Summary 更新 Account Profile @Description 更新 Account Profile (大頭貼、個人簽名檔、社群資訊、banner) @Tags accounts @Accept json @Produce json @Security ApiKeyAuth @Param avatar body string false "大頭貼" @Param banner body string false "banner" @Param signature body string false "個人簽名檔" @Param socailMedias body socialMediasResponsePayload false "社群資訊" @Success 200 {object} controllers.JSONResponse @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/profile [patch]
func PatchSetting ¶
@Summary 更新 Account 設定 @Description 更新 Account 相關設定 (暱稱、地區) @Tags accounts @Accept json @Produce json @Security ApiKeyAuth @Param name body string false "暱稱" @Param locale body string false "地區" @Success 200 {object} controllers.JSONResponse{Data=patchSettingResponsePayload} @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/setting [patch]
func PutSettingNotification ¶
@Summary 更新 Account 通知設定 @Description 更新 Account 相關通知設定 @Tags accounts @Accept json @Produce json @Security ApiKeyAuth @Param followOrOwnArticleReply body uint true "我追蹤的/我的文章有新留言 (0: 關閉, 1: 所有留言, 2: 標註我的留言)" @Param commentTagged body string true "我的留言被標注 (!!! 該值為 boolean !!!)" @Param articleTweet body string true "我的文章獲得心情 (!!! 該值為 boolean !!!)" @Param commentTweet body string true "我的留言獲得愛心 (!!! 該值為 boolean !!!)" @Param interestRecommendation body string true "我可能感興趣的內容 (!!! 該值為 boolean !!!)" @Param chat body string true "聊天通知 (!!! 該值為 boolean !!!)" @Param followed body string true "被人追蹤時 (!!! 該值為 boolean !!!)" @Success 200 {object} controllers.JSONResponse @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/:accountUUID/setting/notification [put]
func ResetPassword ¶
@Summary 強制重設密碼 (忘記密碼時) @Description 強制重新設定密碼藉由 Token, Code 相關驗證資訊 @Tags accounts @Accept json @Produce json @Param email body string true "Account Email" @Param password body string true "Account New Password" @Param token body string true "Token" @Param code body string true "Verify Code" @Param captchaUuid body string true "Captcha Info" @Param captchaCode body string true "Captcha Info" @Success 200 {object} controllers.JSONResponse @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/info/password/reset [patch]
func SignIn ¶
@Summary 登入帳號 @Description 使用 Email, Password, Captcha Info 等資訊來登入 @Tags accounts @Accept json @Produce json @Param email body string true "Account Email" @Param password body string true "Account Password" @Param captchaUuid body string true "Captcha Info" @Param captchaCode body string true "Captcha Info" @Success 200 {object} controllers.JSONResponse @Header 200 {string} Cookie "Refresh Token" @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/signin [post]
func SignOut ¶
@Summary 登出帳號 @Description 登出帳號收回和刪除 refresh token @Tags accounts @Accept json @Produce json @Security ApiKeyAuth @Header 200 {string} Cookie "Refresh Token Clear" @Success 200 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/signout [get]
func SignUp ¶
@Summary 註冊帳號 @Description 使用 Email, Password, Captcha Info 等資訊來註冊 @Tags accounts @Accept json @Produce json @Param email body string true "Account Email" @Param password body string true "Account Password" @Param captchaUuid body string true "Captcha Info" @Param captchaCode body string true "Captcha Info" @Success 200 {object} controllers.JSONResponse @Failure 400 {object} controllers.JSONResponse @Failure 409 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/signup [post]
func VerifyWithEmail ¶
@Summary Email 認證信中的認證連結 @Description 進行 Email 的認證 @Tags accounts @Accept json @Produce json @Param accountUUID path string true "Account UUID" @Param token query string true "Session Token" @Param code query string true "Verify Code" @Param redirectPath query string true "驗證成功後的導轉路徑" @Success 302 @Failure 400 {object} controllers.JSONResponse @Failure 500 {object} controllers.JSONResponse @Router /account/{accountUUID}/info/verification/email [get]
Types ¶
This section is empty.