service

package
v0.0.0-...-8f1b69b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: BSD-3-Clause Imports: 81 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is service providers.

Functions

func Bind

func Bind[T any](r *http.Request) (*T, error)

Bind 验证并绑定请求参数

func Error

func Error(w http.ResponseWriter, code int, format string, args ...any)

Error 响应错误

func ErrorSystem

func ErrorSystem(w http.ResponseWriter)

ErrorSystem 响应系统错误

func Paginate

func Paginate[T any](r *http.Request, items []T) (pagedItems []T, total uint)

Paginate 取分页条目

func Success

func Success(w http.ResponseWriter, data any)

Success 响应成功

Types

type AppService

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

func NewAppService

func NewAppService(t *gotext.Locale, app biz.AppRepo, cache biz.CacheRepo, setting biz.SettingRepo) *AppService

func (*AppService) Categories

func (s *AppService) Categories(w http.ResponseWriter, r *http.Request)

func (*AppService) Install

func (s *AppService) Install(w http.ResponseWriter, r *http.Request)

func (*AppService) IsInstalled

func (s *AppService) IsInstalled(w http.ResponseWriter, r *http.Request)

func (*AppService) List

func (s *AppService) List(w http.ResponseWriter, r *http.Request)

func (*AppService) Uninstall

func (s *AppService) Uninstall(w http.ResponseWriter, r *http.Request)

func (*AppService) Update

func (s *AppService) Update(w http.ResponseWriter, r *http.Request)

func (*AppService) UpdateCache

func (s *AppService) UpdateCache(w http.ResponseWriter, r *http.Request)

func (*AppService) UpdateOrder

func (s *AppService) UpdateOrder(w http.ResponseWriter, r *http.Request)

func (*AppService) UpdateShow

func (s *AppService) UpdateShow(w http.ResponseWriter, r *http.Request)

type BackupAccountService

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

func NewBackupAccountService

func NewBackupAccountService(backupAccount biz.BackupAccountRepo) *BackupAccountService

func (*BackupAccountService) Create

func (*BackupAccountService) Delete

func (*BackupAccountService) Get

func (*BackupAccountService) List

func (*BackupAccountService) Update

type BackupService

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

func NewBackupService

func NewBackupService(t *gotext.Locale, backup biz.BackupRepo) *BackupService

func (*BackupService) Create

func (s *BackupService) Create(w http.ResponseWriter, r *http.Request)

func (*BackupService) Delete

func (s *BackupService) Delete(w http.ResponseWriter, r *http.Request)

func (*BackupService) List

func (s *BackupService) List(w http.ResponseWriter, r *http.Request)

func (*BackupService) Restore

func (s *BackupService) Restore(w http.ResponseWriter, r *http.Request)

func (*BackupService) Upload

func (s *BackupService) Upload(w http.ResponseWriter, r *http.Request)

type CertAccountService

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

func NewCertAccountService

func NewCertAccountService(certAccount biz.CertAccountRepo) *CertAccountService

func (*CertAccountService) Create

func (*CertAccountService) Delete

func (*CertAccountService) Get

func (*CertAccountService) List

func (*CertAccountService) Update

type CertDNSService

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

func NewCertDNSService

func NewCertDNSService(certDNS biz.CertDNSRepo) *CertDNSService

func (*CertDNSService) Create

func (s *CertDNSService) Create(w http.ResponseWriter, r *http.Request)

func (*CertDNSService) Delete

func (s *CertDNSService) Delete(w http.ResponseWriter, r *http.Request)

func (*CertDNSService) Get

func (*CertDNSService) List

func (*CertDNSService) Update

func (s *CertDNSService) Update(w http.ResponseWriter, r *http.Request)

type CertService

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

func NewCertService

func NewCertService(t *gotext.Locale, cert biz.CertRepo) *CertService

func (*CertService) Algorithms

func (s *CertService) Algorithms(w http.ResponseWriter, r *http.Request)

func (*CertService) CAProviders

func (s *CertService) CAProviders(w http.ResponseWriter, r *http.Request)

func (*CertService) Create

func (s *CertService) Create(w http.ResponseWriter, r *http.Request)

func (*CertService) DNSProviders

func (s *CertService) DNSProviders(w http.ResponseWriter, r *http.Request)

func (*CertService) Delete

func (s *CertService) Delete(w http.ResponseWriter, r *http.Request)

func (*CertService) Deploy

func (s *CertService) Deploy(w http.ResponseWriter, r *http.Request)

func (*CertService) Get

func (s *CertService) Get(w http.ResponseWriter, r *http.Request)

func (*CertService) List

func (s *CertService) List(w http.ResponseWriter, r *http.Request)

func (*CertService) ManualDNS

func (s *CertService) ManualDNS(w http.ResponseWriter, r *http.Request)

func (*CertService) ObtainAuto

func (s *CertService) ObtainAuto(w http.ResponseWriter, r *http.Request)

func (*CertService) ObtainManual

func (s *CertService) ObtainManual(w http.ResponseWriter, r *http.Request)

func (*CertService) ObtainSelfSigned

func (s *CertService) ObtainSelfSigned(w http.ResponseWriter, r *http.Request)

func (*CertService) Renew

func (s *CertService) Renew(w http.ResponseWriter, r *http.Request)

func (*CertService) Update

func (s *CertService) Update(w http.ResponseWriter, r *http.Request)

func (*CertService) Upload

func (s *CertService) Upload(w http.ResponseWriter, r *http.Request)

