v1

package
v0.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 39 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppInfo

func AppInfo(c *gin.Context)

@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

func AppList(c *gin.Context)

@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

func AppUsageList(c *gin.Context)

@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

func CategoryList(c *gin.Context)

@Summary 获取远程分类列表 @Produce application/json @Accept application/json @Tags app @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/category [get]

func ChangAppState

func ChangAppState(c *gin.Context)

@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

func ContainerInfo(c *gin.Context)

@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

func ContainerLog(c *gin.Context)

@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

func ContainerRelyInfo(c *gin.Context)

@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

func ContainerUpdateInfo(c *gin.Context)

@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

func DeleteFile(c *gin.Context)

@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 DeleteOperateFileOrDir(c *gin.Context)

func DeleteSambaConnections added in v0.3.5

func DeleteSambaConnections(c *gin.Context)

func DeleteSambaShares added in v0.3.5

func DeleteSambaShares(c *gin.Context)

func DirPath

func DirPath(c *gin.Context)

@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 DockerTerminal

func DockerTerminal(c *gin.Context)

打开docker的terminal

func GetCasaOSErrorLogs

func GetCasaOSErrorLogs(c *gin.Context)

@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

func GetCasaOSPort(c *gin.Context)

@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

func GetContainerState(c *gin.Context)

@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 GetDockerDaemonConfiguration(c *gin.Context)

func GetDockerNetworks added in v0.3.4

func GetDockerNetworks(c *gin.Context)

func GetDownloadFile

func GetDownloadFile(c *gin.Context)

@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 GetDownloadSingleFile(c *gin.Context)

func GetFileImage added in v0.3.1

func GetFileImage(c *gin.Context)

@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

func GetFileUpload(c *gin.Context)

@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

func GetFilerContent(c *gin.Context)

@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 GetLocalFile(c *gin.Context)

func GetPort

func GetPort(c *gin.Context)

@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 GetSambaConnectionsList(c *gin.Context)

func GetSambaSharesList added in v0.3.5

func GetSambaSharesList(c *gin.Context)

func GetSambaStatus added in v0.3.5

func GetSambaStatus(c *gin.Context)

func GetSystemAppsStatus added in v0.3.4

func GetSystemAppsStatus(c *gin.Context)

func GetSystemCheckVersion added in v0.3.3

func GetSystemCheckVersion(c *gin.Context)

@Summary check version @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/version/check [get]

func GetSystemConfigDebug

func GetSystemConfigDebug(c *gin.Context)

系统配置

func GetSystemCupInfo added in v0.3.3

func GetSystemCupInfo(c *gin.Context)

@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

func GetSystemDiskInfo(c *gin.Context)

@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

func GetSystemHardwareInfo(c *gin.Context)

@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

func GetSystemMemInfo(c *gin.Context)

@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

func GetSystemNetInfo(c *gin.Context)

@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 GetSystemProxy(c *gin.Context)

func GetSystemSocketPort added in v0.3.2

func GetSystemSocketPort(c *gin.Context)

@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

func GetSystemUtilization(c *gin.Context)

@Summary system utilization @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/utilization [get]

func InstallApp

func InstallApp(c *gin.Context)

@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

func MkdirAll(c *gin.Context)

@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

func MyAppList(c *gin.Context)

@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

func NotifyWS(c *gin.Context)

@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

func PortCheck(c *gin.Context)

@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

func PostCreateFile(c *gin.Context)

@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

func PostFileUpload(c *gin.Context)

@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

func PostKillCasaOS(c *gin.Context)

@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 PostNotifyMessage(c *gin.Context)

func PostOperateFileOrDir added in v0.2.9

func PostOperateFileOrDir(c *gin.Context)

@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 PostSambaConnectionsCreate(c *gin.Context)

func PostSambaSharesCreate added in v0.3.5

func PostSambaSharesCreate(c *gin.Context)

func PostSshLogin added in v0.3.4

func PostSshLogin(c *gin.Context)

func PostSystemStatusNotify added in v0.3.7

func PostSystemStatusNotify(c *gin.Context)

func PutAppUpdate added in v0.3.1

func PutAppUpdate(c *gin.Context)

@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

func PutCasaOSPort(c *gin.Context)

@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 PutDockerDaemonConfiguration(c *gin.Context)

func PutFileContent added in v0.2.10

func PutFileContent(c *gin.Context)

@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

func PutNotifyRead(c *gin.Context)

@Summary 标记notify已读 @Produce application/json @Accept application/json @Tags notify @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /notify/read/{id} [put]

func RenamePath

func RenamePath(c *gin.Context)

@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

func ShareAppFile(c *gin.Context)

@Summary 分享该应用配置 @Produce application/json @Accept application/json @Tags app @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /app/share [post]

func SystemUpdate

func SystemUpdate(c *gin.Context)

@Summary 系统信息 @Produce application/json @Accept application/json @Tags sys @Security ApiKeyAuth @Success 200 {string} string "ok" @Router /sys/update [post]

func UnInstallApp

func UnInstallApp(c *gin.Context)

@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

func UpdateSetting(c *gin.Context)

@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]

func WsSsh

func WsSsh(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL