controllers

package
v0.0.0-...-724610a Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: AGPL-3.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(ctx http.Context, code int, message string) http.Response

Error 响应错误

func ErrorSystem

func ErrorSystem(ctx http.Context) http.Response

ErrorSystem 响应系统错误

func Paginate

func Paginate[T any](ctx http.Context, allItems []T) (pagedItems []T, total int)

func Sanitize

func Sanitize(ctx http.Context, rules map[string]string) http.Response

Sanitize 消毒参数

func SanitizeRequest

func SanitizeRequest(ctx http.Context, request http.FormRequest) http.Response

SanitizeRequest 消毒请求参数

func Success

func Success(ctx http.Context, data any) http.Response

Success 响应成功

Types

type CertController

type CertController struct {
	// contains filtered or unexported fields
}

func NewCertController

func NewCertController() *CertController

func (*CertController) Algorithms

func (r *CertController) Algorithms(ctx http.Context) http.Response

Algorithms

@Summary		获取算法列表
@Description	获取面板证书管理支持的算法列表
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Success		200	{object}	SuccessResponse
@Router			/panel/cert/algorithms [get]

func (*CertController) CAProviders

func (r *CertController) CAProviders(ctx http.Context) http.Response

CAProviders

@Summary		获取 CA 提供商
@Description	获取面板证书管理支持的 CA 提供商
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Success		200	{object}	SuccessResponse
@Router			/panel/cert/caProviders [get]

func (*CertController) CertDestroy

func (r *CertController) CertDestroy(ctx http.Context) http.Response

CertDestroy

@Summary		删除证书
@Description	删除面板证书管理的证书
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			id	path		int	true	"证书 ID"
@Success		200	{object}	SuccessResponse
@Router			/panel/cert/certs/{id} [delete]

func (*CertController) CertList

func (r *CertController) CertList(ctx http.Context) http.Response

CertList

@Summary		获取证书列表
@Description	获取面板证书管理的证书列表
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/certs [get]

func (*CertController) CertShow

func (r *CertController) CertShow(ctx http.Context) http.Response

CertShow

@Summary		获取证书
@Description	获取面板证书管理的证书
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Param			id	path		int	true	"证书 ID"
@Success		200	{object}	SuccessResponse{data=models.Cert}
@Router			/panel/cert/certs/{id} [get]

func (*CertController) CertStore

func (r *CertController) CertStore(ctx http.Context) http.Response

CertStore

@Summary		添加证书
@Description	添加证书到面板证书管理
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.CertStore	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/certs [post]

func (*CertController) CertUpdate

func (r *CertController) CertUpdate(ctx http.Context) http.Response

CertUpdate

@Summary		更新证书
@Description	更新面板证书管理的证书
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			id		path		int					true	"证书 ID"
@Param			data	body		requests.CertUpdate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/certs/{id} [put]

func (*CertController) DNSDestroy

func (r *CertController) DNSDestroy(ctx http.Context) http.Response

DNSDestroy

@Summary		删除 DNS 接口
@Description	删除面板证书管理的 DNS 接口
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			id	path		int	true	"DNS 接口 ID"
@Success		200	{object}	SuccessResponse
@Router			/panel/cert/dns/{id} [delete]

func (*CertController) DNSList

func (r *CertController) DNSList(ctx http.Context) http.Response

DNSList

@Summary		获取 DNS 接口列表
@Description	获取面板证书管理的 DNS 接口列表
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/dns [get]

func (*CertController) DNSProviders

func (r *CertController) DNSProviders(ctx http.Context) http.Response

DNSProviders

@Summary		获取 DNS 提供商
@Description	获取面板证书管理支持的 DNS 提供商
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Success		200	{object}	SuccessResponse
@Router			/panel/cert/dnsProviders [get]

func (*CertController) DNSShow

func (r *CertController) DNSShow(ctx http.Context) http.Response

DNSShow

@Summary		获取 DNS 接口
@Description	获取面板证书管理的 DNS 接口
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Param			id	path		int	true	"DNS 接口 ID"
@Success		200	{object}	SuccessResponse{data=models.CertDNS}
@Router			/panel/cert/dns/{id} [get]

func (*CertController) DNSStore

func (r *CertController) DNSStore(ctx http.Context) http.Response

DNSStore

@Summary		添加 DNS 接口
@Description	添加 DNS 接口到面板证书管理
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.DNSStore	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/dns [post]

func (*CertController) DNSUpdate

func (r *CertController) DNSUpdate(ctx http.Context) http.Response

DNSUpdate

@Summary		更新 DNS 接口
@Description	更新面板证书管理的 DNS 接口
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			id		path		int					true	"DNS 接口 ID"
@Param			data	body		requests.DNSUpdate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/dns/{id} [put]

func (*CertController) Deploy

