Documentation ¶
Overview ¶
* @Author: LinkLeong link@icewhale.com * @Date: 2022-07-26 11:08:48 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-17 18:25:42 * @FilePath: /CasaOS/route/v1/samba.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 DeleteFile(c *gin.Context)
- func DeleteOperateFileOrDir(c *gin.Context)
- func DeleteSambaConnections(c *gin.Context)
- func DeleteSambaShares(c *gin.Context)
- func DirPath(c *gin.Context)
- func DockerTerminal(c *gin.Context)
- func GetCasaOSErrorLogs(c *gin.Context)
- func GetCasaOSPort(c *gin.Context)
- func GetContainerState(c *gin.Context)
- func GetDockerDaemonConfiguration(c *gin.Context)
- func GetDockerNetworks(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 GetLocalFile(c *gin.Context)
- func GetPort(c *gin.Context)
- func GetSambaConnectionsList(c *gin.Context)
- func GetSambaSharesList(c *gin.Context)
- func GetSambaStatus(c *gin.Context)
- func GetSystemAppsStatus(c *gin.Context)
- func GetSystemCheckVersion(c *gin.Context)
- func GetSystemConfigDebug(c *gin.Context)
- func GetSystemCupInfo(c *gin.Context)
- func GetSystemDiskInfo(c *gin.Context)
- func GetSystemHardwareInfo(c *gin.Context)
- func GetSystemMemInfo(c *gin.Context)
- func GetSystemNetInfo(c *gin.Context)
- func GetSystemProxy(c *gin.Context)
- func GetSystemSocketPort(c *gin.Context)
- func GetSystemUtilization(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 PostCreateFile(c *gin.Context)
- func PostFileUpload(c *gin.Context)
- func PostKillCasaOS(c *gin.Context)
- func PostNotifyMessage(c *gin.Context)
- func PostOperateFileOrDir(c *gin.Context)
- func PostSambaConnectionsCreate(c *gin.Context)
- func PostSambaSharesCreate(c *gin.Context)
- func PostSshLogin(c *gin.Context)
- func PostSystemStatusNotify(c *gin.Context)
- func PutAppUpdate(c *gin.Context)
- func PutCasaOSPort(c *gin.Context)
- func PutDockerDaemonConfiguration(c *gin.Context)
- func PutFileContent(c *gin.Context)
- func PutNotifyRead(c *gin.Context)
- func RenamePath(c *gin.Context)
- func ShareAppFile(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 ¶
@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 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 DeleteSambaConnections ¶ added in v0.3.5
func DeleteSambaShares ¶ added in v0.3.5
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 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 GetDockerDaemonConfiguration ¶ added in v0.3.7
func GetDockerNetworks ¶ added in v0.3.4
func GetDownloadFile ¶
@Summary download @Produce application/json @Accept application/json @Tags file @Security ApiKeyAuth @Param format 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 GetLocalFile ¶
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 GetSambaConnectionsList ¶ added in v0.3.5
func GetSambaSharesList ¶ added in v0.3.5
func GetSambaStatus ¶ added in v0.3.5
func GetSystemAppsStatus ¶ added in v0.3.4
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 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 GetSystemProxy ¶ added in v0.3.6
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 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 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 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 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 PostNotifyMessage ¶ added in v0.3.7
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 PostSambaConnectionsCreate ¶ added in v0.3.5
func PostSambaSharesCreate ¶ added in v0.3.5
func PostSshLogin ¶ added in v0.3.4
func PostSystemStatusNotify ¶ added in v0.3.7
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 PutDockerDaemonConfiguration ¶ added in v0.3.7
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 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 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.