type CliService

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

func NewCliService

func NewCliService(t *gotext.Locale, conf *config.Config, db *gorm.DB, appRepo biz.AppRepo, cache biz.CacheRepo, user biz.UserRepo, setting biz.SettingRepo, backup biz.BackupRepo, website biz.WebsiteRepo, databaseServer biz.DatabaseServerRepo, cert biz.CertRepo, certAccount biz.CertAccountRepo) *CliService

func (*CliService) AppInstall

func (s *CliService) AppInstall(ctx context.Context, cmd *cli.Command) error

func (*CliService) AppRemove

func (s *CliService) AppRemove(ctx context.Context, cmd *cli.Command) error

func (*CliService) AppUnInstall

func (s *CliService) AppUnInstall(ctx context.Context, cmd *cli.Command) error

func (*CliService) AppUpdate

func (s *CliService) AppUpdate(ctx context.Context, cmd *cli.Command) error

func (*CliService) AppWrite

func (s *CliService) AppWrite(ctx context.Context, cmd *cli.Command) error

func (*CliService) BackupClear

func (s *CliService) BackupClear(ctx context.Context, cmd *cli.Command) error

func (*CliService) BackupDatabase

func (s *CliService) BackupDatabase(ctx context.Context, cmd *cli.Command) error

func (*CliService) BackupPanel

func (s *CliService) BackupPanel(ctx context.Context, cmd *cli.Command) error

func (*CliService) BackupWebsite

func (s *CliService) BackupWebsite(ctx context.Context, cmd *cli.Command) error

func (*CliService) BindDomainOff

func (s *CliService) BindDomainOff(ctx context.Context, cmd *cli.Command) error

func (*CliService) BindIPOff

func (s *CliService) BindIPOff(ctx context.Context, cmd *cli.Command) error

func (*CliService) BindUAOff

func (s *CliService) BindUAOff(ctx context.Context, cmd *cli.Command) error

func (*CliService) ClearTask

func (s *CliService) ClearTask(ctx context.Context, cmd *cli.Command) error

func (*CliService) CutoffClear

func (s *CliService) CutoffClear(ctx context.Context, cmd *cli.Command) error

func (*CliService) CutoffWebsite

func (s *CliService) CutoffWebsite(ctx context.Context, cmd *cli.Command) error

func (*CliService) DatabaseAddServer

func (s *CliService) DatabaseAddServer(ctx context.Context, cmd *cli.Command) error

func (*CliService) DatabaseDeleteServer

func (s *CliService) DatabaseDeleteServer(ctx context.Context, cmd *cli.Command) error

func (*CliService) EntranceOff

func (s *CliService) EntranceOff(ctx context.Context, cmd *cli.Command) error

func (*CliService) EntranceOn

func (s *CliService) EntranceOn(ctx context.Context, cmd *cli.Command) error

func (*CliService) Fix

func (s *CliService) Fix(ctx context.Context, cmd *cli.Command) error

func (*CliService) GetSetting

func (s *CliService) GetSetting(ctx context.Context, cmd *cli.Command) error

func (*CliService) HTTPSGenerate

func (s *CliService) HTTPSGenerate(ctx context.Context, cmd *cli.Command) error

func (*CliService) HTTPSOff

func (s *CliService) HTTPSOff(ctx context.Context, cmd *cli.Command) error

func (*CliService) HTTPSOn

func (s *CliService) HTTPSOn(ctx context.Context, cmd *cli.Command) error

func (*CliService) Info

func (s *CliService) Info(ctx context.Context, cmd *cli.Command) error

func (*CliService) Init

func (s *CliService) Init(ctx context.Context, cmd *cli.Command) error

func (*CliService) Port

func (s *CliService) Port(ctx context.Context, cmd *cli.Command) error

func (*CliService) RemoveSetting

func (s *CliService) RemoveSetting(ctx context.Context, cmd *cli.Command) error

func (*CliService) Restart

func (s *CliService) Restart(ctx context.Context, cmd *cli.Command) error

func (*CliService) Start

func (s *CliService) Start(ctx context.Context, cmd *cli.Command) error

func (*CliService) Stop

func (s *CliService) Stop(ctx context.Context, cmd *cli.Command) error

func (*CliService) Sync

func (s *CliService) Sync(ctx context.Context, cmd *cli.Command) error

func (*CliService) SyncTime

func (s *CliService) SyncTime(ctx context.Context, cmd *cli.Command) error

func (*CliService) Update

func (s *CliService) Update(ctx context.Context, cmd *cli.Command) error

func (*CliService) UserList

func (s *CliService) UserList(ctx context.Context, cmd *cli.Command) error

func (*CliService) UserName

func (s *CliService) UserName(ctx context.Context, cmd *cli.Command) error

func (*CliService) UserPassword

func (s *CliService) UserPassword(ctx context.Context, cmd *cli.Command) error

func (*CliService) UserTwoFA

func (s *CliService) UserTwoFA(ctx context.Context, cmd *cli.Command) error

func (*CliService) WebsiteCreate

func (s *CliService) WebsiteCreate(ctx context.Context, cmd *cli.Command) error

func (*CliService) WebsiteDelete

func (s *CliService) WebsiteDelete(ctx context.Context, cmd *cli.Command) error

func (*CliService) WebsiteRemove

func (s *CliService) WebsiteRemove(ctx context.Context, cmd *cli.Command) error

func (*CliService) WebsiteWrite

func (s *CliService) WebsiteWrite(ctx context.Context, cmd *cli.Command) error

func (*CliService) WriteSetting

func (s *CliService) WriteSetting(ctx context.Context, cmd *cli.Command) error

type ContainerComposeService

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

func NewContainerComposeService

func NewContainerComposeService(containerCompose biz.ContainerComposeRepo) *ContainerComposeService

func (*ContainerComposeService) Create

func (*ContainerComposeService) Down

func (*ContainerComposeService) Get

func (*ContainerComposeService) List

func (*ContainerComposeService) Remove

func (*ContainerComposeService) Up

func (*ContainerComposeService) Update

type ContainerImageService

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

func NewContainerImageService

func NewContainerImageService(containerImage biz.ContainerImageRepo) *ContainerImageService

func (*ContainerImageService) Exist

func (*ContainerImageService) List

func (*ContainerImageService) Prune

func (*ContainerImageService) Pull

func (*ContainerImageService) Remove

type ContainerNetworkService

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

func NewContainerNetworkService

func NewContainerNetworkService(containerNetwork biz.ContainerNetworkRepo) *ContainerNetworkService

func (*ContainerNetworkService) Create

func (*ContainerNetworkService) List

func (*ContainerNetworkService) Prune

func (*ContainerNetworkService) Remove

type ContainerService

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

func NewContainerService

func NewContainerService(container biz.ContainerRepo) *ContainerService

func (*ContainerService) Create

func (s *ContainerService) Create(w http.ResponseWriter, r *http.Request)

func (*ContainerService) Kill

func (*ContainerService) List

func (*ContainerService) Logs

func (*ContainerService) Pause

func (*ContainerService) Prune

func (*ContainerService) Remove

func (s *ContainerService) Remove(w http.ResponseWriter, r *http.Request)

func (*ContainerService) Rename

func (s *ContainerService) Rename(w http.ResponseWriter, r *http.Request)

func (*ContainerService) Restart

func (s *ContainerService) Restart(w http.ResponseWriter, r *http.Request)

func (*ContainerService) Search

func (s *ContainerService) Search(w http.ResponseWriter, r *http.Request)

func (*ContainerService) Start

func (*ContainerService) Stop

func (*ContainerService) Unpause

func (s *ContainerService) Unpause(w http.ResponseWriter, r *http.Request)

type ContainerVolumeService

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

func NewContainerVolumeService

func NewContainerVolumeService(containerVolume biz.ContainerVolumeRepo) *ContainerVolumeService

func (*ContainerVolumeService) Create

func (*ContainerVolumeService) List

func (*ContainerVolumeService) Prune

func (*ContainerVolumeService) Remove

type CronService

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

func NewCronService

func NewCronService(cron biz.CronRepo) *CronService

func (*CronService) Create

func (s *CronService) Create(w http.ResponseWriter, r *http.Request)

func (*CronService) Delete

func (s *CronService) Delete(w http.ResponseWriter, r *http.Request)

func (*CronService) Get

func (s *CronService) Get(w http.ResponseWriter, r *http.Request)

func (*CronService) List

func (s *CronService) List(w http.ResponseWriter, r *http.Request)

func (*CronService) Status

func (s *CronService) Status(w http.ResponseWriter, r *http.Request)

func (*CronService) Update

func (s *CronService) Update(w http.ResponseWriter, r *http.Request)

type DatabaseServerService

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

func NewDatabaseServerService

func NewDatabaseServerService(databaseServer biz.DatabaseServerRepo) *DatabaseServerService

func (*DatabaseServerService) Create

func (*DatabaseServerService) Delete

func (*DatabaseServerService) Get

func (*DatabaseServerService) List

func (*DatabaseServerService) Sync

func (*DatabaseServerService) Update

func (*DatabaseServerService) UpdateRemark

func (s *DatabaseServerService) UpdateRemark(w http.ResponseWriter, r *http.Request)

type DatabaseService

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

func NewDatabaseService

func NewDatabaseService(database biz.DatabaseRepo) *DatabaseService

func (*DatabaseService) Comment

func (s *DatabaseService) Comment(w http.ResponseWriter, r *http.Request)

func (*DatabaseService) Create

func (s *DatabaseService) Create(w http.ResponseWriter, r *http.Request)

func (*DatabaseService) Delete

func (s *DatabaseService) Delete(w http.ResponseWriter, r *http.Request)

func (*DatabaseService) List

type DatabaseUserService

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

func NewDatabaseUserService

func NewDatabaseUserService(databaseUser biz.DatabaseUserRepo) *DatabaseUserService

func (*DatabaseUserService) Create

func (*DatabaseUserService) Delete

func (*DatabaseUserService) Get

func (*DatabaseUserService) List

func (*DatabaseUserService) Update

func (*DatabaseUserService) UpdateRemark

func (s *DatabaseUserService) UpdateRemark(w http.ResponseWriter, r *http.Request)

type EnvironmentGoService

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

func NewEnvironmentGoService

func NewEnvironmentGoService(t *gotext.Locale, environmentRepo biz.EnvironmentRepo) *EnvironmentGoService

func (*EnvironmentGoService) GetProxy

func (*EnvironmentGoService) SetCli

func (*EnvironmentGoService) SetProxy

type EnvironmentJavaService

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

func NewEnvironmentJavaService

func NewEnvironmentJavaService(t *gotext.Locale, environmentRepo biz.EnvironmentRepo) *EnvironmentJavaService

func (*EnvironmentJavaService) SetCli

