Documentation
¶
Index ¶
- func CheckOIDCInit() gin.HandlerFunc
- func DeleteUser(c *gin.Context)
- func DeleteUserAll(c *gin.Context)
- func DeleteUserCustomConf(c *gin.Context)
- func DeleteUserImage(c *gin.Context)
- func ExternalAPIMiddleware(c *gin.Context)
- func GetOIDCSettings(c *gin.Context)
- func GetUserAllUsername(c *gin.Context)
- func GetUserAvatar(c *gin.Context)
- func GetUserCustomConf(c *gin.Context)
- func GetUserImage(c *gin.Context)
- func GetUserInfo(c *gin.Context)
- func GetUserInfoByUsername(c *gin.Context)
- func GetUserStatus(c *gin.Context)
- func InitOIDC()
- func OIDC() error
- func OIDCCallback(c *gin.Context)
- func OIDCHealthCheck(c *gin.Context)
- func OIDCLogin(c *gin.Context)
- func OIDCLogout(c *gin.Context)
- func OIDCProfile(c *gin.Context)
- func OIDCUserInfo(c *gin.Context)
- func OIDCValidateToken(c *gin.Context)
- func OnePanelCreateWebsite(c *gin.Context)
- func OnePanelDeleteWebsite(c *gin.Context)
- func OnePanelHealthCheck(c *gin.Context)
- func OnePanelLogin(c *gin.Context) error
- func OnePanelUpdateProxyWebsite(c *gin.Context)
- func PostLogout(c *gin.Context)
- func PostOMVLogin(c *gin.Context)
- func PostUserCustomConf(c *gin.Context)
- func PostUserLogin(c *gin.Context)
- func PostUserRefreshToken(c *gin.Context)
- func PostUserRegister(c *gin.Context)
- func PostUserUploadImage(c *gin.Context)
- func PutUserAvatar(c *gin.Context)
- func PutUserDesc(c *gin.Context)
- func PutUserImage(c *gin.Context)
- func PutUserInfo(c *gin.Context)
- func PutUserNick(c *gin.Context)
- func PutUserPassword(c *gin.Context)
- func SaveOIDCSettings(c *gin.Context)
- type OIDCSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckOIDCInit ¶
func CheckOIDCInit() gin.HandlerFunc
func DeleteUser ¶
*
- @description:
- @param {path} id string "user id"
- @method:DELETE
- @router:/user/delete/:id
func DeleteUserAll ¶
func DeleteUserCustomConf ¶
*
- @description: delete user custom config
- @param {path} key string
- @method:delete
- @router:/user/custom/:key
func DeleteUserImage ¶
func ExternalAPIMiddleware ¶
TODO Cant call login every request(using for testing only)
func GetOIDCSettings ¶
func GetUserAvatar ¶
@Summary get user head @Produce application/json @Tags user @Param file formData file true "用户头像" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /users/avatar [get]
func GetUserCustomConf ¶
*
- @description:get custom file by user
- @param {path} name string "file name"
- @method: GET
- @router: /user/custom/:key
func GetUserInfo ¶
@Summary get user info @Produce application/json @Accept application/json @Tags user @Success 200 {string} string "ok" @Router /user/info/:id [get]
func GetUserInfoByUsername ¶
*
- @description:
- @param {*gin.Context} c
- @param {string} Username
- @return {*}
- @method:
- @router:
func GetUserStatus ¶
func OIDCCallback ¶
func OIDCHealthCheck ¶
func OIDCLogout ¶
func OIDCProfile ¶
func OIDCUserInfo ¶
func OIDCValidateToken ¶
func OnePanelCreateWebsite ¶
func OnePanelDeleteWebsite ¶
func OnePanelHealthCheck ¶
func OnePanelLogin ¶
func OnePanelUpdateProxyWebsite ¶
response, cookies, err := service.MyService.OnePanel().Login(cred, onePanelServer)
if err != nil {
c.JSON(common_err.SERVICE_ERROR,
model.Result{
Success: common_err.SERVICE_ERROR,
Message: common_err.GetMsg(common_err.SERVICE_ERROR),
})
}
session := sessions.Default(c)
for _, cookie := range cookies {
session.Set(cookie.Name, cookie.Value)
c.SetCookie(cookie.Name, cookie.Value, 3600, "/", "", false, true)
}
session.Save()
c.JSON(common_err.SUCCESS,
model.Result{
Success: common_err.SUCCESS,
Message: common_err.GetMsg(common_err.SUCCESS),
Data: response,
})
}
func PostLogout ¶
func PostOMVLogin ¶
@Summary login user to openmediavault @Produce application/json @Tags user @Param username password @Security SessionID @Success 200 {string} string "ok" @Router /users/omvLogin [post]
func PostUserCustomConf ¶
*
- @description:create or update custom conf by user
- @param {path} name string "file name"
- @method:POST
- @router:/user/custom/:key
func PostUserLogin ¶
func PostUserRefreshToken ¶
*
- @description:
- @param {*gin.Context} c
- @param {string} refresh_token
- @return {*}
- @method:
- @router:
func PostUserRegister ¶
@Summary register user @Router /user/register/ [post]
func PostUserUploadImage ¶
* * @description: * @param {*gin.Context} c * @param {file} file * @param {string} key * @param {string} type:avatar,background * @return {*} * @method: * @router:
func PutUserAvatar ¶
@Summary edit user head @Produce application/json @Accept multipart/form-data @Tags user @Param file formData file true "用户头像" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /users/avatar [put]
func PutUserDesc ¶
@Summary edit user description @Produce application/json @Accept multipart/form-data @Tags user @Param description formData string false "Description" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/desc [put]
func PutUserInfo ¶
@Summary edit user name @Produce application/json @Accept application/json @Tags user @Param old_name query string true "Old user name" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/name/:id [put]
func PutUserNick ¶
@Summary edit user nick @Produce application/json @Accept application/json @Tags user @Param nick_name query string false "nick name" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/nick [put]
func PutUserPassword ¶
@Summary edit user password @Produce application/json @Accept application/json @Tags user @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/password/:id [put]