api

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: AGPL-3.0 Imports: 46 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Success = "success"
	Info    = "info"
	Error   = "error"
)
View Source
const ChatGPTInitPrompt = "" /* 472-byte string literal not displayed */
View Source
const (
	PageSize = 128 * 1024
)

Variables

This section is empty.

Functions

func AddCert added in v1.7.0

func AddCert(c *gin.Context)

func AddConfig

func AddConfig(c *gin.Context)

func AddDnsCredential added in v1.8.0

func AddDnsCredential(c *gin.Context)

func AddDomainToAutoCert

func AddDomainToAutoCert(c *gin.Context)

func AddUser

func AddUser(c *gin.Context)

func Analytic

func Analytic(c *gin.Context)

func BindAndValid

func BindAndValid(c *gin.Context, target interface{}) bool

func BuildNginxConfig added in v1.5.0

func BuildNginxConfig(c *gin.Context)

func DeleteDnsCredential added in v1.8.0

func DeleteDnsCredential(c *gin.Context)

func DeleteDomain

func DeleteDomain(c *gin.Context)

func DeleteUser

func DeleteUser(c *gin.Context)

func DisableDomain

func DisableDomain(c *gin.Context)

func DomainEditByAdvancedMode added in v1.8.0

func DomainEditByAdvancedMode(c *gin.Context)

func DuplicateSite added in v1.7.6

func DuplicateSite(c *gin.Context)

func EditConfig

func EditConfig(c *gin.Context)

func EditDnsCredential added in v1.8.0

func EditDnsCredential(c *gin.Context)

func EditUser

func EditUser(c *gin.Context)

func EnableDomain

func EnableDomain(c *gin.Context)

func ErrHandler

func ErrHandler(c *gin.Context, err error)

func FormatNginxConfig added in v1.7.0

func FormatNginxConfig(c *gin.Context)

func GetAnalyticInit

func GetAnalyticInit(c *gin.Context)

func GetCert added in v1.7.0

func GetCert(c *gin.Context)

func GetCertList added in v1.7.0

func GetCertList(c *gin.Context)

func GetConfig

func GetConfig(c *gin.Context)

func GetConfigs

func GetConfigs(c *gin.Context)

func GetCurrentVersion added in v1.7.2

func GetCurrentVersion(c *gin.Context)

func GetDNSProvider added in v1.8.0

func GetDNSProvider(c *gin.Context)

func GetDNSProvidersList added in v1.8.0

func GetDNSProvidersList(c *gin.Context)

func GetDnsCredential added in v1.8.0

func GetDnsCredential(c *gin.Context)

func GetDnsCredentialList added in v1.8.0

func GetDnsCredentialList(c *gin.Context)

func GetDomain

func GetDomain(c *gin.Context)

func GetDomains

func GetDomains(c *gin.Context)

func GetFileBackup

func GetFileBackup(c *gin.Context)

func GetFileBackupList

func GetFileBackupList(c *gin.Context)

func GetNginxLogPage added in v1.6.1

func GetNginxLogPage(c *gin.Context)

func GetRelease added in v1.7.2

func GetRelease(c *gin.Context)

func GetSettings added in v1.7.0

func GetSettings(c *gin.Context)

func GetTemplate

func GetTemplate(c *gin.Context)

func GetTemplateBlock added in v1.7.0

func GetTemplateBlock(c *gin.Context)

func GetTemplateBlockList added in v1.7.0

func GetTemplateBlockList(c *gin.Context)

func GetTemplateConfList added in v1.7.0

func GetTemplateConfList(c *gin.Context)

func GetUser

func GetUser(c *gin.Context)

func GetUsers

func GetUsers(c *gin.Context)

func InstallLockCheck

func InstallLockCheck(c *gin.Context)

func InstallNginxUI

func InstallNginxUI(c *gin.Context)

func IssueCert

func IssueCert(c *gin.Context)

func Login

func Login(c *gin.Context)

func Logout

func Logout(c *gin.Context)

func MakeChatCompletionRequest added in v1.7.8

func MakeChatCompletionRequest(c *gin.Context)

func ModifyCert added in v1.7.0

func ModifyCert(c *gin.Context)

func NginxLog added in v1.6.0

