model

package
v1.10.15-lts Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	BaseModel
	Name               string `json:"name" gorm:"type:varchar(64);not null"`
	Key                string `json:"key" gorm:"type:varchar(64);not null;"`
	ShortDescZh        string `json:"shortDescZh" yaml:"shortDescZh" gorm:"type:longtext;"`
	ShortDescEn        string `json:"shortDescEn" yaml:"shortDescEn" gorm:"type:longtext;"`
	Icon               string `json:"icon" gorm:"type:longtext;"`
	Type               string `json:"type" gorm:"type:varchar(64);not null"`
	Status             string `json:"status" gorm:"type:varchar(64);not null"`
	Required           string `json:"required" gorm:"type:varchar(64);"`
	CrossVersionUpdate bool   `json:"crossVersionUpdate" yaml:"crossVersionUpdate"`
	Limit              int    `json:"limit" gorm:"type:Integer;not null"`
	Website            string `json:"website" gorm:"type:varchar(64);not null"`
	Github             string `json:"github" gorm:"type:varchar(64);not null"`
	Document           string `json:"document" gorm:"type:varchar(64);not null"`
	Recommend          int    `json:"recommend" gorm:"type:Integer;not null"`
	Resource           string `json:"resource" gorm:"type:varchar;not null;default:remote"`
	ReadMe             string `json:"readMe" gorm:"type:varchar;"`
	LastModified       int    `json:"lastModified" gorm:"type:Integer;"`

	Details []AppDetail `json:"-" gorm:"-:migration"`
	TagsKey []string    `json:"tags" yaml:"tags" gorm:"-"`
	AppTags []AppTag    `json:"-" gorm:"-:migration"`
}

func (*App) GetAppResourcePath added in v1.9.0

func (i *App) GetAppResourcePath() string

func (*App) IsLocalApp added in v1.9.0

func (i *App) IsLocalApp() bool

type AppDetail

type AppDetail struct {
	BaseModel
	AppId               uint   `json:"appId" gorm:"type:integer;not null"`
	Version             string `json:"version" gorm:"type:varchar(64);not null"`
	Params              string `json:"-" gorm:"type:longtext;"`
	DockerCompose       string `json:"dockerCompose"  gorm:"type:longtext;"`
	Status              string `json:"status" gorm:"type:varchar(64);not null"`
	LastVersion         string `json:"lastVersion" gorm:"type:varchar(64);"`
	LastModified        int    `json:"lastModified" gorm:"type:integer;"`
	DownloadUrl         string `json:"downloadUrl"  gorm:"type:varchar;"`
	DownloadCallBackUrl string `json:"downloadCallBackUrl" gorm:"type:longtext;"`
	Update              bool   `json:"update"`
	IgnoreUpgrade       bool   `json:"ignoreUpgrade"`
}

type AppInstall

type AppInstall struct {
	BaseModel
	Name          string `json:"name" gorm:"type:varchar(64);not null;UNIQUE"`
	AppId         uint   `json:"appId" gorm:"type:integer;not null"`
	AppDetailId   uint   `json:"appDetailId" gorm:"type:integer;not null"`
	Version       string `json:"version" gorm:"type:varchar(64);not null"`
	Param         string `json:"param"  gorm:"type:longtext;"`
	Env           string `json:"env"  gorm:"type:longtext;"`
	DockerCompose string `json:"dockerCompose"  gorm:"type:longtext;"`
	Status        string `json:"status" gorm:"type:varchar(256);not null"`
	Description   string `json:"description" gorm:"type:varchar(256);"`
	Message       string `json:"message"  gorm:"type:longtext;"`
	ContainerName string `json:"containerName" gorm:"type:varchar(256);not null"`
	ServiceName   string `json:"serviceName" gorm:"type:varchar(256);not null"`
	HttpPort      int    `json:"httpPort" gorm:"type:integer;not null"`
	HttpsPort     int    `json:"httpsPort" gorm:"type:integer;not null"`
	App           App    `json:"app" gorm:"-:migration"`
}

func (*AppInstall) GetAppPath added in v1.8.1

func (i *AppInstall) GetAppPath() string

func (*AppInstall) GetComposePath

