Documentation ¶
Index ¶
- func AddCert(cert *Cert) (bool, error)
- func AddRecord(record *Record) (bool, error)
- func AddRule(rule *Rule) (bool, error)
- func AddSite(site *Site) (bool, error)
- func CreateTables()
- func DeleteCert(cert *Cert) (bool, error)
- func DeleteRecord(record *Record) (bool, error)
- func DeleteRule(rule *Rule) (bool, error)
- func DeleteSite(site *Site) (bool, error)
- func GetAcmeClient(useProxy bool) (*lego.Client, error)
- func GetMetrics(dataType string, startAt time.Time, top int) (*[]DataCount, error)
- func GetMetricsOverTime(startAt time.Time, timeType string) (*[]DataCount, error)
- func GetWAFRules() string
- func InitAdapter()
- func InitConfig()
- func InitFlag()
- func InitSiteMap()
- func RenewCert(cert *Cert) (bool, error)
- func StartMonitorSitesLoop()
- func UpdateCert(id string, cert *Cert) (bool, error)
- func UpdateRecord(owner string, id string, record *Record) (bool, error)
- func UpdateRule(id string, rule *Rule) (bool, error)
- func UpdateSite(id string, site *Site) (bool, error)
- func UpdateSiteNoRefresh(id string, site *Site) (bool, error)
- type Account
- type Cert
- type DataCount
- type Expression
- type HttpProvider
- type Node
- type Ormer
- type Record
- type Rule
- type Site
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTables ¶ added in v1.3.0
func CreateTables()
func DeleteCert ¶
func DeleteRecord ¶ added in v1.7.0
func DeleteRule ¶ added in v1.13.0
func DeleteSite ¶
func GetMetrics ¶ added in v1.8.0
func GetMetricsOverTime ¶ added in v1.8.0
func GetWAFRules ¶ added in v1.13.0
func GetWAFRules() string
func InitAdapter ¶
func InitAdapter()
func InitConfig ¶
func InitConfig()
func InitSiteMap ¶
func InitSiteMap()
func StartMonitorSitesLoop ¶ added in v1.3.0
func StartMonitorSitesLoop()
func UpdateRecord ¶ added in v1.7.0
Types ¶
type Account ¶ added in v1.3.0
type Account struct { Email string Registration *registration.Resource // contains filtered or unexported fields }
func (*Account) GetPrivateKey ¶ added in v1.3.0
func (a *Account) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns the private RSA account key.
func (*Account) GetRegistration ¶ added in v1.3.0
func (a *Account) GetRegistration() *registration.Resource
GetRegistration returns the server registration.
type Cert ¶
type Cert struct { Owner string `xorm:"varchar(100) notnull pk" json:"owner"` Name string `xorm:"varchar(100) notnull pk" json:"name"` CreatedTime string `xorm:"varchar(100)" json:"createdTime"` DisplayName string `xorm:"varchar(100)" json:"displayName"` Type string `xorm:"varchar(100)" json:"type"` CryptoAlgorithm string `xorm:"varchar(100)" json:"cryptoAlgorithm"` ExpireTime string `xorm:"varchar(100)" json:"expireTime"` DomainExpireTime string `xorm:"varchar(100)" json:"domainExpireTime"` Provider string `xorm:"varchar(100)" json:"provider"` Account string `xorm:"varchar(100)" json:"account"` AccessKey string `xorm:"varchar(100)" json:"accessKey"` AccessSecret string `xorm:"varchar(100)" json:"accessSecret"` Certificate string `xorm:"mediumtext" json:"certificate"` PrivateKey string `xorm:"mediumtext" json:"privateKey"` }
func GetCertByDomain ¶ added in v1.3.0
func GetGlobalCerts ¶
func GetMaskedCert ¶ added in v1.3.0
func GetMaskedCerts ¶ added in v1.3.0
type Expression ¶ added in v1.13.0
type HttpProvider ¶ added in v1.3.0
type HttpProvider struct {
// contains filtered or unexported fields
}
type Ormer ¶ added in v1.3.0
Ormer represents the MySQL adapter for policy storage.
func NewAdapter ¶
NewAdapter is the constructor for Ormer.
func (*Ormer) CreateDatabase ¶ added in v1.3.0
type Record ¶ added in v1.7.0
type Record struct { Id int64 `xorm:"int notnull pk autoincr" json:"id"` Owner string `xorm:"varchar(100) notnull" json:"owner"` CreatedTime string `xorm:"varchar(100) notnull" json:"createdTime"` Method string `xorm:"varchar(100)" json:"method"` Host string `xorm:"varchar(100)" json:"host"` Path string `xorm:"varchar(100)" json:"path"` ClientIp string `xorm:"varchar(100)" json:"clientIp"` UserAgent string `xorm:"varchar(512)" json:"userAgent"` }
func GetRecords ¶ added in v1.7.0
type Rule ¶ added in v1.13.0
type Rule struct { Owner string `xorm:"varchar(100) notnull pk" json:"owner"` Name string `xorm:"varchar(100) notnull pk" json:"name"` Type string `xorm:"varchar(100) notnull" json:"type"` Expressions []Expression `xorm:"mediumtext" json:"expressions"` CreatedTime string `xorm:"varchar(100) notnull" json:"createdTime"` UpdatedTime string `xorm:"varchar(100) notnull" json:"updatedTime"` }
type Site ¶
type Site struct { Owner string `xorm:"varchar(100) notnull pk" json:"owner"` Name string `xorm:"varchar(100) notnull pk" json:"name"` CreatedTime string `xorm:"varchar(100)" json:"createdTime"` UpdatedTime string `xorm:"varchar(100)" json:"updatedTime"` DisplayName string `xorm:"varchar(100)" json:"displayName"` Tag string `xorm:"varchar(100)" json:"tag"` Domain string `xorm:"varchar(100)" json:"domain"` OtherDomains []string `xorm:"varchar(500)" json:"otherDomains"` NeedRedirect bool `json:"needRedirect"` EnableWaf bool `json:"enableWaf"` Waf coraza.WAF `xorm:"-" json:"-"` Challenges []string `xorm:"mediumtext" json:"challenges"` Host string `xorm:"varchar(100)" json:"host"` Port int `json:"port"` SslMode string `xorm:"varchar(100)" json:"sslMode"` SslCert string `xorm:"-" json:"sslCert"` PublicIp string `xorm:"varchar(100)" json:"publicIp"` Node string `xorm:"varchar(100)" json:"node"` IsSelf bool `json:"isSelf"` Status string `xorm:"varchar(100)" json:"status"` Nodes []*Node `xorm:"mediumtext" json:"nodes"` CasdoorApplication string `xorm:"varchar(100)" json:"casdoorApplication"` ApplicationObj *casdoorsdk.Application `xorm:"-" json:"applicationObj"` }
func GetGlobalSites ¶
func GetMaskedSite ¶
func GetMaskedSites ¶
func GetSiteByDomain ¶
func (*Site) GetChallengeMap ¶ added in v1.3.0
type VersionInfo ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.