func NginxLog(c *gin.Context)

func NginxStatus added in v1.7.6

func NginxStatus(c *gin.Context)

func PerformCoreUpgrade added in v1.7.2

func PerformCoreUpgrade(c *gin.Context)

func Pty added in v1.4.0

func Pty(c *gin.Context)

func ReloadNginx added in v1.7.3

func ReloadNginx(c *gin.Context)

func RemoveCert added in v1.7.0

func RemoveCert(c *gin.Context)

func RemoveDomainFromAutoCert

func RemoveDomainFromAutoCert(c *gin.Context)

func RestartNginx added in v1.7.6

func RestartNginx(c *gin.Context)

func SaveDomain added in v1.7.6

func SaveDomain(c *gin.Context)

func SaveSettings added in v1.7.0

func SaveSettings(c *gin.Context)

func StoreChatGPTRecord added in v1.7.8

func StoreChatGPTRecord(c *gin.Context)

func TestNginx added in v1.7.4

func TestNginx(c *gin.Context)

func TokenizeNginxConfig added in v1.5.0

func TokenizeNginxConfig(c *gin.Context)

Types

type AddConfigJson

type AddConfigJson struct {
	Name    string `json:"name" binding:"required"`
	Content string `json:"content" binding:"required"`
}

type CPUStat added in v1.5.0

type CPUStat struct {
	User   float64 `json:"user"`
	System float64 `json:"system"`
	Idle   float64 `json:"idle"`
	Total  float64 `json:"total"`
}

type CertificateInfo added in v1.5.0

type CertificateInfo struct {
	SubjectName string    `json:"subject_name"`
	IssuerName  string    `json:"issuer_name"`
	NotAfter    time.Time `json:"not_after"`
	NotBefore   time.Time `json:"not_before"`
}

type DiskStat added in v1.5.0

type DiskStat struct {
	Total      string         `json:"total"`
	Used       string         `json:"used"`
	Percentage float64        `json:"percentage"`
	Writes     analytic.Usage `json:"writes"`
	Reads      analytic.Usage `json:"reads"`
}

type DnsCredentialManageJson added in v1.8.0

type DnsCredentialManageJson struct {
	Name     string `json:"name" binding:"required"`
	Provider string `json:"provider"`
	dns.Config
}

type EditConfigJson

type EditConfigJson struct {
	Content string `json:"content" binding:"required"`
}

type InstallJson

type InstallJson struct {
	Email    string `json:"email" binding:"required,email"`
	Username string `json:"username" binding:"required,max=255"`
	Password string `json:"password" binding:"required,max=255"`
	Database string `json:"database"`
}

type IssueCertResponse added in v1.5.0

type IssueCertResponse struct {
	Status            string `json:"status"`
	Message           string `json:"message"`
	SSLCertificate    string `json:"ssl_certificate,omitempty"`
	SSLCertificateKey string `json:"ssl_certificate_key,omitempty"`
}

type LoginUser

type LoginUser struct {
	Name     string `json:"name" binding:"required,max=255"`
	Password string `json:"password" binding:"required,max=255"`
}

type MemStat added in v1.5.0

type MemStat struct {
	Total       string  `json:"total"`
	Used        string  `json:"used"`
	Cached      string  `json:"cached"`
	Free        string  `json:"free"`
	SwapUsed    string  `json:"swap_used"`
	SwapTotal   string  `json:"swap_total"`
	SwapCached  string  `json:"swap_cached"`
	SwapPercent float64 `json:"swap_percent"`
	Pressure    float64 `json:"pressure"`
}

type Stat added in v1.5.0

type Stat struct {
	Uptime  uint64             `json:"uptime"`
	LoadAvg *load.AvgStat      `json:"loadavg"`
	CPU     CPUStat            `json:"cpu"`
	Memory  MemStat            `json:"memory"`
	Disk    DiskStat           `json:"disk"`
	Network net.IOCountersStat `json:"network"`
}

type UserJson

type UserJson struct {
	Name     string `json:"name" binding:"required,max=255"`
	Password string `json:"password" binding:"max=255"`
}

type ValidError

type ValidError struct {
	Key     string
	Message string
}

Jump to

Keyboard shortcuts

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