v1

package
v0.4.2-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 40 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 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 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 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)

client

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 GetSize added in v0.4.1

func GetSize(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 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 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 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 PostInstallAppNotify added in v0.4.0

func PostInstallAppNotify(c *gin.Context)

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 PostUninstallAppNotify added in v0.4.0

func PostUninstallAppNotify(c *gin.Context)

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 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 PutSystemState added in v0.4.0

func PutSystemState(c *gin.Context)

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