func (r *CertController) Deploy(ctx http.Context) http.Response

Deploy

@Summary		部署证书
@Description	部署面板证书管理的证书
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.CertDeploy	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/deploy [post]

func (*CertController) ManualDNS

func (r *CertController) ManualDNS(ctx http.Context) http.Response

ManualDNS

@Summary		获取手动 DNS 记录
@Description	获取签发证书所需的 DNS 记录
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Obtain	true	"request"
@Success		200		{object}	SuccessResponse{data=[]acme.DNSRecord}
@Router			/panel/cert/manualDNS [post]

func (*CertController) Obtain

func (r *CertController) Obtain(ctx http.Context) http.Response

Obtain

@Summary		签发证书
@Description	签发面板证书管理的证书
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Obtain	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/obtain [post]

func (*CertController) Renew

func (r *CertController) Renew(ctx http.Context) http.Response

Renew

@Summary		续签证书
@Description	续签面板证书管理的证书
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Renew	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/renew [post]

func (*CertController) UserDestroy

func (r *CertController) UserDestroy(ctx http.Context) http.Response

UserDestroy

@Summary		删除 ACME 用户
@Description	删除面板证书管理的 ACME 用户
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			id	path		int	true	"用户 ID"
@Success		200	{object}	SuccessResponse
@Router			/panel/cert/users/{id} [delete]

func (*CertController) UserList

func (r *CertController) UserList(ctx http.Context) http.Response

UserList

@Summary		获取用户列表
@Description	获取面板证书管理的 ACME 用户列表
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/users [get]

func (*CertController) UserShow

func (r *CertController) UserShow(ctx http.Context) http.Response

UserShow

@Summary		获取 ACME 用户
@Description	获取面板证书管理的 ACME 用户
@Tags			TLS证书
@Produce		json
@Security		BearerToken
@Param			id	path		int	true	"用户 ID"
@Success		200	{object}	SuccessResponse{data=models.CertUser}
@Router			/panel/cert/users/{id} [get]

func (*CertController) UserStore

func (r *CertController) UserStore(ctx http.Context) http.Response

UserStore

@Summary		添加 ACME 用户
@Description	添加 ACME 用户到面板证书管理
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.UserStore	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/users [post]

func (*CertController) UserUpdate

func (r *CertController) UserUpdate(ctx http.Context) http.Response

UserUpdate

@Summary		更新 ACME 用户
@Description	更新面板证书管理的 ACME 用户
@Tags			TLS证书
@Accept			json
@Produce		json
@Security		BearerToken
@Param			id		path		int					true	"用户 ID"
@Param			data	body		requests.UserUpdate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/cert/users/{id} [put]

type ContainerController

type ContainerController struct {
	// contains filtered or unexported fields
}

func NewContainerController

func NewContainerController() *ContainerController

func (*ContainerController) ContainerCreate

func (r *ContainerController) ContainerCreate(ctx http.Context) http.Response

ContainerCreate

@Summary		创建容器
@Description	创建一个容器
@Tags			容器
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ContainerCreate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/create [post]

func (*ContainerController) ContainerExist

func (r *ContainerController) ContainerExist(ctx http.Context) http.Response

ContainerExist

@Summary		检查容器是否存在
@Description	检查一个容器是否存在
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/exist [get]

func (*ContainerController) ContainerInspect

func (r *ContainerController) ContainerInspect(ctx http.Context) http.Response

ContainerInspect

@Summary		查看容器
@Description	查看一个容器的详细信息
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/inspect [get]

func (*ContainerController) ContainerKill

func (r *ContainerController) ContainerKill(ctx http.Context) http.Response

ContainerKill

@Summary		杀死容器
@Description	杀死一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/kill [post]

func (*ContainerController) ContainerList

func (r *ContainerController) ContainerList(ctx http.Context) http.Response

ContainerList

@Summary		获取容器列表
@Description	获取所有容器列表
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/list [get]

func (*ContainerController) ContainerLogs

func (r *ContainerController) ContainerLogs(ctx http.Context) http.Response

ContainerLogs

@Summary		查看容器日志
@Description	查看一个容器的日志
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/logs [get]

func (*ContainerController) ContainerPause

func (r *ContainerController) ContainerPause(ctx http.Context) http.Response

ContainerPause

@Summary		暂停容器
@Description	暂停一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse

func (*ContainerController) ContainerPrune

func (r *ContainerController) ContainerPrune(ctx http.Context) http.Response

ContainerPrune

@Summary		清理容器
@Description	清理无用的容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Success		200	{object}	SuccessResponse
@Router			/panel/container/prune [post]

func (*ContainerController) ContainerRemove

func (r *ContainerController) ContainerRemove(ctx http.Context) http.Response

ContainerRemove

@Summary		删除容器
@Description	删除一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/remove [post]