func (i *AppInstall) GetComposePath() string

func (*AppInstall) GetEnvPath added in v1.1.0

func (i *AppInstall) GetEnvPath() string

func (*AppInstall) GetPath

func (i *AppInstall) GetPath() string

type AppInstallResource

type AppInstallResource struct {
	BaseModel
	AppInstallId uint   `json:"appInstallId" gorm:"type:integer;not null;"`
	LinkId       uint   `json:"linkId"  gorm:"type:integer;not null;"`
	ResourceId   uint   `json:"resourceId" gorm:"type:integer;"`
	Key          string `json:"key" gorm:"type:varchar(64);not null"`
	From         string `json:"from" gorm:"type:varchar(64);not null;default:local"`
}

type AppTag

type AppTag struct {
	BaseModel
	AppId uint `json:"appId" gorm:"type:integer;not null"`
	TagId uint `json:"tagId" gorm:"type:integer;not null"`
}

type BackupAccount

type BackupAccount struct {
	BaseModel
	Type       string `gorm:"type:varchar(64);unique;not null" json:"type"`
	Bucket     string `gorm:"type:varchar(256)" json:"bucket"`
	AccessKey  string `gorm:"type:varchar(256)" json:"accessKey"`
	Credential string `gorm:"type:varchar(256)" json:"credential"`
	BackupPath string `gorm:"type:varchar(256)" json:"backupPath"`
	Vars       string `gorm:"type:longText" json:"vars"`
}

type BackupRecord

type BackupRecord struct {
	BaseModel
	From       string `gorm:"type:varchar(64)" json:"from"`
	CronjobID  uint   `gorm:"type:decimal" json:"cronjobID"`
	Type       string `gorm:"type:varchar(64);not null" json:"type"`
	Name       string `gorm:"type:varchar(64);not null" json:"name"`
	DetailName string `gorm:"type:varchar(256)" json:"detailName"`
	Source     string `gorm:"type:varchar(256)" json:"source"`
	BackupType string `gorm:"type:varchar(256)" json:"backupType"`
	FileDir    string `gorm:"type:varchar(256)" json:"fileDir"`
	FileName   string `gorm:"type:varchar(256)" json:"fileName"`
}

type BaseModel

