model

package
v0.0.0-...-c7f185a Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertConfig

type AlertConfig struct {
	BaseModel
	Type   string `json:"type"`
	Title  string `json:"title"`
	Status string `json:"status"`
	Config string `json:"config"`
}

type BackupAccount

type BackupAccount struct {
	BaseModel
	Name       string `gorm:"not null;default:''" json:"name"`
	Type       string `gorm:"not null;default:''" json:"type"`
	IsPublic   bool   `json:"isPublic"`
	Bucket     string `json:"bucket"`
	AccessKey  string `json:"accessKey"`
	Credential string `json:"credential"`
	BackupPath string `json:"backupPath"`
	Vars       string `json:"vars"`

	RememberAuth bool `json:"rememberAuth"`
}

type BaseModel

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

type Command

type Command struct {
	BaseModel
	Type    string `gorm:"not null" json:"type"`
	Name    string `gorm:"not null" json:"name"`
	GroupID uint   `gorm:"not null" json:"groupID"`
	Command string `gorm:"not null" json:"command"`
}

type Group

type Group struct {
	BaseModel
	IsDefault bool   `json:"isDefault"`
	Name      string `json:"name"`
	Type      string `json:"type"`
}

type Host

type Host struct {
	BaseModel

	GroupID          uint   `gorm:"not null" json:"group_id"`
	Name             string `gorm:"not null" json:"name"`
	Addr             string `gorm:"not null" json:"addr"`
	Port             int    `gorm:"not null" json:"port"`
	User             string `gorm:"not null" json:"user"`
	AuthMode         string `gorm:"not null" json:"authMode"`
	Password         string `json:"password"`
	PrivateKey       string `json:"privateKey"`
	PassPhrase       string `json:"passPhrase"`
	RememberPassword bool   `json:"rememberPassword"`

	Description string `json:"description"`
}

type LoginLog

type LoginLog struct {
	BaseModel
	IP      string `json:"ip"`
	Address string `json:"address"`
	Agent   string `json:"agent"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type OperationLog

type OperationLog struct {
	BaseModel
	Source    string `json:"source"`
	IP        string `json:"ip"`
	Node      string `json:"node"`
	Path      string `json:"path"`
	Method    string `json:"method"`
	UserAgent string `json:"userAgent"`

	Latency time.Duration `json:"latency"`
	Status  string        `json:"status"`
	Message string        `json:"message"`

	DetailZH string `json:"detailZH"`
	DetailEN string `json:"detailEN"`
}

type ScriptLibrary

type ScriptLibrary struct {
	BaseModel
	Name          string `json:"name" gorm:"not null;"`
	IsInteractive bool   `json:"isInteractive"`
	Script        string `json:"script" gorm:"not null;"`
	Groups        string `json:"groups"`
	IsSystem      bool   `json:"isSystem"`
	Description   string `json:"description"`
}

type Setting

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

type Task

type Task struct {
	ID             string    `gorm:"primarykey;" json:"id"`
	Name           string    `json:"name"`
	Type           string    `json:"type"`
	Operate        string    `json:"operate"`
	LogFile        string    `json:"logFile"`
	Status         string    `json:"status"`
	ErrorMsg       string    `json:"errorMsg"`
	OperationLogID uint      `json:"operationLogID"`
	ResourceID     uint      `json:"resourceID"`
	CurrentStep    string    `json:"currentStep"`
	EndAt          time.Time `json:"endAt"`
	CreatedAt      time.Time `json:"createdAt"`
}

type UpgradeLog

type UpgradeLog struct {
	BaseModel
	NodeID     uint   `json:"nodeID"`
	OldVersion string `json:"oldVersion"`
	NewVersion string `json:"newVersion"`
	BackupFile string `json:"backupFile"`
}

type WebsiteCA

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 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"`
}

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