type EnvironmentNodejsService

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

func NewEnvironmentNodejsService

func NewEnvironmentNodejsService(t *gotext.Locale, environmentRepo biz.EnvironmentRepo) *EnvironmentNodejsService

func (*EnvironmentNodejsService) GetRegistry

func (*EnvironmentNodejsService) SetCli

func (*EnvironmentNodejsService) SetRegistry

type EnvironmentPHPService

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

func NewEnvironmentPHPService

func NewEnvironmentPHPService(t *gotext.Locale, conf *config.Config, environmentRepo biz.EnvironmentRepo, taskRepo biz.TaskRepo) *EnvironmentPHPService

func (*EnvironmentPHPService) ClearLog

func (*EnvironmentPHPService) ClearSlowLog

func (s *EnvironmentPHPService) ClearSlowLog(w http.ResponseWriter, r *http.Request)

func (*EnvironmentPHPService) GetConfig

func (*EnvironmentPHPService) GetFPMConfig

func (s *EnvironmentPHPService) GetFPMConfig(w http.ResponseWriter, r *http.Request)

func (*EnvironmentPHPService) InstallModule

func (s *EnvironmentPHPService) InstallModule(w http.ResponseWriter, r *http.Request)

func (*EnvironmentPHPService) Load

func (*EnvironmentPHPService) Log

func (*EnvironmentPHPService) ModuleList

func (s *EnvironmentPHPService) ModuleList(w http.ResponseWriter, r *http.Request)

func (*EnvironmentPHPService) PHPInfo

func (*EnvironmentPHPService) SetCli

func (*EnvironmentPHPService) SlowLog

func (*EnvironmentPHPService) UninstallModule

func (s *EnvironmentPHPService) UninstallModule(w http.ResponseWriter, r *http.Request)

func (*EnvironmentPHPService) UpdateConfig

func (s *EnvironmentPHPService) UpdateConfig(w http.ResponseWriter, r *http.Request)

func (*EnvironmentPHPService) UpdateFPMConfig

func (s *EnvironmentPHPService) UpdateFPMConfig(w http.ResponseWriter, r *http.Request)

type EnvironmentPythonService

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

func NewEnvironmentPythonService

func NewEnvironmentPythonService(t *gotext.Locale, environmentRepo biz.EnvironmentRepo) *EnvironmentPythonService

func (*EnvironmentPythonService) GetMirror

func (*EnvironmentPythonService) SetCli

func (*EnvironmentPythonService) SetMirror

type EnvironmentService

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

func NewEnvironmentService

func NewEnvironmentService(t *gotext.Locale, environmentRepo biz.EnvironmentRepo, taskRepo biz.TaskRepo) *EnvironmentService

func (*EnvironmentService) Install

func (*EnvironmentService) IsInstalled

func (s *EnvironmentService) IsInstalled(w http.ResponseWriter, r *http.Request)

func (*EnvironmentService) List

func (*EnvironmentService) Types

func (*EnvironmentService) Uninstall

func (s *EnvironmentService) Uninstall(w http.ResponseWriter, r *http.Request)

func (*EnvironmentService) Update

type ErrorResponse

type ErrorResponse struct {
	Msg string `json:"msg"`
}

ErrorResponse 通用错误响应

type FileService

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

func NewFileService

func NewFileService(t *gotext.Locale, task biz.TaskRepo) *FileService

func (*FileService) ChunkUploadChunk

func (s *FileService) ChunkUploadChunk(w http.ResponseWriter, r *http.Request)

ChunkUploadChunk 上传单个分块

func (*FileService) ChunkUploadFinish

func (s *FileService) ChunkUploadFinish(w http.ResponseWriter, r *http.Request)

ChunkUploadFinish 完成分块上传

func (*FileService) ChunkUploadStart

func (s *FileService) ChunkUploadStart(w http.ResponseWriter, r *http.Request)

ChunkUploadStart 开始分块上传

func (*FileService) Compress

func (s *FileService) Compress(w http.ResponseWriter, r *http.Request)

func (*FileService) Content

func (s *FileService) Content(w http.ResponseWriter, r *http.Request)

func (*FileService) Copy

func (s *FileService) Copy(w http.ResponseWriter, r *http.Request)

func (*FileService) Create

func (s *FileService) Create(w http.ResponseWriter, r *http.Request)

func (*FileService) Delete

func (s *FileService) Delete(w http.ResponseWriter, r *http.Request)

func (*FileService) Download

func (s *FileService) Download(w http.ResponseWriter, r *http.Request)

func (*FileService) Exist

func (s *FileService) Exist(w http.ResponseWriter, r *http.Request)

func (*FileService) Info

func (s *FileService) Info(w http.ResponseWriter, r *http.Request)

func (*FileService) List

func (s *FileService) List(w http.ResponseWriter, r *http.Request)

func (*FileService) Move

func (s *FileService) Move(w http.ResponseWriter, r *http.Request)

func (*FileService) Permission

func (s *FileService) Permission(w http.ResponseWriter, r *http.Request)

func (*FileService) RemoteDownload

func (s *FileService) RemoteDownload(w http.ResponseWriter, r *http.Request)

func (*FileService) Save

func (s *FileService) Save(w http.ResponseWriter, r *http.Request)

func (*FileService) Size

func (s *FileService) Size(w http.ResponseWriter, r *http.Request)

Size 计算大小

func (*FileService) UnCompress

func (s *FileService) UnCompress(w http.ResponseWriter, r *http.Request)