func (*ContainerController) ContainerRename

func (r *ContainerController) ContainerRename(ctx http.Context) http.Response

ContainerRename

@Summary		重命名容器
@Description	重命名一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ContainerRename	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/rename [post]

func (*ContainerController) ContainerRestart

func (r *ContainerController) ContainerRestart(ctx http.Context) http.Response

ContainerRestart

@Summary		重启容器
@Description	重启一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/restart [post]

func (*ContainerController) ContainerSearch

func (r *ContainerController) ContainerSearch(ctx http.Context) http.Response

ContainerSearch

@Summary		搜索容器
@Description	根据容器名称搜索容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			name	query		string	true	"容器名称"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/search [get]

func (*ContainerController) ContainerStart

func (r *ContainerController) ContainerStart(ctx http.Context) http.Response

ContainerStart

@Summary		启动容器
@Description	启动一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/start [post]

func (*ContainerController) ContainerStats

func (r *ContainerController) ContainerStats(ctx http.Context) http.Response

ContainerStats

@Summary		查看容器状态
@Description	查看一个容器的状态信息
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/stats [get]

func (*ContainerController) ContainerStop

func (r *ContainerController) ContainerStop(ctx http.Context) http.Response

ContainerStop

@Summary		停止容器
@Description	停止一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/stop [post]

func (*ContainerController) ContainerUnpause

func (r *ContainerController) ContainerUnpause(ctx http.Context) http.Response

ContainerUnpause

@Summary		取消暂停容器
@Description	取消暂停一个容器
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse

@Router			/panel/container/unpause [post]

func (*ContainerController) ImageExist

func (r *ContainerController) ImageExist(ctx http.Context) http.Response

ImageExist

@Summary		检查镜像是否存在
@Description	检查一个镜像是否存在
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/image/exist [get]

func (*ContainerController) ImageInspect

func (r *ContainerController) ImageInspect(ctx http.Context) http.Response

ImageInspect

@Summary		查看镜像
@Description	查看一个镜像的详细信息
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/image/inspect [get]

func (*ContainerController) ImageList

func (r *ContainerController) ImageList(ctx http.Context) http.Response

ImageList

@Summary		获取镜像列表
@Description	获取所有镜像列表
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/image/list [get]

func (*ContainerController) ImagePrune

func (r *ContainerController) ImagePrune(ctx http.Context) http.Response

ImagePrune

@Summary		清理镜像
@Description	清理无用的镜像
@Tags			容器
@Produce		json
@Security		BearerToken
@Success		200	{object}	SuccessResponse
@Router			/panel/container/image/prune [post]

func (*ContainerController) ImagePull

func (r *ContainerController) ImagePull(ctx http.Context) http.Response

ImagePull

@Summary		拉取镜像
@Description	拉取一个镜像
@Tags			容器
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ImagePull	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/image/pull [post]

func (*ContainerController) ImageRemove

func (r *ContainerController) ImageRemove(ctx http.Context) http.Response

ImageRemove

@Summary		删除镜像
@Description	删除一个镜像
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/image/remove [post]

func (*ContainerController) NetworkConnect

func (r *ContainerController) NetworkConnect(ctx http.Context) http.Response

NetworkConnect

@Summary		连接容器到网络
@Description	连接一个容器到一个网络
@Tags			容器
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.NetworkConnectDisConnect	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/network/connect [post]

func (*ContainerController) NetworkCreate

func (r *ContainerController) NetworkCreate(ctx http.Context) http.Response

NetworkCreate

@Summary		创建网络
@Description	创建一个网络
@Tags			容器
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.NetworkCreate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/network/create [post]

func (*ContainerController) NetworkDisconnect

func (r *ContainerController) NetworkDisconnect(ctx http.Context) http.Response

NetworkDisconnect

@Summary		从网络断开容器
@Description	从一个网络断开一个容器
@Tags			容器
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.NetworkConnectDisConnect	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/network/disconnect [post]

func (*ContainerController) NetworkExist

func (r *ContainerController) NetworkExist(ctx http.Context) http.Response

NetworkExist

@Summary		检查网络是否存在
@Description	检查一个网络是否存在
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/network/exist [get]

func (*ContainerController) NetworkInspect

func (r *ContainerController) NetworkInspect(ctx http.Context) http.Response

NetworkInspect

@Summary		查看网络
@Description	查看一个网络的详细信息
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/network/inspect [get]

func (*ContainerController) NetworkList

func (r *ContainerController) NetworkList(ctx http.Context) http.Response

NetworkList

@Summary		获取网络列表
@Description	获取所有网络列表
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/network/list [get]

func (*ContainerController) NetworkPrune

func (r *ContainerController) NetworkPrune(ctx http.Context) http.Response

NetworkPrune

@Summary		清理网络
@Description	清理无用的网络
@Tags			容器
@Produce		json
@Security		BearerToken
@Success		200	{object}	SuccessResponse
@Router			/panel/container/network/prune [post]

func (*ContainerController) NetworkRemove

func (r *ContainerController) NetworkRemove(ctx http.Context) http.Response

NetworkRemove

@Summary		删除网络
@Description	删除一个网络
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/network/remove [post]

func (*ContainerController) VolumeCreate

func (r *ContainerController) VolumeCreate(ctx http.Context) http.Response

VolumeCreate

@Summary		创建卷
@Description	创建一个卷
@Tags			容器
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.VolumeCreate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/volume/create [post]

func (*ContainerController) VolumeExist

func (r *ContainerController) VolumeExist(ctx http.Context) http.Response

VolumeExist

@Summary		检查卷是否存在
@Description	检查一个卷是否存在
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/volume/exist [get]

func (*ContainerController) VolumeInspect

func (r *ContainerController) VolumeInspect(ctx http.Context) http.Response

VolumeInspect

@Summary		查看卷
@Description	查看一个卷的详细信息
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/volume/inspect [get]

func (*ContainerController) VolumeList

func (r *ContainerController) VolumeList(ctx http.Context) http.Response

VolumeList

@Summary		获取卷列表
@Description	获取所有卷列表
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/volume/list [get]

func (*ContainerController) VolumePrune

func (r *ContainerController) VolumePrune(ctx http.Context) http.Response

VolumePrune

@Summary		清理卷
@Description	清理无用的卷
@Tags			容器
@Produce		json
@Security		BearerToken
@Success		200	{object}	SuccessResponse
@Router			/panel/container/volume/prune [post]

func (*ContainerController) VolumeRemove

func (r *ContainerController) VolumeRemove(ctx http.Context) http.Response

VolumeRemove

@Summary		删除卷
@Description	删除一个卷
@Tags			容器
@Produce		json
@Security		BearerToken
@Param			data	body		requests.ID	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/container/volume/remove [post]

type CronController

type CronController struct {
	// contains filtered or unexported fields
}

func NewCronController

func NewCronController() *CronController

func (*CronController) Add

func (r *CronController) Add(ctx http.Context) http.Response

Add 添加计划任务

func (*CronController) Delete

func (r *CronController) Delete(ctx http.Context) http.Response

Delete 删除计划任务

func (*CronController) List

func (r *CronController) List(ctx http.Context) http.Response

List 获取计划任务列表

func (*CronController) Log

func (r *CronController) Log(ctx http.Context) http.Response

Log 获取计划任务日志

func (*CronController) Script

func (r *CronController) Script(ctx http.Context) http.Response

Script 获取脚本内容

func (*CronController) Status

func (r *CronController) Status(ctx http.Context) http.Response

Status 更新计划任务状态

func (*CronController) Update

func (r *CronController) Update(ctx http.Context) http.Response

Update 更新计划任务

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

ErrorResponse 通用错误响应

type FileController

type FileController struct {
}

func NewFileController

func NewFileController() *FileController

func (*FileController) Archive

func (r *FileController) Archive(ctx http.Context) http.Response

Archive

@Summary		压缩文件/目录
@Description	压缩文件/目录到给定路径
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Archive	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/archive [post]

func (*FileController) Content

func (r *FileController) Content(ctx http.Context) http.Response

Content

@Summary		获取文件内容
@Description	获取给定路径的文件内容
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	query		requests.Exist	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/content [get]

func (*FileController) Copy

func (r *FileController) Copy(ctx http.Context) http.Response

Copy

@Summary		复制文件/目录
@Description	复制文件/目录到给定路径
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Copy	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/copy [post]

func (*FileController) Create

func (r *FileController) Create(ctx http.Context) http.Response

Create

@Summary		创建文件/目录
@Description	创建文件/目录到给定路径
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.NotExist	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/create [post]

func (*FileController) Delete

func (r *FileController) Delete(ctx http.Context) http.Response

Delete

@Summary		删除文件/目录
@Description	删除给定路径的文件/目录
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Exist	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/delete [post]

func (*FileController) Download

func (r *FileController) Download(ctx http.Context) http.Response

Download

@Summary		下载文件
@Description	下载给定路径的文件
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	query		requests.NotExist	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/download [get]

func (*FileController) Info

func (r *FileController) Info(ctx http.Context) http.Response

Info

@Summary		获取文件/目录信息
@Description	获取给定路径的文件/目录信息
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	query		requests.Exist	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/info [get]

func (*FileController) List

func (r *FileController) List(ctx http.Context) http.Response

List

@Summary		获取文件/目录列表
@Description	获取给定路径的文件/目录列表
@Tags			文件
@Accept			json
@Produce		json
@Param			data	query		requests.Exist			true	"request"
@Param			data	query		commonrequests.Paginate	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/list [get]

func (*FileController) Move

func (r *FileController) Move(ctx http.Context) http.Response

Move

@Summary		移动文件/目录
@Description	移动文件/目录到给定路径,等效于重命名
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Move	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/move [post]

func (*FileController) Permission

func (r *FileController) Permission(ctx http.Context) http.Response

Permission

@Summary		修改文件/目录权限
@Description	修改给定路径的文件/目录权限
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Permission	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/permission [post]

func (*FileController) RemoteDownload

func (r *FileController) RemoteDownload(ctx http.Context) http.Response

RemoteDownload

@Summary		下载远程文件
@Description	下载远程文件到给定路径
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.NotExist	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/remoteDownload [post]

func (*FileController) Save

func (r *FileController) Save(ctx http.Context) http.Response

Save

@Summary		保存文件内容
@Description	保存给定路径的文件内容
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.Save	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/save [post]

func (*FileController) Search

func (r *FileController) Search(ctx http.Context) http.Response

Search

@Summary		搜索文件/目录
@Description	通过关键词搜索给定路径的文件/目录
@Tags			文件
@Accept			json
@Produce		json
@Param			data	body		requests.Search	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/search [post]

func (*FileController) UnArchive

func (r *FileController) UnArchive(ctx http.Context) http.Response

UnArchive

@Summary		解压文件/目录
@Description	解压文件/目录到给定路径
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			data	body		requests.UnArchive	true	"request"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/unArchive [post]

func (*FileController) Upload

func (r *FileController) Upload(ctx http.Context) http.Response

Upload

@Summary		上传文件
@Description	上传文件到给定路径
@Tags			文件
@Accept			json
@Produce		json
@Security		BearerToken
@Param			file	formData	file	true	"file"
@Param			path	formData	string	true	"path"
@Success		200		{object}	SuccessResponse
@Router			/panel/file/upload [post]

type InfoController

type InfoController struct {
	// contains filtered or unexported fields
}

func NewInfoController

func NewInfoController() *InfoController

func (*InfoController) CheckUpdate

func (r *InfoController) CheckUpdate(ctx http.Context) http.Response

CheckUpdate 检查面板更新

func (*InfoController) CountInfo

func (r *InfoController) CountInfo(ctx http.Context) http.Response

CountInfo 获取面板统计信息

func (*InfoController) HomePlugins

func (r *InfoController) HomePlugins(ctx http.Context) http.Response

HomePlugins 获取首页插件

func (*InfoController) InstalledDbAndPhp

func (r *InfoController) InstalledDbAndPhp(ctx http.Context) http.Response

InstalledDbAndPhp 获取已安装的数据库和 PHP 版本

func (*InfoController) NowMonitor

func (r *InfoController) NowMonitor(ctx http.Context) http.Response

NowMonitor 获取当前监控信息

func (*InfoController) Panel

func (r *InfoController) Panel(ctx http.Context) http.Response

Panel 获取面板信息

func (*InfoController) Restart

func (r *InfoController) Restart(ctx http.Context) http.Response

Restart 重启面板

func (*InfoController) SystemInfo

func (r *InfoController) SystemInfo(ctx http.Context) http.Response

SystemInfo 获取系统信息

func (*InfoController) Update

func (r *InfoController) Update(ctx http.Context) http.Response

Update 更新面板

func (*InfoController) UpdateInfo

func (r *InfoController) UpdateInfo(ctx http.Context) http.Response

UpdateInfo 获取更新信息

type MenuItem struct {
	Name  string `json:"name"`
	Title string `json:"title"`
	Icon  string `json:"icon"`
	Jump  string `json:"jump"`
}

type MonitorController

type MonitorController struct {
	// contains filtered or unexported fields
}

func NewMonitorController

func NewMonitorController() *MonitorController

func (*MonitorController) Clear

func (r *MonitorController) Clear(ctx http.Context) http.Response

Clear 清空监控数据

func (*MonitorController) List

List 监控数据列表

func (*MonitorController) SaveDays

func (r *MonitorController) SaveDays(ctx http.Context) http.Response

SaveDays 保存监控天数

func (*MonitorController) Switch

func (r *MonitorController) Switch(ctx http.Context) http.Response

Switch 监控开关

func (*MonitorController) SwitchAndDays

func (r *MonitorController) SwitchAndDays(ctx http.Context) http.Response

SwitchAndDays 监控开关和监控天数

type PluginController

type PluginController struct {
	// contains filtered or unexported fields
}

func NewPluginController

func NewPluginController() *PluginController

func (*PluginController) Install

func (r *PluginController) Install(ctx http.Context) http.Response

Install

@Summary	安装插件
@Tags		插件
@Produce	json
@Security	BearerToken
@Param		slug	query		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/plugin/install [post]

func (*PluginController) IsInstalled

func (r *PluginController) IsInstalled(ctx http.Context) http.Response

IsInstalled

@Summary	检查插件是否已安装
@Tags		插件
@Produce	json
@Security	BearerToken
@Param		slug	query		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/plugin/isInstalled [get]

func (*PluginController) List

func (r *PluginController) List(ctx http.Context) http.Response

List

@Summary	插件列表
@Tags		插件
@Produce	json
@Security	BearerToken
@Success	200	{object}	controllers.SuccessResponse
@Router		/panel/plugin/list [get]

func (*PluginController) Uninstall

func (r *PluginController) Uninstall(ctx http.Context) http.Response

Uninstall

@Summary	卸载插件
@Tags		插件
@Produce	json
@Security	BearerToken
@Param		slug	query		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/plugin/uninstall [post]

func (*PluginController) Update

func (r *PluginController) Update(ctx http.Context) http.Response

Update

@Summary	更新插件
@Tags		插件
@Produce	json
@Security	BearerToken
@Param		slug	query		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/plugin/update [post]

func (*PluginController) UpdateShow

func (r *PluginController) UpdateShow(ctx http.Context) http.Response

UpdateShow

@Summary	更新插件首页显示状态
@Tags		插件
@Produce	json
@Security	BearerToken
@Param		slug	query		string	true	"request"
@Param		show	query		bool	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/plugin/updateShow [post]

type SafeController

type SafeController struct {
	// contains filtered or unexported fields
}

func NewSafeController

func NewSafeController() *SafeController

func (*SafeController) AddFirewallRule

func (r *SafeController) AddFirewallRule(ctx http.Context) http.Response

AddFirewallRule 添加防火墙规则

func (*SafeController) DeleteFirewallRule

func (r *SafeController) DeleteFirewallRule(ctx http.Context) http.Response

DeleteFirewallRule 删除防火墙规则

func (*SafeController) GetFirewallRules

func (r *SafeController) GetFirewallRules(ctx http.Context) http.Response

GetFirewallRules 获取防火墙规则

func (*SafeController) GetFirewallStatus

func (r *SafeController) GetFirewallStatus(ctx http.Context) http.Response

GetFirewallStatus 获取防火墙状态

func (*SafeController) GetPingStatus

func (r *SafeController) GetPingStatus(ctx http.Context) http.Response

GetPingStatus 获取 Ping 状态

func (*SafeController) GetSshPort

func (r *SafeController) GetSshPort(ctx http.Context) http.Response

GetSshPort 获取 SSH 端口

func (*SafeController) GetSshStatus

func (r *SafeController) GetSshStatus(ctx http.Context) http.Response

GetSshStatus 获取 SSH 状态

func (*SafeController) SetFirewallStatus

func (r *SafeController) SetFirewallStatus(ctx http.Context) http.Response

SetFirewallStatus 设置防火墙状态

func (*SafeController) SetPingStatus

func (r *SafeController) SetPingStatus(ctx http.Context) http.Response

SetPingStatus 设置 Ping 状态

func (*SafeController) SetSshPort

func (r *SafeController) SetSshPort(ctx http.Context) http.Response

SetSshPort 设置 SSH 端口

func (*SafeController) SetSshStatus

func (r *SafeController) SetSshStatus(ctx http.Context) http.Response

SetSshStatus 设置 SSH 状态

type SettingController

type SettingController struct {
	// contains filtered or unexported fields
}

func NewSettingController

func NewSettingController() *SettingController

func (*SettingController) GetHttps

func (r *SettingController) GetHttps(ctx http.Context) http.Response

GetHttps

@Summary	获取面板 HTTPS 设置
@Tags		面板设置
@Produce	json
@Security	BearerToken
@Success	200	{object}	SuccessResponse
@Router		/panel/setting/https [get]

func (*SettingController) List

List

@Summary	设置列表
@Tags		面板设置
@Produce	json
@Security	BearerToken
@Success	200	{object}	SuccessResponse
@Router		/panel/setting/list [get]

func (*SettingController) Update

func (r *SettingController) Update(ctx http.Context) http.Response

Update

@Summary	更新设置
@Tags		面板设置
@Accept		json
@Produce	json
@Security	BearerToken
@Param		data	body		requests.Update	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/setting/update [post]

func (*SettingController) UpdateHttps

func (r *SettingController) UpdateHttps(ctx http.Context) http.Response

UpdateHttps

@Summary	更新面板 HTTPS 设置
@Tags		面板设置
@Accept		json
@Produce	json
@Security	BearerToken
@Param		data	body		requests.Https	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/setting/https [post]

type SshController

type SshController struct {
	AuthMethod ssh.AuthMethod
	// contains filtered or unexported fields
}

func NewSshController

func NewSshController() *SshController

func (*SshController) GetInfo

func (r *SshController) GetInfo(ctx http.Context) http.Response

GetInfo 获取 SSH 配置

func (*SshController) Session

func (r *SshController) Session(ctx http.Context) http.Response

Session SSH 会话

func (*SshController) UpdateInfo

func (r *SshController) UpdateInfo(ctx http.Context) http.Response

UpdateInfo 更新 SSH 配置

type SuccessResponse

type SuccessResponse struct {
	Message string `json:"message"`
	Data    any    `json:"data"`
}

SuccessResponse 通用成功响应

type SwaggerController

type SwaggerController struct {
}

func NewSwaggerController

func NewSwaggerController() *SwaggerController

func (*SwaggerController) Index

func (r *SwaggerController) Index(ctx http.Context) http.Response

Index

@Summary		Swagger UI
@Description	Swagger UI
@Tags			Swagger
@Success		200
@Failure		500
@Router			/swagger [get]

type SystemController

type SystemController struct {
}

func NewSystemController

func NewSystemController() *SystemController

func (*SystemController) ServiceDisable

func (r *SystemController) ServiceDisable(ctx http.Context) http.Response

ServiceDisable

@Summary	禁用服务
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	body		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/disable [post]

func (*SystemController) ServiceEnable

func (r *SystemController) ServiceEnable(ctx http.Context) http.Response

ServiceEnable

@Summary	启用服务
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	body		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/enable [post]

func (*SystemController) ServiceIsEnabled

func (r *SystemController) ServiceIsEnabled(ctx http.Context) http.Response

ServiceIsEnabled

@Summary	是否启用服务
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	query		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/isEnabled [get]

func (*SystemController) ServiceReload

func (r *SystemController) ServiceReload(ctx http.Context) http.Response

ServiceReload

@Summary	重载服务
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	body		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/reload [post]

func (*SystemController) ServiceRestart

func (r *SystemController) ServiceRestart(ctx http.Context) http.Response

ServiceRestart

@Summary	重启服务
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	body		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/restart [post]

func (*SystemController) ServiceStart

func (r *SystemController) ServiceStart(ctx http.Context) http.Response

ServiceStart

@Summary	启动服务
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	body		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/start [post]

func (*SystemController) ServiceStatus

func (r *SystemController) ServiceStatus(ctx http.Context) http.Response

ServiceStatus

@Summary	服务状态
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	query		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/status [get]

func (*SystemController) ServiceStop

func (r *SystemController) ServiceStop(ctx http.Context) http.Response

ServiceStop

@Summary	停止服务
@Tags		系统
@Produce	json
@Security	BearerToken
@Param		data	body		string	true	"request"
@Success	200		{object}	controllers.SuccessResponse
@Router		/panel/system/service/stop [post]

type TaskController

type TaskController struct {
}

func NewTaskController

func NewTaskController() *TaskController

func (*TaskController) Delete

func (r *TaskController) Delete(ctx http.Context) http.Response

Delete 删除任务

func (*TaskController) List

func (r *TaskController) List(ctx http.Context) http.Response

List 获取任务列表

func (*TaskController) Log

func (r *TaskController) Log(ctx http.Context) http.Response

Log 获取任务日志

func (*TaskController) Status

func (r *TaskController) Status(ctx http.Context) http.Response

Status 获取当前任务状态

type UserController

type UserController struct {
}

func NewUserController

func NewUserController() *UserController

func (*UserController) Info

func (r *UserController) Info(ctx http.Context) http.Response

Info

@Summary	用户信息
@Tags		用户鉴权
@Produce	json
@Security	BearerToken
@Success	200	{object}	SuccessResponse
@Router		/panel/user/info [get]

func (*UserController) IsLogin

func (r *UserController) IsLogin(ctx http.Context) http.Response

IsLogin

@Summary	是否登录
@Tags		用户鉴权
@Produce	json
@Success	200	{object}	SuccessResponse
@Router		/panel/user/isLogin [get]

func (*UserController) Login

func (r *UserController) Login(ctx http.Context) http.Response

Login

@Summary	登录
@Tags		用户鉴权
@Accept		json
@Produce	json
@Param		data	body		requests.Login	true	"request"
@Success	200		{object}	SuccessResponse
@Failure	403		{object}	ErrorResponse	"用户名或密码错误"
@Failure	500		{object}	ErrorResponse	"系统内部错误
@Router		/panel/user/login [post]

func (*UserController) Logout

func (r *UserController) Logout(ctx http.Context) http.Response

Logout

@Summary	登出
@Tags		用户鉴权
@Produce	json
@Security	BearerToken
@Success	200	{object}	SuccessResponse
@Router		/panel/user/logout [post]

type WebsiteController

type WebsiteController struct {
	// contains filtered or unexported fields
}

func NewWebsiteController

func NewWebsiteController() *WebsiteController

