Documentation ¶
Overview ¶
* @Author: LinkLeong link@icewhale.com * @Date: 2021-09-30 18:18:14 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-15 14:30:05 * @FilePath: /CasaOS/route/v1/shortcuts.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2021-11-08 18:02:02 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-21 19:13:59 * @FilePath: /CasaOS/route/v1/sync.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
Index ¶
- func AppInfo(c *gin.Context)
- func AppList(c *gin.Context)
- func AppUsageList(c *gin.Context)
- func CategoryList(c *gin.Context)
- func ChangAppState(c *gin.Context)
- func ContainerInfo(c *gin.Context)
- func ContainerLog(c *gin.Context)
- func ContainerRelyInfo(c *gin.Context)
- func ContainerUpdateInfo(c *gin.Context)
- func DeleteDisk(c *gin.Context)
- func DeleteFile(c *gin.Context)
- func DeleteOperateFileOrDir(c *gin.Context)
- func DeletePersonDownloadFile(c *gin.Context)
- func DeletePersonFriend(c *gin.Context)
- func DeleteShortcutsDelete(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func DeleteUserCustomConf(c *gin.Context)
- func DeleteUserImage(c *gin.Context)
- func DirPath(c *gin.Context)
- func DockerTerminal(c *gin.Context)
- func FormatDiskType(c *gin.Context)
- func GetCasaOSErrorLogs(c *gin.Context)
- func GetCasaOSPort(c *gin.Context)
- func GetContainerState(c *gin.Context)
- func GetDiskCheck(c *gin.Context)
- func GetDiskInfo(c *gin.Context)
- func GetDiskList(c *gin.Context)
- func GetDockerInstallConfig(c *gin.Context)
- func GetDownloadFile(c *gin.Context)
- func GetDownloadSingleFile(c *gin.Context)
- func GetFileImage(c *gin.Context)
- func GetFileUpload(c *gin.Context)
- func GetFilerContent(c *gin.Context)
- func GetGuideCheck(c *gin.Context)
- func GetLocalFile(c *gin.Context)
- func GetPersonDetection(c *gin.Context)
- func GetPersonDirectory(c *gin.Context)
- func GetPersonDownDir(c *gin.Context)
- func GetPersonDownloadList(c *gin.Context)
- func GetPersonFile(c *gin.Context)
- func GetPersonFriend(c *gin.Context)
- func GetPersonImageThumbnail(c *gin.Context)
- func GetPersonPublic(c *gin.Context)
- func GetPersonReFile(c *gin.Context)
- func GetPersonShare(c *gin.Context)
- func GetPersonShareId(c *gin.Context)
- func GetPlugInDisks(c *gin.Context)
- func GetPort(c *gin.Context)
- func GetShortcutsList(c *gin.Context)
- func GetSyncConfig(c *gin.Context)
- func GetSystemCheckVersion(c *gin.Context)
- func GetSystemConfig(c *gin.Context)
- func GetSystemConfigDebug(c *gin.Context)
- func GetSystemCupInfo(c *gin.Context)
- func GetSystemDiskInfo(c *gin.Context)
- func GetSystemHardwareInfo(c *gin.Context)
- func GetSystemInitCheck(c *gin.Context)
- func GetSystemMemInfo(c *gin.Context)
- func GetSystemNetInfo(c *gin.Context)
- func GetSystemSocketPort(c *gin.Context)
- func GetSystemUSBAutoMount(c *gin.Context)
- func GetSystemUtilization(c *gin.Context)
- func GetUSBList(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 GetUserShareID(c *gin.Context)
- func GetWidgetConfig(c *gin.Context)
- func InstallApp(c *gin.Context)
- func MkdirAll(c *gin.Context)
- func MyAppList(c *gin.Context)
- func NotifyWS(c *gin.Context)
- func PortCheck(c *gin.Context)
- func PostAddPersonFriend(c *gin.Context)
- func PostCreateFile(c *gin.Context)
- func PostDiskAddPartition(c *gin.Context)
- func PostDiskFormat(c *gin.Context)
- func PostDiskUmount(c *gin.Context)
- func PostFileUpload(c *gin.Context)
- func PostKillCasaOS(c *gin.Context)
- func PostMountDisk(c *gin.Context)
- func PostOperateFileOrDir(c *gin.Context)
- func PostPersonDownDir(c *gin.Context)
- func PostPersonFile(c *gin.Context)
- func PostPersonShare(c *gin.Context)
- func PostSetSystemConfig(c *gin.Context)
- func PostSetWidgetConfig(c *gin.Context)
- func PostShortcutsAdd(c *gin.Context)
- func PostUserCustomConf(c *gin.Context)
- func PostUserFileImage(c *gin.Context)
- func PostUserLogin(c *gin.Context)
- func PostUserPersonInfo(c *gin.Context)
- func PostUserRegister(c *gin.Context)
- func PostUserUploadImage(c *gin.Context)
- func PutAppUpdate(c *gin.Context)
- func PutCasaOSPort(c *gin.Context)
- func PutFileContent(c *gin.Context)
- func PutNotifyRead(c *gin.Context)
- func PutPersonAgreeFriend(c *gin.Context)
- func PutPersonBlock(c *gin.Context)
- func PutPersonRemarks(c *gin.Context)
- func PutPersonWrite(c *gin.Context)
- func PutShortcutsEdit(c *gin.Context)
- func PutSystemUSBAutoMount(c *gin.Context)
- func PutUserAvatar(c *gin.Context)
- func PutUserDesc(c *gin.Context)
- func PutUserName(c *gin.Context)
- func PutUserNick(c *gin.Context)
- func PutUserPwd(c *gin.Context)
- func RemovePartition(c *gin.Context)
- func RenamePath(c *gin.Context)
- func Set_Name_Pwd(c *gin.Context)
- func ShareAppFile(c *gin.Context)
- func SpeedPush(c *gin.Context)
- func SystemUpdate(c *gin.Context)
- func UnInstallApp(c *gin.Context)
- func UpdateSetting(c *gin.Context)
- func WsSsh(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppInfo ¶
@Summary 应用详情 @Produce application/json @Accept application/json @Tags app @Param id path int true "id" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/appinfo/{id} [get]
func AppList ¶
@Summary 获取远程列表 @Produce application/json @Accept application/json @Tags app @Param index query int false "页码" @Param size query int false "每页数量" @Param category_id query int false "分类id" @Param type query string false "rank,new" @Param key query string false "search key" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/list [get]
func AppUsageList ¶ added in v0.2.3
@Summary my app hardware usage list @Produce application/json @Accept application/json @Tags app @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/usage [get]
func CategoryList ¶
@Summary 获取远程分类列表 @Produce application/json @Accept application/json @Tags app @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/category [get]
func ChangAppState ¶
@Summary 修改app状态 @Produce application/json @Accept multipart/form-data @Tags app @Param id path string true "appid" @Param state query string false "是否停止 start stop restart" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/state/{id} [put]
func ContainerInfo ¶
@Summary 获取容器详情 @Produce application/json @Accept application/json @Tags app @Param id path string true "appid" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/info/{id} [get]
func ContainerLog ¶
@Summary 查看容器日志 @Produce application/json @Accept application/json @Tags app @Param id path string true "appid" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/logs/{id} [get]
func ContainerRelyInfo ¶
@Summary 获取依赖数据 @Produce application/json @Accept application/json @Tags app @Param id path string true "rely id" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/rely/{id}/info [get]
func ContainerUpdateInfo ¶
@Summary 获取可更新数据 @Produce application/json @Accept application/json @Tags app @Param id path string true "appid" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/update/{id}/info [get]
func DeleteDisk ¶ added in v0.2.4
@Summary confirm delete disk @Produce application/json @Accept application/json @Tags disk @Security ApiKeyAuth @Param id path string true "id" @Success 200 {string} string "ok" @Router /disk/remove/{id} [delete]
func DeleteFile ¶ added in v0.2.9
@Summary delete file @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param body body string true "paths eg ["/a/b/c","/d/e/f"]" @Success 200 {string} string "ok" @Router /file/delete [delete]
func DeleteOperateFileOrDir ¶ added in v0.3.2
func DeletePersonDownloadFile ¶ added in v0.3.0
@Summary delete download file records @Produce application/json @Accept application/json @Tags person @Param uuid path string true "download uuid" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/file/{uuid} [delete]
func DeletePersonFriend ¶ added in v0.3.0
@Summary Delete my friend @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/user/{shareid} [delete]
func DeleteShortcutsDelete ¶
@Summary 删除shortcuts @Produce application/json @Accept application/json @Tags shortcuts @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /shortcuts/del/{id} [post]
func DeleteUser ¶ added in v0.3.3
*
- @description:
- @param {path} id string "user id"
- @method:DELETE
- @router:/user/delete/:id
func DeleteUserCustomConf ¶ added in v0.3.3
*
- @description: delete user custom config
- @param {path} key string
- @method:delete
- @router:/user/custom/:key
func DeleteUserImage ¶ added in v0.3.3
func DirPath ¶
@Summary 获取目录列表 @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param path query string false "路径" @Success 200 {string} string "ok" @Router /file/dirpath [get]
func FormatDiskType ¶
@Summary 获取支持的格式 @Produce application/json @Accept application/json @Tags disk @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /disk/type [get]
func GetCasaOSErrorLogs ¶
@Summary get logs @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/error/logs [get]
func GetCasaOSPort ¶ added in v0.2.3
@Summary get casaos server port @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/port [get]
func GetContainerState ¶
@Summary 获取容器状态 @Produce application/json @Accept application/json @Tags app @Param id path string true "容器id" @Param type query string false "type=1" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/state/{id} [get]
func GetDiskCheck ¶ added in v0.2.4
@Summary check mount point @Produce application/json @Accept application/json @Tags disk @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /disk/init [get]
func GetDiskInfo ¶
@Summary disk detail @Produce application/json @Accept application/json @Tags disk @Security ApiKeyAuth @Param path query string true "for example /dev/sda" @Success 200 {string} string "ok" @Router /disk/info [get]
func GetDiskList ¶ added in v0.2.6
@Summary disk list @Produce application/json @Accept application/json @Tags disk @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /disk/list [get]
func GetDockerInstallConfig ¶
@Summary 获取安装所需要的数据 @Produce application/json @Accept application/json @Tags app @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/install/config [get]
func GetDownloadFile ¶
@Summary download @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param t query string false "Compression format" Enums(zip,tar,targz) @Param files query string true "file list eg: filename1,filename2,filename3 " @Success 200 {string} string "ok" @Router /file/download [get]
func GetDownloadSingleFile ¶ added in v0.3.2
func GetFileImage ¶ added in v0.3.1
@Summary image thumbnail/original image @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param path query string true "path" @Param type query string false "original,thumbnail" Enums(original,thumbnail) @Success 200 {string} string "ok" @Router /file/image [get]
func GetFileUpload ¶ added in v0.2.10
@Summary upload file @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param path formData string false "file path" @Param file formData file true "file" @Success 200 {string} string "ok" @Router /file/upload [get]
func GetFilerContent ¶
@Summary 读取文件 @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param path query string true "路径" @Success 200 {string} string "ok" @Router /file/read [get]
func GetGuideCheck ¶
********************************************* Soon to be removed *********************************************** @Summary 检查是否进入引导状态 @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /guide/check [get]
func GetLocalFile ¶
func GetPersonDetection ¶ added in v0.3.1
@Summary network type detection @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/detection [get]
func GetPersonDirectory ¶ added in v0.3.0
@Summary Get a list of directories @Produce application/json @Accept application/json @Tags person @Param share_id query string true "Opponent share_id" @Param path query string true "dir path" @Security ApiKeyAuth @Success 200 {object} []model.Path @Router /person/directory [get]
func GetPersonDownDir ¶ added in v0.3.0
@Summary Get the download storage directory @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/down/dir [get]
func GetPersonDownloadList ¶ added in v0.3.0
@Summary Get file download list @Produce application/json @Accept application/json @Tags person @Param state query int false "wait:0,downloading:1,pause:2,finish:3,error:4,finished:5" Enums(0,1,2,3,4,5) @Security ApiKeyAuth @Success 200 {object} []model2.PersonDownloadDBModel @Router /person/list [get]
func GetPersonFile ¶ added in v0.3.0
@Summary download file @Produce application/json @Accept application/json @Tags person @Param share_id query string true "opponent share_id" @Param path query string true "file path" @Param file_name query string true "file name" @Param local_path query string true "local_path" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/file [get]
func GetPersonFriend ¶ added in v0.3.0
@Summary get my friend list @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {object} []model2.FriendModel @Router /person/users [get]
func GetPersonImageThumbnail ¶ added in v0.3.1
@Summary image thumbnail @Produce application/json @Accept application/json @Tags person @Param write formData bool true "write" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/image/thumbnail/{shareid} [get]
func GetPersonPublic ¶ added in v0.3.0
@Summary Get public person @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/public [get]
func GetPersonReFile ¶ added in v0.3.0
@Summary Retry the file that failed to download @Produce application/json @Accept application/json @Tags person @Param uui path string true "download uuid" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/refile/{uuid} [get]
func GetPersonShare ¶ added in v0.3.0
@Summary Get the shared directory @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/share [get]
func GetPersonShareId ¶ added in v0.3.1
@Summary Get the shareid @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/shareid [get]
func GetPlugInDisks ¶
@Summary get disk list @Produce application/json @Accept application/json @Tags disk @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /disk/lists [get]
func GetPort ¶
@Summary 获取一个可用端口 @Produce application/json @Accept application/json @Tags app @Param type query string true "端口类型 udp/tcp" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/getport [get]
func GetShortcutsList ¶
@Summary 获取短链列表 @Produce application/json @Accept application/json @Tags shortcuts @Param username formData string true "User name" @Param pwd formData string true "password" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /shortcuts/list [get]
func GetSyncConfig ¶
func GetSystemCheckVersion ¶ added in v0.3.3
@Summary check version @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/version/check [get]
func GetSystemCupInfo ¶ added in v0.3.3
@Summary get cpu info @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/cpu [get]
func GetSystemDiskInfo ¶ added in v0.3.3
@Summary get disk info @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/disk [get]
func GetSystemHardwareInfo ¶ added in v0.3.1
@Summary get system hardware info @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/hardware/info [get]
func GetSystemInitCheck ¶ added in v0.3.3
@Summary 检查是否进入引导状态 @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/init/check [get]
func GetSystemMemInfo ¶ added in v0.3.3
@Summary get mem info @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/mem [get]
func GetSystemNetInfo ¶ added in v0.3.3
@Summary get Net info @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/net [get]
func GetSystemSocketPort ¶ added in v0.3.2
@Summary Get notification port @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/socket/port [get]
func GetSystemUSBAutoMount ¶ added in v0.3.0
@Summary Turn off usb auto-mount @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/usb [get]
func GetSystemUtilization ¶ added in v0.3.3
@Summary system utilization @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/utilization [get]
func GetUSBList ¶ added in v0.2.8
@Summary check mount point @Produce application/json @Accept application/json @Tags disk @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /disk/usb [get]
func GetUserAllUserName ¶ added in v0.3.3
*
- @description: get all user name
- @method:GET
- @router:/user/all/name
func GetUserAvatar ¶ added in v0.3.3
*
- @description: get user avatar by user id
- @param {query} id string user id
- @method: GET
func GetUserCustomConf ¶ added in v0.3.3
*
- @description:get custom file by user
- @param {path} name string "file name"
- @method: GET
- @router: /user/custom/:key
func GetUserImage ¶ added in v0.3.3
*
- @description: get current user's image
- @method:GET
- @router:/user/image/:id
func GetUserInfo ¶ added in v0.3.0
@Summary get user info @Produce application/json @Accept application/json @Tags user @Success 200 {string} string "ok" @Router /user/info/:id [get]
func GetUserInfoByUserName ¶ added in v0.3.3
@Summary get user info @Produce application/json @Accept application/json @Tags user @Success 200 {string} string "ok" @Router /user/info [get]
func GetUserShareID ¶ added in v0.3.0
@Summary Get my shareId @Produce application/json @Accept application/json @Tags user @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/shareid [get]
func InstallApp ¶
@Summary 安装app(该接口需要post json数据) @Produce application/json @Accept application/json @Tags app @Param id path int true "id" @Param port formData int true "主端口" @Param tcp formData string false "tcp端口" @Param udp formData string false "udp端口" @Param env formData string false "环境变量" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/install [post]
func MkdirAll ¶
@Summary create folder @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param path body string true "path of folder" @Success 200 {string} string "ok" @Router /file/mkdir [post]
func MyAppList ¶
@Summary 我的应用列表 @Produce application/json @Accept application/json @Tags app @Security ApiKeyAuth @Param index query int false "index" @Param size query int false "size" @Param position query bool false "是否是首页应用" @Success 200 {string} string "ok" @Router /app/my/list [get]
func NotifyWS ¶
@Summary websocket 接口,连接成功后发送一个"notify"字符串 @Produce application/json @Accept application/json @Tags notify @Security ApiKeyAuth @Param token path string true "token" @Success 200 {string} string "ok" @Router /notify/ws [get]
func PortCheck ¶
@Summary 检查端口是否可用 @Produce application/json @Accept application/json @Tags app @Param port path int true "端口号" @Param type query string true "端口类型 udp/tcp" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/check/{port} [get]
func PostAddPersonFriend ¶ added in v0.3.0
@Summary add friend @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/user/{shareids} [post]
func PostCreateFile ¶
@Summary create file @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param path body string true "path of folder (path need to url encode)" @Success 200 {string} string "ok" @Router /file/create [post]
func PostDiskAddPartition ¶ added in v0.3.3
@Summary add storage @Produce application/json @Accept multipart/form-data @Tags disk @Security ApiKeyAuth @Param path formData string true "disk path e.g. /dev/sda" @Param serial formData string true "serial" @Param name formData string true "name" @Param format formData bool true "need format(true)" @Success 200 {string} string "ok" @Router /disk/storage [post]
func PostDiskFormat ¶ added in v0.3.3
@Summary format storage @Produce application/json @Accept multipart/form-data @Tags disk @Security ApiKeyAuth @Param path formData string true "e.g. /dev/sda1" @Param pwd formData string true "user password" @Param volume formData string true "mount point" @Success 200 {string} string "ok" @Router /disk/format [post]
func PostDiskUmount ¶ added in v0.2.4
@Summary remove mount point @Produce application/json @Accept multipart/form-data @Tags disk @Security ApiKeyAuth @Param path formData string true "e.g. /dev/sda1" @Param mount_point formData string true "e.g. /mnt/volume1" @Param pwd formData string true "user password" @Success 200 {string} string "ok" @Router /disk/umount [post]
func PostFileUpload ¶
@Summary upload file @Produce application/json @Accept multipart/form-data @Tags file @Security ApiKeyAuth @Param path formData string false "file path" @Param file formData file true "file" @Success 200 {string} string "ok" @Router /file/upload [post]
func PostKillCasaOS ¶ added in v0.2.3
@Summary active killing casaos @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/restart [post]
func PostMountDisk ¶ added in v0.2.3
@Summary add mount point @Produce application/json @Accept multipart/form-data @Tags disk @Security ApiKeyAuth @Param path formData string true "for example: /dev/sda1" @Param serial formData string true "disk id" @Success 200 {string} string "ok" @Router /disk/mount [post]
func PostOperateFileOrDir ¶ added in v0.2.9
@Summary copy or move file @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param body body model.FileOperate true "type:move,copy" @Success 200 {string} string "ok" @Router /file/operate [post]
func PostPersonDownDir ¶ added in v0.3.0
@Summary Modify the download storage directory @Produce application/json @Accept multipart/form-data @Tags person @Security ApiKeyAuth @Param path formData string true "path" @Success 200 {string} string "ok" @Router /person/down/dir [post]
func PostPersonFile ¶ added in v0.3.1
@Summary upload file to friend @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Param path formData string true "Destination path" @Param local_path formData string true "Full path of the file to be uploaded" @Success 200 {string} string "ok" @Router /person/file/{shareid} [post]
func PostPersonShare ¶ added in v0.3.0
@Summary Modify the shared directory @Produce application/json @Accept multipart/form-data @Tags person @Security ApiKeyAuth @Param share formData string true "share" @Success 200 {string} string "ok" @Router /person/share [post]
func PostSetSystemConfig ¶
@Summary 修改配置文件 @Produce application/json @Accept multipart/form-data @Tags sys @Param config formData string true "config json string" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/changhead [post]
func PostSetWidgetConfig ¶
@Summary 修改组件配置文件 @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/widget/config [post]
func PostShortcutsAdd ¶
@Summary 添加shortcuts @Produce application/json @Accept application/json @Tags shortcuts @Param title formData string true "title" @Param url formData string true "url" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /shortcuts/add [post]
func PostUserCustomConf ¶ added in v0.3.3
*
- @description:create or update custom conf by user
- @param {path} name string "file name"
- @method:POST
- @router:/user/custom/:key
func PostUserFileImage ¶ added in v0.3.3
*
- @description:update user image
- @method:POST
- @router:/user/file/image/:key
func PostUserLogin ¶ added in v0.3.3
@Summary login @Produce application/json @Accept application/json @Tags user @Param user_name query string true "User name" @Param pwd query string true "password" @Success 200 {string} string "ok" @Router /user/login [post]
func PostUserPersonInfo ¶ added in v0.3.0
@Summary Modify user person information (Initialization use) @Produce application/json @Accept multipart/form-data @Tags user @Param nick_name formData string false "user nick name" @Param description formData string false "Description" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/person/info [post]
func PostUserRegister ¶ added in v0.3.3
@Summary register user @Router /user/register/ [post]
func PostUserUploadImage ¶ added in v0.3.3
*
- @description:create or update user's custom image
- @param {formData} file file "a file to be uploaded"
- @param {path} key string "file name"
- @method:POST
- @router:/user/upload/image/:key
func PutAppUpdate ¶ added in v0.3.1
@Summary update app version @Produce application/json @Accept multipart/form-data @Tags app @Param id path string true "容器id" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/update/{id} [put]
func PutCasaOSPort ¶ added in v0.2.3
@Summary edit casaos server port @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Param port json string true "port" @Success 200 {string} string "ok" @Router /sys/port [put]
func PutFileContent ¶ added in v0.2.10
@Summary update file @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param path body string true "path" @Param content body string true "content" @Success 200 {string} string "ok" @Router /file/update [put]
func PutNotifyRead ¶
@Summary 标记notify已读 @Produce application/json @Accept application/json @Tags notify @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /notify/read/{id} [put]
func PutPersonAgreeFriend ¶ added in v0.3.1
@Summary agree add friend @Produce application/json @Accept application/json @Tags person @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/friend/{shareid} [put]
func PutPersonBlock ¶ added in v0.3.0
@Summary Modify disabled status @Produce application/json @Accept application/json @Tags person @Param block formData bool false "Disable or not,Default:false " @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/block/{shareid} [put]
func PutPersonRemarks ¶ added in v0.3.0
@Summary edit friend's remarks @Produce application/json @Accept application/json @Tags person @Param remarks formData string true "remarks name" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/remarks/{shareid} [put]
func PutPersonWrite ¶ added in v0.3.1
@Summary edit friend's @Produce application/json @Accept application/json @Tags person @Param write formData bool true "write" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /person/write/{shareid} [put]
func PutShortcutsEdit ¶
@Summary 编辑shortcuts @Produce application/json @Accept application/json @Tags shortcuts @Param title formData string true "title" @Param url formData string true "url" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /shortcuts/edit [put]
func PutSystemUSBAutoMount ¶ added in v0.3.3
@Summary Turn off usb auto-mount @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/usb/off [put]
func PutUserAvatar ¶ added in v0.3.3
@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 /user/avatar [put]
func PutUserDesc ¶ added in v0.3.3
@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 PutUserName ¶ added in v0.3.0
@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 ¶ added in v0.3.3
@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 PutUserPwd ¶ added in v0.3.0
@Summary edit user password @Produce application/json @Accept application/json @Tags user @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/password/:id [put]
func RemovePartition ¶
@Summary 删除分区 @Produce application/json @Accept multipart/form-data @Tags disk @Security ApiKeyAuth @Param path formData string true "磁盘路径 例如/dev/sda1" @Success 200 {string} string "ok" @Router /disk/delpart [delete]
func RenamePath ¶
@Summary rename file or dir @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param oldpath body string true "path of old" @Param newpath body string true "path of new" @Success 200 {string} string "ok" @Router /file/rename [put]
func Set_Name_Pwd ¶
@Summary 设置用户名和密码 @Produce application/json @Accept multipart/form-data @Tags user @Param username formData string true "User name" @Param pwd formData string true "password" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /user/setusernamepwd [post]
func ShareAppFile ¶
@Summary 分享该应用配置 @Produce application/json @Accept application/json @Tags app @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/share [post]
func SystemUpdate ¶
@Summary 系统信息 @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/update [post]
func UnInstallApp ¶
@Summary 卸载app @Produce application/json @Accept multipart/form-data @Tags app @Param id path string true "容器id" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/uninstall/{id} [delete]
func UpdateSetting ¶
@Summary 更新设置 @Produce application/json @Accept multipart/form-data @Tags app @Param id path string true "容器id" @Param shares formData string false "cpu权重" @Param mem formData string false "内存大小MB" @Param restart formData string false "重启策略" @Param label formData string false "应用名称" @Param position formData bool true "是否放到首页" @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/update/{id}/setting [put]
Types ¶
This section is empty.