func (*FileService) Upload

func (s *FileService) Upload(w http.ResponseWriter, r *http.Request)

type FirewallService

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

func NewFirewallService

func NewFirewallService() *FirewallService

func (*FirewallService) CreateForward

func (s *FirewallService) CreateForward(w http.ResponseWriter, r *http.Request)

func (*FirewallService) CreateIPRule

func (s *FirewallService) CreateIPRule(w http.ResponseWriter, r *http.Request)

func (*FirewallService) CreateRule

func (s *FirewallService) CreateRule(w http.ResponseWriter, r *http.Request)

func (*FirewallService) DeleteForward

func (s *FirewallService) DeleteForward(w http.ResponseWriter, r *http.Request)

func (*FirewallService) DeleteIPRule

func (s *FirewallService) DeleteIPRule(w http.ResponseWriter, r *http.Request)

func (*FirewallService) DeleteRule

func (s *FirewallService) DeleteRule(w http.ResponseWriter, r *http.Request)

func (*FirewallService) GetForwards

func (s *FirewallService) GetForwards(w http.ResponseWriter, r *http.Request)

func (*FirewallService) GetIPRules

func (s *FirewallService) GetIPRules(w http.ResponseWriter, r *http.Request)

func (*FirewallService) GetRules

func (s *FirewallService) GetRules(w http.ResponseWriter, r *http.Request)

func (*FirewallService) GetStatus

func (s *FirewallService) GetStatus(w http.ResponseWriter, r *http.Request)

func (*FirewallService) UpdateStatus

func (s *FirewallService) UpdateStatus(w http.ResponseWriter, r *http.Request)

type HomeService

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

func NewHomeService

func NewHomeService(t *gotext.Locale, conf *config.Config, task biz.TaskRepo, website biz.WebsiteRepo, appRepo biz.AppRepo, environment biz.EnvironmentRepo, setting biz.SettingRepo, cron biz.CronRepo, backupRepo biz.BackupRepo) *HomeService

func (*HomeService) Apps

func (s *HomeService) Apps(w http.ResponseWriter, r *http.Request)

func (*HomeService) CheckUpdate

func (s *HomeService) CheckUpdate(w http.ResponseWriter, r *http.Request)

func (*HomeService) CountInfo

func (s *HomeService) CountInfo(w http.ResponseWriter, r *http.Request)

func (*HomeService) Current

func (s *HomeService) Current(w http.ResponseWriter, r *http.Request)

func (*HomeService) InstalledEnvironment

func (s *HomeService) InstalledEnvironment(w http.ResponseWriter, r *http.Request)

func (*HomeService) Panel

func (s *HomeService) Panel(w http.ResponseWriter, r *http.Request)

func (*HomeService) Restart

func (s *HomeService) Restart(w http.ResponseWriter, r *http.Request)

func (*HomeService) SystemInfo

func (s *HomeService) SystemInfo(w http.ResponseWriter, r *http.Request)

func (*HomeService) Update

func (s *HomeService) Update(w http.ResponseWriter, r *http.Request)

func (*HomeService) UpdateInfo

func (s *HomeService) UpdateInfo(w http.ResponseWriter, r *http.Request)

type LogItem

type LogItem struct {
	Name string `json:"name"` // 日志名称
	Path string `json:"path"` // 日志路径
	Size string `json:"size"` // 日志大小
}

LogItem 日志项信息

type LogService

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

func NewLogService

func NewLogService(logRepo biz.LogRepo) *LogService

func (*LogService) List

func (s *LogService) List(w http.ResponseWriter, r *http.Request)

List 获取日志列表

type MonitorService

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

func NewMonitorService

func NewMonitorService(setting biz.SettingRepo, monitor biz.MonitorRepo) *MonitorService

func (*MonitorService) Clear

func (s *MonitorService) Clear(w http.ResponseWriter, r *http.Request)

func (*MonitorService) GetSetting

func (s *MonitorService) GetSetting(w http.ResponseWriter, r *http.Request)

func (*MonitorService) List

func (*MonitorService) UpdateSetting

func (s *MonitorService) UpdateSetting(w http.ResponseWriter, r *http.Request)

type ProcessService

type ProcessService struct {
}

func NewProcessService

func NewProcessService() *ProcessService

func (*ProcessService) Detail

func (s *ProcessService) Detail(w http.ResponseWriter, r *http.Request)

Detail 获取进程详情

func (*ProcessService) Kill

func (*ProcessService) List

func (*ProcessService) Signal

func (s *ProcessService) Signal(w http.ResponseWriter, r *http.Request)

Signal 向进程发送信号

type ProjectService

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

func NewProjectService

func NewProjectService(project biz.ProjectRepo, setting biz.SettingRepo) *ProjectService

func (*ProjectService) Create

func (s *ProjectService) Create(w http.ResponseWriter, r *http.Request)

func (*ProjectService) Delete

func (s *ProjectService) Delete(w http.ResponseWriter, r *http.Request)

func (*ProjectService) Get

func (*ProjectService) List

func (*ProjectService) Update

func (s *ProjectService) Update(w http.ResponseWriter, r *http.Request)

type SSHService

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

func NewSSHService

func NewSSHService(ssh biz.SSHRepo) *SSHService

func (*SSHService) Create

func (s *SSHService) Create(w http.ResponseWriter, r *http.Request)

func (*SSHService) Delete

func (s *SSHService) Delete(w http.ResponseWriter, r *http.Request)

func (*SSHService) Get