type BaseModel struct {
	ID        uint      `gorm:"primarykey;AUTO_INCREMENT" json:"id"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type Clam

type Clam struct {
	BaseModel

	Name             string `gorm:"type:varchar(64);not null" json:"name"`
	Status           string `gorm:"type:varchar(64)" json:"status"`
	Path             string `gorm:"type:varchar(64);not null" json:"path"`
	InfectedStrategy string `gorm:"type:varchar(64)" json:"infectedStrategy"`
	InfectedDir      string `gorm:"type:varchar(64)" json:"infectedDir"`
	Spec             string `gorm:"type:varchar(64)" json:"spec"`
	EntryID          int    `gorm:"type:varchar(64)" json:"entryID"`
	Description      string `gorm:"type:varchar(64)" json:"description"`
}

type Command

type Command struct {
	BaseModel
	Name    string `gorm:"type:varchar(64);unique;not null" json:"name"`
	GroupID uint   `gorm:"type:decimal" json:"groupID"`
	Command string `gorm:"type:varchar(256);not null" json:"command"`
}

type Compose

type Compose struct {
	BaseModel

	Name string `gorm:"type:varchar(256)" json:"name"`
}

type ComposeTemplate

type ComposeTemplate struct {
	BaseModel

	Name        string `gorm:"type:varchar(64);not null;unique" json:"name"`
	Description string `gorm:"type:varchar(256)" json:"description"`
	Content     string `gorm:"type:longtext" json:"content"`
}

type Cronjob

type Cronjob struct {
	BaseModel

	Name string `gorm:"type:varchar(64);not null" json:"name"`
	Type string `gorm:"type:varchar(64);not null" json:"type"`
	Spec string `gorm:"type:varchar(64);not null" json:"spec"`

	Command        string `gorm:"type:varchar(64)" json:"command"`
	ContainerName  string `gorm:"type:varchar(64)" json:"containerName"`
	Script         string `gorm:"longtext" json:"script"`
	Website        string `gorm:"type:varchar(64)" json:"website"`
	AppID          string `gorm:"type:varchar(64)" json:"appID"`
	DBType         string `gorm:"type:varchar(64)" json:"dbType"`
	DBName         string `gorm:"type:varchar(64)" json:"dbName"`
	URL            string `gorm:"type:varchar(256)" json:"url"`
	SourceDir      string `gorm:"type:varchar(256)" json:"sourceDir"`
	ExclusionRules string `gorm:"longtext" json:"exclusionRules"`

	// 已废弃
	KeepLocal   bool   `gorm:"type:varchar(64)" json:"keepLocal"`
	TargetDirID uint64 `gorm:"type:decimal" json:"targetDirID"`

	BackupAccounts  string `gorm:"type:varchar(64)" json:"backupAccounts"`
	DefaultDownload string `gorm:"type:varchar(64)" json:"defaultDownload"`
	RetainCopies    uint64 `gorm:"type:decimal" json:"retainCopies"`

	Status   string       `gorm:"type:varchar(64)" json:"status"`
	EntryIDs string       `gorm:"type:varchar(64)" json:"entryIDs"`
	Records  []JobRecords `json:"records"`
	Secret   string       `gorm:"type:varchar(64)" json:"secret"`
}

type Database added in v1.6.0

type Database struct {
	BaseModel
	AppInstallID uint   `json:"appInstallID" gorm:"type:decimal"`
	Name         string `json:"name" gorm:"type:varchar(64);not null;unique"`
	Type         string `json:"type" gorm:"type:varchar(64);not null"`
	Version      string `json:"version" gorm:"type:varchar(64);not null"`
	From         string `json:"from" gorm:"type:varchar(64);not null"`
	Address      string `json:"address" gorm:"type:varchar(64);not null"`
	Port         uint   `json:"port" gorm:"type:decimal;not null"`
	Username     string `json:"username" gorm:"type:varchar(64)"`
	Password     string `json:"password" gorm:"type:varchar(64)"`

	SSL        bool   `json:"ssl"`
	RootCert   string `json:"rootCert" gorm:"type:longText"`
	ClientKey  string `json:"clientKey" gorm:"type:longText"`
	ClientCert string `json:"clientCert" gorm:"type:longText"`
	SkipVerify bool   `json:"skipVerify"`

	Description string `json:"description" gorm:"type:varchar(256);"`
}

type DatabaseMysql

type DatabaseMysql struct {
	BaseModel
	Name        string `json:"name" gorm:"type:varchar(256);not null"`
	From        string `json:"from" gorm:"type:varchar(256);not null;default:local"`
	MysqlName   string `json:"mysqlName" gorm:"type:varchar(64);not null"`
	Format      string `json:"format" gorm:"type:varchar(64);not null"`
	Username    string `json:"username" gorm:"type:varchar(256);not null"`
	Password    string `json:"password" gorm:"type:varchar(256);not null"`
	Permission  string `json:"permission" gorm:"type:varchar(256);not null"`
	IsDelete    bool   `json:"isDelete" gorm:"type:varchar(64)"`
	Description string `json:"description" gorm:"type:varchar(256);"`
}

type DatabasePostgresql added in v1.9.3

type DatabasePostgresql struct {
	BaseModel
	Name           string `json:"name" gorm:"type:varchar(256);not null"`
	From           string `json:"from" gorm:"type:varchar(256);not null;default:local"`
	PostgresqlName string `json:"postgresqlName" gorm:"type:varchar(64);not null"`
	Format         string `json:"format" gorm:"type:varchar(64);not null"`
	Username       string `json:"username" gorm:"type:varchar(256);not null"`
	Password       string `json:"password" gorm:"type:varchar(256);not null"`
	SuperUser      bool   `json:"superUser" gorm:"type:varchar(64)"`
	IsDelete       bool   `json:"isDelete" gorm:"type:varchar(64)"`
	Description    string `json:"description" gorm:"type:varchar(256);"`
}

type Favorite added in v1.8.0

type Favorite struct {
	BaseModel
	Name  string `gorm:"type:varchar(256);not null;" json:"name" `
	Path  string `gorm:"type:varchar(256);not null;unique" json:"path"`
	Type  string `gorm:"type:varchar(64);" json:"type"`
	IsDir bool   `json:"isDir"`
	IsTxt bool   `json:"isTxt"`
}

type Firewall added in v1.6.0

type Firewall struct {
	BaseModel

	Type        string `gorm:"type:varchar(64);not null" json:"type"`
	Port        string `gorm:"type:varchar(64);not null" json:"port"`
	Protocol    string `gorm:"type:varchar(64);not null" json:"protocol"`
	Address     string `gorm:"type:varchar(64);not null" json:"address"`
	Strategy    string `gorm:"type:varchar(64);not null" json:"strategy"`
	Description string `gorm:"type:varchar(64);not null" json:"description"`
}

type Forward

type Forward struct {
	BaseModel

	Protocol   string `gorm:"type:varchar(64);not null" json:"protocol"`
	Port       string `gorm:"type:varchar(64);not null" json:"port"`
	TargetIP   string `gorm:"type:varchar(64);not null" json:"targetIP"`
	TargetPort string `gorm:"type:varchar(64);not null" json:"targetPort"`
}

type Ftp

type Ftp struct {
	BaseModel

	User        string `gorm:"type:varchar(64);not null" json:"user"`
	Password    string `gorm:"type:varchar(64);not null" json:"password"`
	Status      string `gorm:"type:varchar(64);not null" json:"status"`
	Path        string `gorm:"type:varchar(64);not null" json:"path"`
	Description string `gorm:"type:varchar(64);not null" json:"description"`
}

type Group

type Group struct {
	BaseModel
	IsDefault bool   `json:"isDefault"`
	Name      string `gorm:"type:varchar(64);not null" json:"name"`
	Type      string `gorm:"type:varchar(16);not null" json:"type"`
}

type Host

type Host struct {
	BaseModel

	GroupID          uint   `gorm:"type:decimal;not null" json:"group_id"`
	Name             string `gorm:"type:varchar(64);not null" json:"name"`
	Addr             string `gorm:"type:varchar(16);not null" json:"addr"`
	Port             int    `gorm:"type:decimal;not null" json:"port"`
	User             string `gorm:"type:varchar(64);not null" json:"user"`
	AuthMode         string `gorm:"type:varchar(16);not null" json:"authMode"`
	Password         string `gorm:"type:varchar(64)" json:"password"`
	PrivateKey       string `gorm:"type:varchar(256)" json:"privateKey"`
	PassPhrase       string `gorm:"type:varchar(256)" json:"passPhrase"`
	RememberPassword bool   `json:"rememberPassword"`

	Description string `gorm:"type:varchar(256)" json:"description"`
}

type ImageRepo

type ImageRepo struct {
	BaseModel

	Name        string `gorm:"type:varchar(64);not null" json:"name"`
	DownloadUrl string `gorm:"type:varchar(256)" json:"downloadUrl"`
	Protocol    string `gorm:"type:varchar(64)" json:"protocol"`
	Username    string `gorm:"type:varchar(256)" json:"username"`
	Password    string `gorm:"type:varchar(256)" json:"password"`
	Auth        bool   `gorm:"type:varchar(256)" json:"auth"`

	Status  string `gorm:"type:varchar(64)" json:"status"`
	Message string `gorm:"type:varchar(256)" json:"message"`
}

type JobRecords

type JobRecords struct {
	BaseModel

	CronjobID uint      `gorm:"type:decimal" json:"cronjobID"`
	StartTime time.Time `gorm:"type:datetime" json:"startTime"`
	Interval  float64   `gorm:"type:float" json:"interval"`
	Records   string    `gorm:"longtext" json:"records"`
	FromLocal bool      `gorm:"type:varchar(64)" json:"source"`
	File      string    `gorm:"type:varchar(256)" json:"file"`
	Status    string    `gorm:"type:varchar(64)" json:"status"`
	Message   string    `gorm:"longtext" json:"message"`
}

type LoginLog

type LoginLog struct {
	BaseModel
	IP      string `gorm:"type:varchar(64)" json:"ip"`
	Address string `gorm:"type:varchar(64)" json:"address"`
	Agent   string `gorm:"type:varchar(256)" json:"agent"`
	Status  string `gorm:"type:varchar(64)" json:"status"`
	Message string `gorm:"type:longText" json:"message"`
}

type MonitorBase

type MonitorBase struct {
	BaseModel
	Cpu float64 `gorm:"type:float" json:"cpu"`

	LoadUsage float64 `gorm:"type:float" json:"loadUsage"`
	CpuLoad1  float64 `gorm:"type:float" json:"cpuLoad1"`
	CpuLoad5  float64 `gorm:"type:float" json:"cpuLoad5"`
	CpuLoad15 float64 `gorm:"type:float" json:"cpuLoad15"`

	Memory float64 `gorm:"type:float" json:"memory"`
}

type MonitorIO

type MonitorIO struct {
	BaseModel
	Name  string `json:"name"`
	Read  uint64 `json:"read"`
	Write uint64 `json:"write"`
	Count uint64 `json:"count"`
	Time  uint64 `json:"time"`
}

type MonitorNetwork

type MonitorNetwork struct {
	BaseModel
	Name string  `json:"name"`
	Up   float64 `gorm:"type:float" json:"up"`
	Down float64 `gorm:"type:float" json:"down"`
}

type OperationLog

type OperationLog struct {
	BaseModel
	Source string `gorm:"type:varchar(64)" json:"source"`

	IP        string `gorm:"type:varchar(64)" json:"ip"`
	Path      string `gorm:"type:varchar(64)" json:"path"`
	Method    string `gorm:"type:varchar(64)" json:"method"`
	UserAgent string `gorm:"type:varchar(256)" json:"userAgent"`

	Latency time.Duration `gorm:"type:varchar(64)" json:"latency"`
	Status  string        `gorm:"type:varchar(64)" json:"status"`
	Message string        `gorm:"type:varchar(256)" json:"message"`

	DetailZH string `gorm:"type:varchar(256)" json:"detailZH"`
	DetailEN string `gorm:"type:varchar(256)" json:"detailEN"`
}

type PHPExtensions added in v1.9.3

type PHPExtensions struct {
	BaseModel
	Name       string ` json:"name" gorm:"not null"`
	Extensions string `json:"extensions" gorm:"not null"`
}

type RedisCommand

type RedisCommand struct {
	BaseModel
	Name    string `gorm:"type:varchar(64);unique;not null" json:"name"`
	Command string `gorm:"type:varchar(256);not null" json:"command"`
}

type Runtime added in v1.1.0

type Runtime struct {
	BaseModel
	Name          string `gorm:"type:varchar;not null" json:"name"`
	AppDetailID   uint   `gorm:"type:integer" json:"appDetailId"`
	Image         string `gorm:"type:varchar" json:"image"`
	WorkDir       string `gorm:"type:varchar" json:"workDir"`
	DockerCompose string `gorm:"type:varchar" json:"dockerCompose"`
	Env           string `gorm:"type:varchar" json:"env"`
	Params        string `gorm:"type:varchar" json:"params"`
	Version       string `gorm:"type:varchar;not null" json:"version"`
	Type          string `gorm:"type:varchar;not null" json:"type"`
	Status        string `gorm:"type:varchar;not null" json:"status"`
	Resource      string `gorm:"type:varchar;not null" json:"resource"`
	Port          int    `gorm:"type:integer;" json:"port"`
	Message       string `gorm:"type:longtext;" json:"message"`
	CodeDir       string `gorm:"type:varchar;" json:"codeDir"`
}

func (*Runtime) GetComposePath added in v1.7.0

func (r *Runtime) GetComposePath() string

func (*Runtime) GetEnvPath added in v1.7.0

func (r *Runtime) GetEnvPath() string

func (*Runtime) GetLogPath added in v1.7.0

func (r *Runtime) GetLogPath() string

func (*Runtime) GetPath added in v1.7.0

func (r *Runtime) GetPath() string

type Setting

type Setting struct {
	BaseModel
	Key   string `json:"key" gorm:"type:varchar(256);not null;"`
	Value string `json:"value" gorm:"type:varchar(256)"`
	About string `json:"about" gorm:"type:longText"`
}

type Snapshot

type Snapshot struct {
	BaseModel
	Name            string `json:"name" gorm:"type:varchar(64);not null;unique"`
	Description     string `json:"description" gorm:"type:varchar(256)"`
	From            string `json:"from"`
	DefaultDownload string `json:"defaultDownload" gorm:"type:varchar(64)"`
	Status          string `json:"status" gorm:"type:varchar(64)"`
	Message         string `json:"message" gorm:"type:varchar(256)"`
	Version         string `json:"version" gorm:"type:varchar(256)"`

	InterruptStep    string `json:"interruptStep" gorm:"type:varchar(64)"`
	RecoverStatus    string `json:"recoverStatus" gorm:"type:varchar(64)"`
	RecoverMessage   string `json:"recoverMessage" gorm:"type:varchar(256)"`
	LastRecoveredAt  string `json:"lastRecoveredAt" gorm:"type:varchar(64)"`
	RollbackStatus   string `json:"rollbackStatus" gorm:"type:varchar(64)"`
	RollbackMessage  string `json:"rollbackMessage" gorm:"type:varchar(256)"`
	LastRollbackedAt string `json:"lastRollbackedAt" gorm:"type:varchar(64)"`
}

type SnapshotStatus added in v1.6.0

type SnapshotStatus struct {
	BaseModel
	SnapID     uint   `gorm:"type:decimal" json:"snapID"`
	Panel      string `json:"panel" gorm:"type:varchar(64);default:Running"`
	PanelInfo  string `json:"panelInfo" gorm:"type:varchar(64);default:Running"`
	DaemonJson string `json:"daemonJson" gorm:"type:varchar(64);default:Running"`
	AppData    string `json:"appData" gorm:"type:varchar(64);default:Running"`
	PanelData  string `json:"panelData" gorm:"type:varchar(64);default:Running"`
	BackupData string `json:"backupData" gorm:"type:varchar(64);default:Running"`

	Compress string `json:"compress" gorm:"type:varchar(64);default:Waiting"`
	Size     string `json:"size" gorm:"type:varchar(64)"`
	Upload   string `json:"upload" gorm:"type:varchar(64);default:Waiting"`
}

type Tag

type Tag struct {
	BaseModel
	Key  string `json:"key" gorm:"type:varchar(64);not null"`
	Name string `json:"name" gorm:"type:varchar(64);not null"`
	Sort int    `json:"sort" gorm:"type:int;not null;default:1"`
}

type Website

type Website struct {
	BaseModel
	Protocol      string    `gorm:"type:varchar;not null" json:"protocol"`
	PrimaryDomain string    `gorm:"type:varchar;not null" json:"primaryDomain"`
	Type          string    `gorm:"type:varchar;not null" json:"type"`
	Alias         string    `gorm:"type:varchar;not null" json:"alias"`
	Remark        string    `gorm:"type:longtext;" json:"remark"`
	Status        string    `gorm:"type:varchar;not null" json:"status"`
	HttpConfig    string    `gorm:"type:varchar;not null" json:"httpConfig"`
	ExpireDate    time.Time `json:"expireDate"`

	Proxy         string `gorm:"type:varchar;" json:"proxy"`
	ProxyType     string `gorm:"type:varchar;" json:"proxyType"`
	SiteDir       string `gorm:"type:varchar;" json:"siteDir"`
	ErrorLog      bool   `json:"errorLog"`
	AccessLog     bool   `json:"accessLog"`
	DefaultServer bool   `json:"defaultServer"`
	IPV6          bool   `json:"IPV6"`
	Rewrite       string `gorm:"type:varchar" json:"rewrite"`

	WebsiteGroupID uint `gorm:"type:integer" json:"webSiteGroupId"`
	WebsiteSSLID   uint `gorm:"type:integer" json:"webSiteSSLId"`
	RuntimeID      uint `gorm:"type:integer" json:"runtimeID"`
	AppInstallID   uint `gorm:"type:integer" json:"appInstallId"`
	FtpID          uint `gorm:"type:integer" json:"ftpId"`

	User  string `gorm:"type:varchar;" json:"user"`
	Group string `gorm:"type:varchar;" json:"group"`

	Domains    []WebsiteDomain `json:"domains" gorm:"-:migration"`
	WebsiteSSL WebsiteSSL      `json:"webSiteSSL" gorm:"-:migration"`
}

func (Website) TableName

func (w Website) TableName() string

type WebsiteAcmeAccount

type WebsiteAcmeAccount struct {
	BaseModel
	Email      string `gorm:"not null" json:"email"`
	URL        string `gorm:"not null" json:"url"`
	PrivateKey string `gorm:"not null" json:"-"`
	Type       string `gorm:"not null;default:letsencrypt" json:"type"`
	EabKid     string `gorm:"default:null;" json:"eabKid"`
	EabHmacKey string `gorm:"default:null" json:"eabHmacKey"`
	KeyType    string `gorm:"not null;default:2048" json:"keyType"`
}

func (WebsiteAcmeAccount) TableName

func (w WebsiteAcmeAccount) TableName() string

type WebsiteCA added in v1.9.0

type WebsiteCA struct {
	BaseModel
	CSR        string `gorm:"not null;" json:"csr"`
	Name       string `gorm:"not null;" json:"name"`
	PrivateKey string `gorm:"not null" json:"privateKey"`
	KeyType    string `gorm:"not null;default:2048" json:"keyType"`
}

type WebsiteDnsAccount

type WebsiteDnsAccount struct {
	BaseModel
	Name          string `gorm:"type:varchar(64);not null" json:"name"`
	Type          string `gorm:"type:varchar(64);not null" json:"type"`
	Authorization string `gorm:"type:varchar(256);not null" json:"-"`
}

func (WebsiteDnsAccount) TableName

func (w WebsiteDnsAccount) TableName() string

type WebsiteDomain

type WebsiteDomain struct {
	BaseModel
	WebsiteID uint   `gorm:"column:website_id;type:varchar(64);not null;" json:"websiteId"`
	Domain    string `gorm:"type:varchar(256);not null" json:"domain"`
	Port      int    `gorm:"type:integer" json:"port"`
}

func (WebsiteDomain) TableName

func (w WebsiteDomain) TableName() string

type WebsiteSSL

type WebsiteSSL struct {
	BaseModel
	PrimaryDomain string    `json:"primaryDomain"`
	PrivateKey    string    `json:"privateKey"`
	Pem           string    `json:"pem"`
	Domains       string    `json:"domains"`
	CertURL       string    `json:"certURL"`
	Type          string    `json:"type"`
	Provider      string    `json:"provider"`
	Organization  string    `json:"organization"`
	DnsAccountID  uint      `json:"dnsAccountId"`
	AcmeAccountID uint      `gorm:"column:acme_account_id" json:"acmeAccountId" `
	CaID          uint      `json:"caId"`
	AutoRenew     bool      `json:"autoRenew"`
	ExpireDate    time.Time `json:"expireDate"`
	StartDate     time.Time `json:"startDate"`
	Status        string    `json:"status"`
	Message       string    `json:"message"`
	KeyType       string    `json:"keyType"`
	PushDir       bool      `json:"pushDir"`
	Dir           string    `json:"dir"`
	Description   string    `json:"description"`
	SkipDNS       bool      `json:"skipDNS"`
	Nameserver1   string    `json:"nameserver1"`
	Nameserver2   string    `json:"nameserver2"`
	DisableCNAME  bool      `json:"disableCNAME"`
	ExecShell     bool      `json:"execShell"`
	Shell         string    `json:"shell"`

	AcmeAccount WebsiteAcmeAccount `json:"acmeAccount" gorm:"-:migration"`
	DnsAccount  WebsiteDnsAccount  `json:"dnsAccount" gorm:"-:migration"`
	Websites    []Website          `json:"websites" gorm:"-:migration"`
}

func (WebsiteSSL) GetLogPath added in v1.9.0

func (w WebsiteSSL) GetLogPath() string

func (WebsiteSSL) TableName

func (w WebsiteSSL) TableName() string

Jump to

Keyboard shortcuts

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