Documentation ¶
Overview ¶
Package services 备份服务
Package services 证书服务 ¶
Package services 插件服务 ¶
Package services 设置服务 ¶
Package services 用户服务 ¶
Package services 网站服务
Index ¶
- type BackupImpl
- func (s *BackupImpl) MysqlBackup(database string) error
- func (s *BackupImpl) MysqlList() ([]types.BackupFile, error)
- func (s *BackupImpl) MysqlRestore(database string, backupFile string) error
- func (s *BackupImpl) PostgresqlBackup(database string) error
- func (s *BackupImpl) PostgresqlList() ([]types.BackupFile, error)
- func (s *BackupImpl) PostgresqlRestore(database string, backupFile string) error
- func (s *BackupImpl) WebSiteBackup(website models.Website) error
- func (s *BackupImpl) WebsiteList() ([]types.BackupFile, error)
- func (s *BackupImpl) WebsiteRestore(website models.Website, backupFile string) error
- type CertImpl
- func (s *CertImpl) CertDestroy(ID uint) error
- func (s *CertImpl) CertShow(ID uint) (models.Cert, error)
- func (s *CertImpl) CertStore(request requests.CertStore) error
- func (s *CertImpl) CertUpdate(request requests.CertUpdate) error
- func (s *CertImpl) DNSDestroy(ID uint) error
- func (s *CertImpl) DNSShow(ID uint) (models.CertDNS, error)
- func (s *CertImpl) DNSStore(request requests.DNSStore) error
- func (s *CertImpl) DNSUpdate(request requests.DNSUpdate) error
- func (s *CertImpl) Deploy(ID, WebsiteID uint) error
- func (s *CertImpl) ManualDNS(ID uint) ([]acme.DNSRecord, error)
- func (s *CertImpl) ObtainAuto(ID uint) (acme.Certificate, error)
- func (s *CertImpl) ObtainManual(ID uint) (acme.Certificate, error)
- func (s *CertImpl) Renew(ID uint) (acme.Certificate, error)
- func (s *CertImpl) UserDestroy(ID uint) error
- func (s *CertImpl) UserShow(ID uint) (models.CertUser, error)
- func (s *CertImpl) UserStore(request requests.UserStore) error
- func (s *CertImpl) UserUpdate(request requests.UserUpdate) error
- type Container
- func (r *Container) ContainerCreate(name string, config container.Config, host container.HostConfig, ...) (string, error)
- func (r *Container) ContainerExist(name string) (bool, error)
- func (r *Container) ContainerInspect(id string) (types.ContainerJSON, error)
- func (r *Container) ContainerKill(id string) error
- func (r *Container) ContainerListAll() ([]types.Container, error)
- func (r *Container) ContainerListByNames(names []string) ([]types.Container, error)
- func (r *Container) ContainerLogs(id string) (string, error)
- func (r *Container) ContainerPause(id string) error
- func (r *Container) ContainerPrune() error
- func (r *Container) ContainerRemove(id string) error
- func (r *Container) ContainerRename(id string, newName string) error
- func (r *Container) ContainerRestart(id string) error
- func (r *Container) ContainerStart(id string) error
- func (r *Container) ContainerStats(id string) (container.StatsResponseReader, error)
- func (r *Container) ContainerStop(id string) error
- func (r *Container) ContainerUnpause(id string) error
- func (r *Container) ContainerUpdate(id string, config container.UpdateConfig) error
- func (r *Container) ImageExist(id string) (bool, error)
- func (r *Container) ImageInspect(id string) (types.ImageInspect, error)
- func (r *Container) ImageList() ([]image.Summary, error)
- func (r *Container) ImagePrune() error
- func (r *Container) ImagePull(config requests.ImagePull) error
- func (r *Container) ImageRemove(id string) error
- func (r *Container) KVToMap(kvs []paneltypes.KV) map[string]string
- func (r *Container) KVToSlice(kvs []paneltypes.KV) []string
- func (r *Container) NetworkConnect(networkID string, containerID string) error
- func (r *Container) NetworkCreate(config requests.NetworkCreate) (string, error)
- func (r *Container) NetworkDisconnect(networkID string, containerID string) error
- func (r *Container) NetworkExist(name string) (bool, error)
- func (r *Container) NetworkInspect(id string) (network.Inspect, error)
- func (r *Container) NetworkList() ([]network.Inspect, error)
- func (r *Container) NetworkPrune() error
- func (r *Container) NetworkRemove(id string) error
- func (r *Container) VolumeCreate(config requests.VolumeCreate) (volume.Volume, error)
- func (r *Container) VolumeExist(id string) (bool, error)
- func (r *Container) VolumeInspect(id string) (volume.Volume, error)
- func (r *Container) VolumeList() ([]*volume.Volume, error)
- func (r *Container) VolumePrune() error
- func (r *Container) VolumeRemove(id string) error
- type CronImpl
- type PHPImpl
- func (r *PHPImpl) ClearErrorLog() error
- func (r *PHPImpl) ClearSlowLog() error
- func (r *PHPImpl) GetConfig() (string, error)
- func (r *PHPImpl) GetErrorLog() (string, error)
- func (r *PHPImpl) GetExtensions() ([]types.PHPExtension, error)
- func (r *PHPImpl) GetFPMConfig() (string, error)
- func (r *PHPImpl) GetSlowLog() (string, error)
- func (r *PHPImpl) InstallExtension(slug string) error
- func (r *PHPImpl) Load() ([]types.NV, error)
- func (r *PHPImpl) Reload() error
- func (r *PHPImpl) SaveConfig(config string) error
- func (r *PHPImpl) SaveFPMConfig(config string) error
- func (r *PHPImpl) UninstallExtension(slug string) error
- type PluginImpl
- func (r *PluginImpl) All() []types.Plugin
- func (r *PluginImpl) AllInstalled() ([]models.Plugin, error)
- func (r *PluginImpl) GetBySlug(slug string) types.Plugin
- func (r *PluginImpl) GetInstalledBySlug(slug string) models.Plugin
- func (r *PluginImpl) Install(slug string) error
- func (r *PluginImpl) Uninstall(slug string) error
- func (r *PluginImpl) Update(slug string) error
- type SettingImpl
- type TaskImpl
- type UserImpl
- type WebsiteImpl
- func (r *WebsiteImpl) Add(website requests.Add) (models.Website, error)
- func (r *WebsiteImpl) Delete(request requests.Delete) error
- func (r *WebsiteImpl) GetConfig(id uint) (types.WebsiteSetting, error)
- func (r *WebsiteImpl) GetConfigByName(name string) (types.WebsiteSetting, error)
- func (r *WebsiteImpl) GetIDByName(name string) (uint, error)
- func (r *WebsiteImpl) List(page, limit int) (int64, []models.Website, error)
- func (r *WebsiteImpl) SaveConfig(config requests.SaveConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupImpl ¶
type BackupImpl struct {
// contains filtered or unexported fields
}
func NewBackupImpl ¶
func NewBackupImpl() *BackupImpl
func (*BackupImpl) MysqlBackup ¶
func (s *BackupImpl) MysqlBackup(database string) error
MysqlBackup MySQL备份
func (*BackupImpl) MysqlList ¶
func (s *BackupImpl) MysqlList() ([]types.BackupFile, error)
MysqlList MySQL备份列表
func (*BackupImpl) MysqlRestore ¶
func (s *BackupImpl) MysqlRestore(database string, backupFile string) error
MysqlRestore MySQL恢复
func (*BackupImpl) PostgresqlBackup ¶
func (s *BackupImpl) PostgresqlBackup(database string) error
PostgresqlBackup PostgreSQL备份
func (*BackupImpl) PostgresqlList ¶
func (s *BackupImpl) PostgresqlList() ([]types.BackupFile, error)
PostgresqlList PostgreSQL备份列表
func (*BackupImpl) PostgresqlRestore ¶
func (s *BackupImpl) PostgresqlRestore(database string, backupFile string) error
PostgresqlRestore PostgreSQL恢复
func (*BackupImpl) WebSiteBackup ¶
func (s *BackupImpl) WebSiteBackup(website models.Website) error
WebSiteBackup 网站备份
func (*BackupImpl) WebsiteList ¶
func (s *BackupImpl) WebsiteList() ([]types.BackupFile, error)
WebsiteList 网站备份列表
func (*BackupImpl) WebsiteRestore ¶
func (s *BackupImpl) WebsiteRestore(website models.Website, backupFile string) error
WebsiteRestore 网站恢复
type CertImpl ¶
type CertImpl struct {
// contains filtered or unexported fields
}
func NewCertImpl ¶
func NewCertImpl() *CertImpl
func (*CertImpl) CertUpdate ¶
func (s *CertImpl) CertUpdate(request requests.CertUpdate) error
CertUpdate 更新证书
func (*CertImpl) ObtainAuto ¶
func (s *CertImpl) ObtainAuto(ID uint) (acme.Certificate, error)
ObtainAuto 自动签发证书
func (*CertImpl) ObtainManual ¶
func (s *CertImpl) ObtainManual(ID uint) (acme.Certificate, error)
ObtainManual 手动签发证书
func (*CertImpl) UserUpdate ¶
func (s *CertImpl) UserUpdate(request requests.UserUpdate) error
UserUpdate 更新用户
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶
func (*Container) ContainerCreate ¶
func (r *Container) ContainerCreate(name string, config container.Config, host container.HostConfig, network network.NetworkingConfig) (string, error)
ContainerCreate 创建容器
func (*Container) ContainerExist ¶
ContainerExist 判断容器是否存在
func (*Container) ContainerInspect ¶
func (r *Container) ContainerInspect(id string) (types.ContainerJSON, error)
ContainerInspect 查看容器
func (*Container) ContainerKill ¶
ContainerKill 杀死容器
func (*Container) ContainerListAll ¶
ContainerListAll 列出所有容器
func (*Container) ContainerListByNames ¶
ContainerListByNames 根据名称列出容器
func (*Container) ContainerLogs ¶
ContainerLogs 查看容器日志
func (*Container) ContainerPause ¶
ContainerPause 暂停容器
func (*Container) ContainerPrune ¶
ContainerPrune 清理未使用的容器
func (*Container) ContainerRemove ¶
ContainerRemove 移除容器
func (*Container) ContainerRename ¶
ContainerRename 重命名容器
func (*Container) ContainerRestart ¶
ContainerRestart 重启容器
func (*Container) ContainerStart ¶
ContainerStart 启动容器
func (*Container) ContainerStats ¶
func (r *Container) ContainerStats(id string) (container.StatsResponseReader, error)
ContainerStats 查看容器状态
func (*Container) ContainerStop ¶
ContainerStop 停止容器
func (*Container) ContainerUnpause ¶
ContainerUnpause 恢复容器
func (*Container) ContainerUpdate ¶
func (r *Container) ContainerUpdate(id string, config container.UpdateConfig) error
ContainerUpdate 更新容器
func (*Container) ImageExist ¶
ImageExist 判断镜像是否存在
func (*Container) ImageInspect ¶
func (r *Container) ImageInspect(id string) (types.ImageInspect, error)
ImageInspect 查看镜像
func (*Container) KVToMap ¶
func (r *Container) KVToMap(kvs []paneltypes.KV) map[string]string
KVToMap 将 key-value 切片转换为 map
func (*Container) KVToSlice ¶
func (r *Container) KVToSlice(kvs []paneltypes.KV) []string
KVToSlice 将 key-value 切片转换为 key=value 切片
func (*Container) NetworkConnect ¶
NetworkConnect 连接网络
func (*Container) NetworkCreate ¶
func (r *Container) NetworkCreate(config requests.NetworkCreate) (string, error)
NetworkCreate 创建网络
func (*Container) NetworkDisconnect ¶
NetworkDisconnect 断开网络
func (*Container) NetworkExist ¶
NetworkExist 判断网络是否存在
func (*Container) NetworkInspect ¶
NetworkInspect 查看网络
func (*Container) NetworkList ¶
NetworkList 列出网络
func (*Container) NetworkRemove ¶
NetworkRemove 删除网络
func (*Container) VolumeCreate ¶
VolumeCreate 创建存储卷
func (*Container) VolumeExist ¶
VolumeExist 判断存储卷是否存在
func (*Container) VolumeInspect ¶
VolumeInspect 查看存储卷
func (*Container) VolumeList ¶
VolumeList 列出存储卷
func (*Container) VolumeRemove ¶
VolumeRemove 删除存储卷
type CronImpl ¶
type CronImpl struct { }
func NewCronImpl ¶
func NewCronImpl() *CronImpl
func (*CronImpl) AddToSystem ¶
AddToSystem 添加到系统
type PHPImpl ¶
type PHPImpl struct {
// contains filtered or unexported fields
}
func NewPHPImpl ¶
func (*PHPImpl) ClearErrorLog ¶
func (*PHPImpl) ClearSlowLog ¶
func (*PHPImpl) GetErrorLog ¶
func (*PHPImpl) GetExtensions ¶
func (r *PHPImpl) GetExtensions() ([]types.PHPExtension, error)
func (*PHPImpl) GetFPMConfig ¶
func (*PHPImpl) GetSlowLog ¶
func (*PHPImpl) InstallExtension ¶
func (*PHPImpl) SaveConfig ¶
func (*PHPImpl) SaveFPMConfig ¶
func (*PHPImpl) UninstallExtension ¶
type PluginImpl ¶
type PluginImpl struct {
// contains filtered or unexported fields
}
func NewPluginImpl ¶
func NewPluginImpl() *PluginImpl
func (*PluginImpl) AllInstalled ¶
func (r *PluginImpl) AllInstalled() ([]models.Plugin, error)
AllInstalled 获取已安装的所有插件
func (*PluginImpl) GetBySlug ¶
func (r *PluginImpl) GetBySlug(slug string) types.Plugin
GetBySlug 根据 slug 获取插件
func (*PluginImpl) GetInstalledBySlug ¶
func (r *PluginImpl) GetInstalledBySlug(slug string) models.Plugin
GetInstalledBySlug 根据 slug 获取已安装的插件
type SettingImpl ¶
type SettingImpl struct { }
func NewSettingImpl ¶
func NewSettingImpl() *SettingImpl
type TaskImpl ¶
type TaskImpl struct { }
func NewTaskImpl ¶
func NewTaskImpl() *TaskImpl
func (*TaskImpl) DispatchWaiting ¶
type WebsiteImpl ¶
type WebsiteImpl struct {
// contains filtered or unexported fields
}
func NewWebsiteImpl ¶
func NewWebsiteImpl() *WebsiteImpl
func (*WebsiteImpl) Delete ¶
func (r *WebsiteImpl) Delete(request requests.Delete) error
Delete 删除网站
func (*WebsiteImpl) GetConfig ¶
func (r *WebsiteImpl) GetConfig(id uint) (types.WebsiteSetting, error)
GetConfig 获取网站配置
func (*WebsiteImpl) GetConfigByName ¶
func (r *WebsiteImpl) GetConfigByName(name string) (types.WebsiteSetting, error)
GetConfigByName 根据网站名称获取网站配置
func (*WebsiteImpl) GetIDByName ¶
func (r *WebsiteImpl) GetIDByName(name string) (uint, error)
GetIDByName 根据网站名称获取网站ID
func (*WebsiteImpl) SaveConfig ¶
func (r *WebsiteImpl) SaveConfig(config requests.SaveConfig) error
SaveConfig 保存网站配置