func (s *SSHService) Get(w http.ResponseWriter, r *http.Request)

func (*SSHService) List

func (s *SSHService) List(w http.ResponseWriter, r *http.Request)

func (*SSHService) Update

func (s *SSHService) Update(w http.ResponseWriter, r *http.Request)

type SafeService

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

func NewSafeService

func NewSafeService(safe biz.SafeRepo) *SafeService

func (*SafeService) GetPingStatus

func (s *SafeService) GetPingStatus(w http.ResponseWriter, r *http.Request)

func (*SafeService) GetSSH

func (s *SafeService) GetSSH(w http.ResponseWriter, r *http.Request)

func (*SafeService) UpdatePingStatus

func (s *SafeService) UpdatePingStatus(w http.ResponseWriter, r *http.Request)

func (*SafeService) UpdateSSH

func (s *SafeService) UpdateSSH(w http.ResponseWriter, r *http.Request)

type SettingService

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

func NewSettingService

func NewSettingService(t *gotext.Locale, db *gorm.DB, setting biz.SettingRepo, cert biz.CertRepo, certAccount biz.CertAccountRepo) *SettingService

func (*SettingService) Get

func (*SettingService) ObtainCert

func (s *SettingService) ObtainCert(w http.ResponseWriter, r *http.Request)

func (*SettingService) Update

func (s *SettingService) Update(w http.ResponseWriter, r *http.Request)

func (*SettingService) UpdateCert

func (s *SettingService) UpdateCert(w http.ResponseWriter, r *http.Request)

UpdateCert 用于自动化工具更新证书

type SuccessResponse

