internal

package
v2.2.27 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup interface {
	WebsiteList() ([]types.BackupFile, error)
	WebSiteBackup(website models.Website) error
	WebsiteRestore(website models.Website, backupFile string) error
	MysqlList() ([]types.BackupFile, error)
	MysqlBackup(database string) error
	MysqlRestore(database string, backupFile string) error
	PostgresqlList() ([]types.BackupFile, error)
	PostgresqlBackup(database string) error
	PostgresqlRestore(database string, backupFile string) error
}

type Cert

type Cert interface {
	UserStore(request requests.UserStore) error
	UserUpdate(request requests.UserUpdate) error
	UserShow(ID uint) (models.CertUser, error)
	UserDestroy(ID uint) error
	DNSStore(request requests.DNSStore) error
	DNSUpdate(request requests.DNSUpdate) error
	DNSShow(ID uint) (models.CertDNS, error)
	DNSDestroy(ID uint) error
	CertStore(request requests.CertStore) error
	CertUpdate(request requests.CertUpdate) error
	CertShow(ID uint) (models.Cert, error)
	CertDestroy(ID uint) error
	ObtainAuto(ID uint) (acme.Certificate, error)
	ObtainManual(ID uint) (acme.Certificate, error)
	ManualDNS(ID uint) ([]acme.DNSRecord, error)
	Renew(ID uint) (acme.Certificate, error)
	Deploy(ID, WebsiteID uint) error
}

type Container

type Container interface {
	ContainerListAll() ([]types.Container, error)
	ContainerListByNames(names []string) ([]types.Container, error)
	ContainerCreate(name string, config container.Config, host container.HostConfig, networkConfig network.NetworkingConfig) (string, error)
	ContainerRemove(id string) error
	ContainerStart(id string) error
	ContainerStop(id string) error
	ContainerRestart(id string) error
	ContainerPause(id string) error
	ContainerUnpause(id string) error
	ContainerInspect(id string) (types.ContainerJSON, error)
	ContainerKill(id string) error
	ContainerRename(id string, newName string) error
	ContainerStats(id string) (container.StatsResponseReader, error)
	ContainerExist(name string) (bool, error)
	ContainerUpdate(id string, config container.UpdateConfig) error
	ContainerLogs(id string) (string, error)
	ContainerPrune() error
	NetworkList() ([]network.Inspect, error)
	NetworkCreate(config requests.NetworkCreate) (string, error)
	NetworkRemove(id string) error
	NetworkExist(name string) (bool, error)
	NetworkInspect(id string) (network.Inspect, error)
	NetworkConnect(networkID string, containerID string) error
	NetworkDisconnect(networkID string, containerID string) error
	NetworkPrune() error
	ImageList() ([]image.Summary, error)
	ImageExist(id string) (bool, error)
	ImagePull(config requests.ImagePull) error
	ImageRemove(id string) error
	ImagePrune() error
	ImageInspect(id string) (types.ImageInspect, error)
	VolumeList() ([]*volume.Volume, error)
	VolumeCreate(config requests.VolumeCreate) (volume.Volume, error)
	VolumeExist(name string) (bool, error)
	VolumeInspect(id string) (volume.Volume, error)
	VolumeRemove(id string) error
	VolumePrune() error
	KVToMap(kvs []paneltypes.KV) map[string]string
	KVToSlice(kvs []paneltypes.KV) []string
}

type Cron

type Cron interface {
	AddToSystem(cron models.Cron) error
	DeleteFromSystem(cron models.Cron) error
}

type PHP

type PHP interface {
	Status() (bool, error)
	Reload() error
	Start() error
	Stop() error
	Restart() error
	GetConfig() (string, error)
	SaveConfig(config string) error
	GetFPMConfig() (string, error)
	SaveFPMConfig(config string) error
	Load() ([]types.NV, error)
	GetErrorLog() (string, error)
	GetSlowLog() (string, error)
	ClearErrorLog() error
	ClearSlowLog() error
	GetExtensions() ([]types.PHPExtension, error)
	InstallExtension(slug string) error
	UninstallExtension(slug string) error
}

type Plugin

type Plugin interface {
	AllInstalled() ([]models.Plugin, error)
	All() []types.Plugin
	GetBySlug(slug string) types.Plugin
	GetInstalledBySlug(slug string) models.Plugin
	Install(slug string) error
	Uninstall(slug string) error
	Update(slug string) error
}

type Setting

type Setting interface {
	Get(key string, defaultValue ...string) string
	Set(key, value string) error
	Delete(key string) error
}

type Task

type Task interface {
	Process(taskID uint) error
	DispatchWaiting() error
}

type User

type User interface {
	Create(name, password string) (models.User, error)
	Update(user models.User) (models.User, error)
}

type Website

type Website interface {
	List(page int, limit int) (int64, []models.Website, error)
	Add(website requests.Add) (models.Website, error)
	SaveConfig(config requests.SaveConfig) error
	Delete(id requests.Delete) error
	GetConfig(id uint) (types.WebsiteSetting, error)
	GetConfigByName(name string) (types.WebsiteSetting, error)
	GetIDByName(name string) (uint, error)
}

Directories

Path Synopsis
Package services 备份服务
Package services 备份服务

Jump to

Keyboard shortcuts

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