func (*WebsiteController) Add

Add

@Summary	添加网站
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		data	body		requests.Add	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/websites [post]

func (*WebsiteController) BackupList

func (r *WebsiteController) BackupList(ctx http.Context) http.Response

BackupList

@Summary	获取网站备份列表
@Tags		网站
@Produce	json
@Security	BearerToken
@Param		data	query		commonrequests.Paginate	true	"request"
@Success	200		{object}	SuccessResponse{data=[]types.BackupFile}
@Router		/panel/website/backupList [get]

func (*WebsiteController) ClearLog

func (r *WebsiteController) ClearLog(ctx http.Context) http.Response

ClearLog

@Summary	清空网站日志
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id	path		int	true	"网站 ID"
@Success	200	{object}	SuccessResponse
@Router		/panel/websites/{id}/log [delete]

func (*WebsiteController) CreateBackup

func (r *WebsiteController) CreateBackup(ctx http.Context) http.Response

CreateBackup

@Summary	创建网站备份
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id	path		int	true	"网站 ID"
@Success	200	{object}	SuccessResponse
@Router		/panel/websites/{id}/createBackup [post]

func (*WebsiteController) Delete

func (r *WebsiteController) Delete(ctx http.Context) http.Response

Delete

@Summary	删除网站
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		data	body		requests.Delete	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/websites/delete [post]

func (*WebsiteController) DeleteBackup

func (r *WebsiteController) DeleteBackup(ctx http.Context) http.Response

DeleteBackup

@Summary	删除网站备份
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		data	body		requests.DeleteBackup	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/website/deleteBackup [delete]

func (*WebsiteController) GetConfig

func (r *WebsiteController) GetConfig(ctx http.Context) http.Response

GetConfig

@Summary	获取网站配置
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id	path		int	true	"网站 ID"
@Success	200	{object}	SuccessResponse{data=types.WebsiteAdd}
@Router		/panel/websites/{id}/config [get]

func (*WebsiteController) GetDefaultConfig

func (r *WebsiteController) GetDefaultConfig(ctx http.Context) http.Response

GetDefaultConfig

@Summary	获取默认配置
@Tags		网站
@Produce	json
@Security	BearerToken
@Success	200	{object}	SuccessResponse{data=map[string]string}
@Router		/panel/website/defaultConfig [get]

func (*WebsiteController) List

List

@Summary	获取网站列表
@Tags		网站
@Produce	json
@Security	BearerToken
@Param		data	query		commonrequests.Paginate	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/websites [get]

func (*WebsiteController) ResetConfig

func (r *WebsiteController) ResetConfig(ctx http.Context) http.Response

ResetConfig

@Summary	重置网站配置
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id	path		int	true	"网站 ID"
@Success	200	{object}	SuccessResponse
@Router		/panel/websites/{id}/resetConfig [post]

func (*WebsiteController) RestoreBackup

func (r *WebsiteController) RestoreBackup(ctx http.Context) http.Response

RestoreBackup

@Summary	还原网站备份
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id	path		int	true	"网站 ID"
@Success	200	{object}	SuccessResponse
@Router		/panel/websites/{id}/restoreBackup [post]

func (*WebsiteController) SaveConfig

func (r *WebsiteController) SaveConfig(ctx http.Context) http.Response

SaveConfig

@Summary	保存网站配置
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id		path		int					true	"网站 ID"
@Param		data	body		requests.SaveConfig	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/websites/{id}/config [post]

func (*WebsiteController) SaveDefaultConfig

func (r *WebsiteController) SaveDefaultConfig(ctx http.Context) http.Response

SaveDefaultConfig

@Summary	保存默认配置
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		data	body		map[string]string	true	"request"
@Success	200		{object}	SuccessResponse
@Router		/panel/website/defaultConfig [post]

func (*WebsiteController) Status

func (r *WebsiteController) Status(ctx http.Context) http.Response

Status

@Summary	获取网站状态
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id	path		int	true	"网站 ID"
@Success	200	{object}	SuccessResponse
@Router		/panel/websites/{id}/status [post]

func (*WebsiteController) UpdateRemark

func (r *WebsiteController) UpdateRemark(ctx http.Context) http.Response

UpdateRemark

@Summary	更新网站备注
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		id	path		int	true	"网站 ID"
@Success	200	{object}	SuccessResponse
@Router		/panel/websites/{id}/updateRemark [post]

func (*WebsiteController) UploadBackup

func (r *WebsiteController) UploadBackup(ctx http.Context) http.Response

UploadBackup

@Summary	上传网站备份
@Tags		网站
@Accept		json
@Produce	json
@Security	BearerToken
@Param		file	formData	file	true	"备份文件"
@Success	200		{object}	SuccessResponse
@Router		/panel/website/uploadBackup [put]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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