type SuccessResponse struct {
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

SuccessResponse 通用成功响应

type SystemctlService

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

func NewSystemctlService

func NewSystemctlService(t *gotext.Locale) *SystemctlService

func (*SystemctlService) Disable

func (s *SystemctlService) Disable(w http.ResponseWriter, r *http.Request)

func (*SystemctlService) Enable

func (s *SystemctlService) Enable(w http.ResponseWriter, r *http.Request)

func (*SystemctlService) IsEnabled

func (s *SystemctlService) IsEnabled(w http.ResponseWriter, r *http.Request)

func (*SystemctlService) Reload

func (s *SystemctlService) Reload(w http.ResponseWriter, r *http.Request)

func (*SystemctlService) Restart

func (s *SystemctlService) Restart(w http.ResponseWriter, r *http.Request)

func (*SystemctlService) Start

func (*SystemctlService) Status

func (s *SystemctlService) Status(w http.ResponseWriter, r *http.Request)

func (*SystemctlService) Stop

type TaskService

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

func NewTaskService

func NewTaskService(task biz.TaskRepo) *TaskService

func (*TaskService) Delete

func (s *TaskService) Delete(w http.ResponseWriter, r *http.Request)

func (*TaskService) Get

func (s *TaskService) Get(w http.ResponseWriter, r *http.Request)

func (*TaskService) List

func (s *TaskService) List(w http.ResponseWriter, r *http.Request)

func (*TaskService) Status

func (s *TaskService) Status(w http.ResponseWriter, r *http.Request)

type TemplateService

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

func NewTemplateService

func NewTemplateService(t *gotext.Locale, template biz.TemplateRepo, setting biz.SettingRepo) *TemplateService

func (*TemplateService) Callback

func (s *TemplateService) Callback(w http.ResponseWriter, r *http.Request)

Callback 模版下载回调

func (*TemplateService) Create

func (s *TemplateService) Create(w http.ResponseWriter, r *http.Request)

Create 使用模版创建编排

func (*TemplateService) Get

Get 获取模版详情

func (*TemplateService) List

List 获取所有模版

type ToolboxBenchmarkService

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

func NewToolboxBenchmarkService

func NewToolboxBenchmarkService(t *gotext.Locale) *ToolboxBenchmarkService

func (*ToolboxBenchmarkService) Test

Test 运行测试

type ToolboxDiskService

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

func NewToolboxDiskService

func NewToolboxDiskService(t *gotext.Locale) *ToolboxDiskService

func (*ToolboxDiskService) CreateLV

func (s *ToolboxDiskService) CreateLV(w http.ResponseWriter, r *http.Request)

CreateLV 创建逻辑卷

func (*ToolboxDiskService) CreatePV

func (s *ToolboxDiskService) CreatePV(w http.ResponseWriter, r *http.Request)

CreatePV 创建物理卷

func (*ToolboxDiskService) CreateVG

func (s *ToolboxDiskService) CreateVG(w http.ResponseWriter, r *http.Request)

CreateVG 创建卷组

func (*ToolboxDiskService) DeleteFstab

func (s *ToolboxDiskService) DeleteFstab(w http.ResponseWriter, r *http.Request)

DeleteFstab 删除 fstab 条目

func (*ToolboxDiskService) ExtendLV

func (s *ToolboxDiskService) ExtendLV(w http.ResponseWriter, r *http.Request)

ExtendLV 扩容逻辑卷

func (*ToolboxDiskService) Format

Format 格式化分区

func (*ToolboxDiskService) GetFstab

func (s *ToolboxDiskService) GetFstab(w http.ResponseWriter, r *http.Request)

GetFstab 获取 fstab 列表

func (*ToolboxDiskService) GetLVMInfo

func (s *ToolboxDiskService) GetLVMInfo(w http.ResponseWriter, r *http.Request)

GetLVMInfo 获取LVM信息

func (*ToolboxDiskService) GetPartitions

func (s *ToolboxDiskService) GetPartitions(w http.ResponseWriter, r *http.Request)

GetPartitions 获取分区列表

func (*ToolboxDiskService) Init

Init 初始化磁盘(删除所有分区,创建单个分区并格式化)

func (*ToolboxDiskService) List

List 获取磁盘列表

func (*ToolboxDiskService) Mount

Mount 挂载分区

func (*ToolboxDiskService) RemoveLV

func (s *ToolboxDiskService) RemoveLV(w http.ResponseWriter, r *http.Request)

RemoveLV 删除逻辑卷

func (*ToolboxDiskService) RemovePV

func (s *ToolboxDiskService) RemovePV(w http.ResponseWriter, r *http.Request)

RemovePV 删除物理卷

func (*ToolboxDiskService) RemoveVG

func (s *ToolboxDiskService) RemoveVG(w http.ResponseWriter, r *http.Request)

RemoveVG 删除卷组

func (*ToolboxDiskService) Umount

Umount 卸载分区

type ToolboxLogService

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

func NewToolboxLogService

func NewToolboxLogService(t *gotext.Locale, db *gorm.DB, containerImageRepo biz.ContainerImageRepo, settingRepo biz.SettingRepo) *ToolboxLogService

func (*ToolboxLogService) Clean

Clean 清理日志

func (*ToolboxLogService) Scan

Scan 扫描日志

type ToolboxSSHService

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

func NewToolboxSSHService

func NewToolboxSSHService(t *gotext.Locale) *ToolboxSSHService

func (*ToolboxSSHService) GenerateRootKey

func (s *ToolboxSSHService) GenerateRootKey(w http.ResponseWriter, r *http.Request)

GenerateRootKey 生成 Root 密钥对

func (*ToolboxSSHService) GetInfo

func (s *ToolboxSSHService) GetInfo(w http.ResponseWriter, r *http.Request)

GetInfo 获取 SSH 信息

func (*ToolboxSSHService) GetRootKey

func (s *ToolboxSSHService) GetRootKey(w http.ResponseWriter, r *http.Request)

GetRootKey 获取 Root 私钥

func (*ToolboxSSHService) UpdatePasswordAuth

func (s *ToolboxSSHService) UpdatePasswordAuth(w http.ResponseWriter, r *http.Request)

UpdatePasswordAuth 设置密码认证

func (*ToolboxSSHService) UpdatePort

func (s *ToolboxSSHService) UpdatePort(w http.ResponseWriter, r *http.Request)

UpdatePort 修改 SSH 端口

func (*ToolboxSSHService) UpdatePubKeyAuth

func (s *ToolboxSSHService) UpdatePubKeyAuth(w http.ResponseWriter, r *http.Request)

UpdatePubKeyAuth 设置密钥认证

func (*ToolboxSSHService) UpdateRootLogin

func (s *ToolboxSSHService) UpdateRootLogin(w http.ResponseWriter, r *http.Request)

UpdateRootLogin 设置 Root 登录

func (*ToolboxSSHService) UpdateRootPassword

func (s *ToolboxSSHService) UpdateRootPassword(w http.ResponseWriter, r *http.Request)

UpdateRootPassword 修改 Root 密码

type ToolboxSystemService

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

func NewToolboxSystemService

func NewToolboxSystemService(t *gotext.Locale) *ToolboxSystemService

func (*ToolboxSystemService) GetDNS

GetDNS 获取 DNS 信息

func (*ToolboxSystemService) GetHostname

func (s *ToolboxSystemService) GetHostname(w http.ResponseWriter, r *http.Request)

GetHostname 获取主机名

func (*ToolboxSystemService) GetHosts

GetHosts 获取 hosts 信息

func (*ToolboxSystemService) GetNTPServers

func (s *ToolboxSystemService) GetNTPServers(w http.ResponseWriter, r *http.Request)

GetNTPServers 获取系统 NTP 服务器配置

func (*ToolboxSystemService) GetSWAP

GetSWAP 获取 SWAP 信息

func (*ToolboxSystemService) GetTimezone

func (s *ToolboxSystemService) GetTimezone(w http.ResponseWriter, r *http.Request)

GetTimezone 获取时区

func (*ToolboxSystemService) SyncTime

SyncTime 同步时间

func (*ToolboxSystemService) UpdateDNS

func (s *ToolboxSystemService) UpdateDNS(w http.ResponseWriter, r *http.Request)

UpdateDNS 设置 DNS 信息

func (*ToolboxSystemService) UpdateHostname

func (s *ToolboxSystemService) UpdateHostname(w http.ResponseWriter, r *http.Request)

UpdateHostname 设置主机名

func (*ToolboxSystemService) UpdateHosts

func (s *ToolboxSystemService) UpdateHosts(w http.ResponseWriter, r *http.Request)

UpdateHosts 设置 hosts 信息

func (*ToolboxSystemService) UpdateNTPServers

func (s *ToolboxSystemService) UpdateNTPServers(w http.ResponseWriter, r *http.Request)

UpdateNTPServers 更新系统 NTP 服务器配置

func (*ToolboxSystemService) UpdateSWAP

func (s *ToolboxSystemService) UpdateSWAP(w http.ResponseWriter, r *http.Request)

UpdateSWAP 设置 SWAP 信息

func (*ToolboxSystemService) UpdateTime

func (s *ToolboxSystemService) UpdateTime(w http.ResponseWriter, r *http.Request)

UpdateTime 设置时间

func (*ToolboxSystemService) UpdateTimezone

func (s *ToolboxSystemService) UpdateTimezone(w http.ResponseWriter, r *http.Request)

UpdateTimezone 设置时区

type UserService

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

func NewUserService

func NewUserService(t *gotext.Locale, conf *config.Config, session *sessions.Manager, user biz.UserRepo) *UserService

func (*UserService) Create

func (s *UserService) Create(w http.ResponseWriter, r *http.Request)

func (*UserService) Delete

func (s *UserService) Delete(w http.ResponseWriter, r *http.Request)

func (*UserService) GenerateTwoFA

func (s *UserService) GenerateTwoFA(w http.ResponseWriter, r *http.Request)

func (*UserService) GetCaptcha

func (s *UserService) GetCaptcha(w http.ResponseWriter, r *http.Request)

GetCaptcha 获取登录验证码

func (*UserService) GetKey

func (s *UserService) GetKey(w http.ResponseWriter, r *http.Request)

func (*UserService) Info

func (s *UserService) Info(w http.ResponseWriter, r *http.Request)

func (*UserService) IsLogin

func (s *UserService) IsLogin(w http.ResponseWriter, r *http.Request)

func (*UserService) IsTwoFA

func (s *UserService) IsTwoFA(w http.ResponseWriter, r *http.Request)

func (*UserService) List

func (s *UserService) List(w http.ResponseWriter, r *http.Request)

func (*UserService) Login

func (s *UserService) Login(w http.ResponseWriter, r *http.Request)

func (*UserService) Logout

func (s *UserService) Logout(w http.ResponseWriter, r *http.Request)

func (*UserService) UpdateEmail

func (s *UserService) UpdateEmail(w http.ResponseWriter, r *http.Request)

func (*UserService) UpdatePassword

func (s *UserService) UpdatePassword(w http.ResponseWriter, r *http.Request)

func (*UserService) UpdateTwoFA

func (s *UserService) UpdateTwoFA(w http.ResponseWriter, r *http.Request)

func (*UserService) UpdateUsername

func (s *UserService) UpdateUsername(w http.ResponseWriter, r *http.Request)

type UserTokenService

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

func NewUserTokenService

func NewUserTokenService(t *gotext.Locale, userToken biz.UserTokenRepo) *UserTokenService

func (*UserTokenService) Create

func (s *UserTokenService) Create(w http.ResponseWriter, r *http.Request)

func (*UserTokenService) Delete

func (s *UserTokenService) Delete(w http.ResponseWriter, r *http.Request)

func (*UserTokenService) List

func (*UserTokenService) Update

func (s *UserTokenService) Update(w http.ResponseWriter, r *http.Request)

type WebHookService

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

func NewWebHookService

func NewWebHookService(webhook biz.WebHookRepo) *WebHookService

func (*WebHookService) Call

Call 处理 webhook 调用请求

func (*WebHookService) Create

func (s *WebHookService) Create(w http.ResponseWriter, r *http.Request)

func (*WebHookService) Delete

func (s *WebHookService) Delete(w http.ResponseWriter, r *http.Request)

func (*WebHookService) Get

func (*WebHookService) List

func (*WebHookService) Update

func (s *WebHookService) Update(w http.ResponseWriter, r *http.Request)

type WebsiteService

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

func NewWebsiteService

func NewWebsiteService(website biz.WebsiteRepo, setting biz.SettingRepo) *WebsiteService

func (*WebsiteService) ClearLog

func (s *WebsiteService) ClearLog(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) Create

func (s *WebsiteService) Create(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) Delete

func (s *WebsiteService) Delete(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) Get

func (*WebsiteService) GetDefaultConfig

func (s *WebsiteService) GetDefaultConfig(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) GetRewrites

func (s *WebsiteService) GetRewrites(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) List

List 网站列表

func (*WebsiteService) ObtainCert

func (s *WebsiteService) ObtainCert(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) ResetConfig

func (s *WebsiteService) ResetConfig(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) Update

func (s *WebsiteService) Update(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) UpdateCert

func (s *WebsiteService) UpdateCert(w http.ResponseWriter, r *http.Request)

UpdateCert 用于自动化工具更新证书

func (*WebsiteService) UpdateDefaultConfig

func (s *WebsiteService) UpdateDefaultConfig(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) UpdateRemark

func (s *WebsiteService) UpdateRemark(w http.ResponseWriter, r *http.Request)

func (*WebsiteService) UpdateStatus

func (s *WebsiteService) UpdateStatus(w http.ResponseWriter, r *http.Request)

type WsService

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

func NewWsService

func NewWsService(t *gotext.Locale, conf *config.Config, log *slog.Logger, ssh biz.SSHRepo) *WsService

func (*WsService) ContainerImagePull

func (s *WsService) ContainerImagePull(w http.ResponseWriter, r *http.Request)

ContainerImagePull 镜像拉取

func (*WsService) ContainerTerminal

func (s *WsService) ContainerTerminal(w http.ResponseWriter, r *http.Request)

ContainerTerminal 容器终端

func (*WsService) Exec

func (s *WsService) Exec(w http.ResponseWriter, r *http.Request)

func (*WsService) PTY

func (s *WsService) PTY(w http.ResponseWriter, r *http.Request)

PTY 通用 PTY 命令执行 前端发送第一条消息为要执行的命令,后端通过 PTY 执行并实时返回输出

func (*WsService) Session

func (s *WsService) Session(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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