Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2020 Changes in this version + const EventBackendDown + const EventBackendUp + const LocationPatternTypeExact + const LocationPatternTypePrefix + const LocationPatternTypeRegexp + const NodeRoleMaster + const NodeRoleSlave + const RewriteFlagProxy + const RewriteFlagRedirect + const RewriteTargetProxy + const RewriteTargetURL + const WebsocketForwardModeHttp + const WebsocketForwardModeWebsocket + var AllTLSCipherSuites = []TLSCipherSuite + var AllTlsVersions = []TLSVersion + var DefaultGzipMimeTypes = []string + var TLSIntermediateCipherSuites = []string + var TLSModernCipherSuites = []string + func AllLocationPatternTypes() []maps.Map + func AllNodeRoles() []string + func AllSSLClientAuthTypes() []maps.Map + func AllTimePasts() []maps.Map + func AllWebsocketForwardModes() []maps.Map + func ExistNodeRole(role NodeRole) bool + func FindLocationPatternType(patternType int) maps.Map + func FindLocationPatternTypeName(patternType int) string + func FindSSLClientAuthTypeName(authType SSLClientAuthType) string + func GoSSLClientAuthType(authType SSLClientAuthType) tls.ClientAuthType + func TimePastUnixTime(past TimePast) (timestamp int64) + func TimePastUnixTimeWithUnit(number int64, unit TimeUnit) int64 + type ACMEDNSProvider struct + func NewACMEDNSProvider(apiAuthToken string) *ACMEDNSProvider + func (this *ACMEDNSProvider) CleanUp(domain, token, keyAuth string) error + func (this *ACMEDNSProvider) Present(domain, token, keyAuth string) error + type ACMEDNSRecord struct + FQDN string + Value string + type ACMELocalUser struct + Email string + Id string + Key string + Name string + On bool + URI string + func NewACMELocalUser() *ACMELocalUser + type ACMELocalUserList struct + Users []*ACMELocalUser + func SharedACMELocalUserList() *ACMELocalUserList + func (this *ACMELocalUserList) AddUser(user *ACMELocalUser) + func (this *ACMELocalUserList) FindUser(userId string) *ACMELocalUser + func (this *ACMELocalUserList) RemoveUser(userId string) + func (this *ACMELocalUserList) Save() error + type ACMERequest struct + Cert string + CertURL string + DNSRecords []*ACMEDNSRecord + Domains []string + Key string + User *ACMELocalUser + func NewACMERequest() *ACMERequest + func (this *ACMERequest) CertDate() [2]string + func (this *ACMERequest) CertObject() (*tls.Certificate, error) + func (this *ACMERequest) Client() (client *lego.Client, err error) + func (this *ACMERequest) Renew(client *lego.Client) error + func (this *ACMERequest) Retrieve(client *lego.Client) error + func (this *ACMERequest) RetrieveDNSRecords(client *lego.Client) (records []*ACMEDNSRecord, err error) + func (this *ACMERequest) WriteCertFile(path string) error + func (this *ACMERequest) WriteKeyFile(path string) error + type ACMEUser struct + Email string + Key crypto.PrivateKey + Registration *registration.Resource + func (this *ACMEUser) GetEmail() string + func (this *ACMEUser) GetPrivateKey() crypto.PrivateKey + func (this *ACMEUser) GetRegistration() *registration.Resource + type AccessLogConfig struct + Fields []int + Id string + On bool + Status1 bool + Status2 bool + Status3 bool + Status4 bool + Status5 bool + StorageOnly bool + StoragePolicies []string + func NewAccessLogConfig() *AccessLogConfig + func (this *AccessLogConfig) ContainsStoragePolicy(storagePolicyId string) bool + func (this *AccessLogConfig) Match(status int) bool + func (this *AccessLogConfig) Validate() error + type AccessLogStoragePolicy struct + Cond []*shared.RequestCond + Id string + Name string + On bool + Options map[string]interface{} + Type string + func NewAccessLogStoragePolicy() *AccessLogStoragePolicy + func NewAccessLogStoragePolicyFromId(id string) *AccessLogStoragePolicy + func (this *AccessLogStoragePolicy) Delete() error + func (this *AccessLogStoragePolicy) MatchConds(formatter func(string) string) bool + func (this *AccessLogStoragePolicy) MatchKeyword(keyword string) (matched bool, name string, tags []string) + func (this *AccessLogStoragePolicy) Save() error + func (this *AccessLogStoragePolicy) Validate() error + type AccessLogStoragePolicyList struct + Ids []string + func SharedAccessLogStoragePolicyList() *AccessLogStoragePolicyList + func (this *AccessLogStoragePolicyList) AddId(id string) + func (this *AccessLogStoragePolicyList) FindAllPolicies() []*AccessLogStoragePolicy + func (this *AccessLogStoragePolicyList) RemoveId(id string) + func (this *AccessLogStoragePolicyList) Save() error + type BackendConfig struct + Address string + Cert *SSLCertConfig + CheckInterval int + CheckOn bool + CheckTimeout string + CheckURL string + Code string + CurrentConns int32 + CurrentFails int32 + DownTime time.Time + FTP *FTPBackendConfig + FailTimeout string + Host string + Id string + IdleConns int32 + IdleTimeout string + IsBackup bool + IsDown bool + MaxConns int32 + MaxFails int32 + On bool + ReadTimeout string + RequestGroupIds []string + RequestURI string + ResponseHeaders []*shared.HeaderConfig + Scheme string + TeaVersion string + Version int + Weight uint + func NewBackendConfig() *BackendConfig + func (this *BackendConfig) AddRequestGroupId(requestGroupId string) + func (this *BackendConfig) AddResponseHeader(header *shared.HeaderConfig) + func (this *BackendConfig) CandidateCodes() []string + func (this *BackendConfig) CandidateWeight() uint + func (this *BackendConfig) CheckHealth() bool + func (this *BackendConfig) CloneState(oldBackend *BackendConfig) + func (this *BackendConfig) Compatible() + func (this *BackendConfig) DecreaseConn() int32 + func (this *BackendConfig) DownCallback(callback func(backend *BackendConfig)) + func (this *BackendConfig) FailTimeoutDuration() time.Duration + func (this *BackendConfig) HasAddrVariables() bool + func (this *BackendConfig) HasCheckURL() bool + func (this *BackendConfig) HasHost() bool + func (this *BackendConfig) HasRequestGroupId(requestGroupId string) bool + func (this *BackendConfig) HasRequestURI() bool + func (this *BackendConfig) HasResponseHeaders() bool + func (this *BackendConfig) IdleTimeoutDuration() time.Duration + func (this *BackendConfig) IncreaseConn() int32 + func (this *BackendConfig) IncreaseFails() int32 + func (this *BackendConfig) IsFTP() bool + func (this *BackendConfig) IsHTTP() bool + func (this *BackendConfig) IsTCP() bool + func (this *BackendConfig) OnAttach() + func (this *BackendConfig) OnDetach() + func (this *BackendConfig) OnDown() + func (this *BackendConfig) OnUp() + func (this *BackendConfig) ReadTimeoutDuration() time.Duration + func (this *BackendConfig) RemoveRequestGroupId(requestGroupId string) + func (this *BackendConfig) RequestArgs() string + func (this *BackendConfig) RequestPath() string + func (this *BackendConfig) RestartChecking() + func (this *BackendConfig) StopChecking() + func (this *BackendConfig) Touch() + func (this *BackendConfig) UniqueKey() string + func (this *BackendConfig) UpCallback(callback func(backend *BackendConfig)) + func (this *BackendConfig) Validate() error + type BackendDownEvent struct + Backend *BackendConfig + Location *LocationConfig + Server *ServerConfig + Websocket *WebsocketConfig + func (this *BackendDownEvent) Type() string + type BackendList struct + Backends []*BackendConfig + Scheduling *SchedulingConfig + func (this *BackendList) AddBackend(backend *BackendConfig) + func (this *BackendList) AllBackends() []*BackendConfig + func (this *BackendList) CloneBackendList() *BackendList + func (this *BackendList) DeleteBackend(backendId string) + func (this *BackendList) DeleteBackends(backendIds []string) + func (this *BackendList) FindBackend(backendId string) *BackendConfig + func (this *BackendList) HasBackends() bool + func (this *BackendList) NextBackend(call *shared.RequestCall) *BackendConfig + func (this *BackendList) SchedulingConfig() *SchedulingConfig + func (this *BackendList) SetSchedulingConfig(scheduling *SchedulingConfig) + func (this *BackendList) SetupScheduling(isBackup bool) + func (this *BackendList) ValidateBackends() error + type BackendListInterface interface + AddBackend func(backend *BackendConfig) + AllBackends func() []*BackendConfig + DeleteBackend func(backendId string) + FindBackend func(backendId string) *BackendConfig + SchedulingConfig func() *SchedulingConfig + SetSchedulingConfig func(scheduling *SchedulingConfig) + SetupScheduling func(isBackup bool) + ValidateBackends func() error + type BackendUpEvent struct + Backend *BackendConfig + Location *LocationConfig + Server *ServerConfig + Websocket *WebsocketConfig + func (this *BackendUpEvent) Type() string + type Board struct + Charts []*BoardChart + func NewBoard() *Board + func (this *Board) AddChart(widgetId string, chartId string) + func (this *Board) HasChart(chartId string) bool + func (this *Board) MoveChart(fromIndex int, toIndex int) + func (this *Board) RemoveChart(chartId string) + type BoardChart struct + ChartId string + WidgetId string + func (this *BoardChart) FindChart() (widget *widgets.Widget, chart *widgets.Chart) + type CacheConfig struct + Filename string + PolicyFiles []string + func NewCacheConfig() *CacheConfig + func SharedCacheConfig() (*CacheConfig, error) + func (this *CacheConfig) AddPolicy(file string) + func (this *CacheConfig) DeletePolicy(file string) + func (this *CacheConfig) FindAllPolicies() []*shared.CachePolicy + func (this *CacheConfig) Save() error + type FTPBackendConfig struct + Dir string + Password string + Username string + type FastcgiConfig struct + ConnTimeout string + Id string + Index string + On bool + Params map[string]string + Pass string + PathInfoPattern string + PoolSize int + ReadTimeout string + SendTimeout string + func NewFastcgiConfig() *FastcgiConfig + func (this *FastcgiConfig) Address() string + func (this *FastcgiConfig) FilterParams(req *http.Request) maps.Map + func (this *FastcgiConfig) Network() string + func (this *FastcgiConfig) Param(paramName string) string + func (this *FastcgiConfig) PathInfoRegexp() *regexp.Regexp + func (this *FastcgiConfig) ReadTimeoutDuration() time.Duration + func (this *FastcgiConfig) Validate() error + type FastcgiList struct + Fastcgi []*FastcgiConfig + func (this *FastcgiList) AddFastcgi(fastcgi *FastcgiConfig) + func (this *FastcgiList) AllFastcgi() []*FastcgiConfig + func (this *FastcgiList) FindFastcgi(fastcgiId string) *FastcgiConfig + func (this *FastcgiList) NextFastcgi() *FastcgiConfig + func (this *FastcgiList) RemoveFastcgi(fastcgiId string) + func (this *FastcgiList) ValidateFastcgi() error + type FastcgiListInterface interface + AddFastcgi func(fastcgi *FastcgiConfig) + AllFastcgi func() []*FastcgiConfig + FindFastcgi func(fastcgiId string) *FastcgiConfig + NextFastcgi func() *FastcgiConfig + RemoveFastcgi func(fastcgiId string) + ValidateFastcgi func() error + type ForwardHTTPConfig struct + EnableMITM bool + func NewForwardHTTPConfig() *ForwardHTTPConfig + type GzipConfig struct + Level int8 + MimeTypes []string + MinLength string + func (this *GzipConfig) MatchContentType(contentType string) bool + func (this *GzipConfig) MinBytes() int64 + func (this *GzipConfig) Validate() error + type HSTSConfig struct + Domains []string + IncludeSubDomains bool + MaxAge int + On bool + Preload bool + func (this *HSTSConfig) HeaderKey() string + func (this *HSTSConfig) HeaderValue() string + func (this *HSTSConfig) Match(domain string) bool + func (this *HSTSConfig) Validate() error + type IPRangeList struct + IPRanges []*shared.IPRangeConfig + func (this *IPRangeList) AddIPRange(ipRange *shared.IPRangeConfig) + func (this *IPRangeList) RemoveIPRange(ipRangeId string) + func (this *IPRangeList) Validate() error + type LocationConfig struct + AccessLog []*AccessLogConfig + AccessLogFields1 []int + AccessPolicy *shared.AccessPolicy + Allow []string + Async bool + CacheOn bool + CachePolicy string + Charset string + Cond []*shared.RequestCond + Deny []string + DenyAll bool + DenyCond []*shared.RequestCond + DisableAccessLog1 bool + DisableStat bool + Gzip *GzipConfig + GzipLevel1 int8 + GzipMinLength1 string + Id string + Index []string + IsBreak bool + LogOnly bool + MaxBodySize string + Name string + Notify []interface{} + On bool + Pages []*PageConfig + Pattern string + Proxy string + RedirectToHttps bool + Root string + Shutdown *ShutdownConfig + ShutdownPage1 string + ShutdownPageOn1 bool + URLPrefix string + WAFOn bool + WafId string + Websocket *WebsocketConfig + func NewLocation() *LocationConfig + func (this *LocationConfig) AddCond(cond *shared.RequestCond) + func (this *LocationConfig) AddPage(page *PageConfig) + func (this *LocationConfig) AddRequestGroup(group *RequestGroup) + func (this *LocationConfig) CachePolicyObject() *shared.CachePolicy + func (this *LocationConfig) CloneState(oldLocation *LocationConfig) + func (this *LocationConfig) Compatible(version string) + func (this *LocationConfig) IsCaseInsensitive() bool + func (this *LocationConfig) IsDenied(formatter func(source string) string) bool + func (this *LocationConfig) IsReverse() bool + func (this *LocationConfig) Match(path string, formatter func(source string) string) (vars map[string]string, isMatched bool) + func (this *LocationConfig) MatchKeyword(keyword string) (matched bool, name string, tags []string) + func (this *LocationConfig) MatchRequestGroup(formatter func(source string) string) *RequestGroup + func (this *LocationConfig) MaxBodyBytes() int64 + func (this *LocationConfig) NextBackend(call *shared.RequestCall) *BackendConfig + func (this *LocationConfig) OnAttach() + func (this *LocationConfig) OnDetach() + func (this *LocationConfig) PatternString() string + func (this *LocationConfig) PatternType() int + func (this *LocationConfig) RefersProxy(proxyId string) bool + func (this *LocationConfig) SetPattern(pattern string, patternType int, caseInsensitive bool, reverse bool) + func (this *LocationConfig) SetupScheduling(isBackup bool) + func (this *LocationConfig) Validate() error + func (this *LocationConfig) WAF() *teawaf.WAF + type LocationPatternType = int + type MimeTypeRule struct + Regexp *regexp.Regexp + Value string + type NodeConfig struct + ClusterAddr string + ClusterId string + ClusterSecret string + Id string + Name string + On bool + Role NodeRole + func SharedNodeConfig() *NodeConfig + func (this *NodeConfig) IsMaster() bool + func (this *NodeConfig) Save() error + type NodeRole = string + type PageConfig struct + NewStatus int + On bool + Status []string + URL string + func NewPageConfig() *PageConfig + func (this *PageConfig) Match(status int) bool + func (this *PageConfig) Validate() error + type ProxySetting struct + MatchDomainStrictly bool + func LoadProxySetting() *ProxySetting + func SharedProxySetting() *ProxySetting + func (this *ProxySetting) Save() error + type RequestGroup struct + Cond []*shared.RequestCond + IPRanges []*shared.IPRangeConfig + Id string + IsDefault bool + Name string + RequestHeaders []*shared.HeaderConfig + ResponseHeaders []*shared.HeaderConfig + func NewRequestGroup() *RequestGroup + func (this *RequestGroup) AddCond(cond *shared.RequestCond) + func (this *RequestGroup) AddIPRange(ipRange *shared.IPRangeConfig) + func (this *RequestGroup) AddRequestHeader(header *shared.HeaderConfig) + func (this *RequestGroup) AddResponseHeader(header *shared.HeaderConfig) + func (this *RequestGroup) Copy() *RequestGroup + func (this *RequestGroup) HasFilters() bool + func (this *RequestGroup) HasRequestHeaders() bool + func (this *RequestGroup) HasResponseHeaders() bool + func (this *RequestGroup) Match(formatter func(source string) string) bool + func (this *RequestGroup) Validate() error + type RewriteList struct + Rewrite []*RewriteRule + func (this *RewriteList) AddRewriteRule(rewrite *RewriteRule) + func (this *RewriteList) AllRewriteRules() []*RewriteRule + func (this *RewriteList) FindRewriteRule(rewriteId string) *RewriteRule + func (this *RewriteList) RemoveRewriteRule(rewriteId string) + func (this *RewriteList) ValidateRewriteRules() error + type RewriteListInterface interface + AddRewriteRule func(rewrite *RewriteRule) + AllRewriteRules func() []*RewriteRule + FindRewriteRule func(rewriteId string) *RewriteRule + RemoveRewriteRule func(rewriteId string) + ValidateRewriteRules func() error + type RewriteRule struct + Cond []*shared.RequestCond + FlagOptions maps.Map + Flags []string + Id string + IsBreak bool + IsPermanent bool + On bool + Pattern string + ProxyHost string + Replace string + func NewRewriteRule() *RewriteRule + func (this *RewriteRule) AddCond(cond *shared.RequestCond) + func (this *RewriteRule) AddFlag(flag string, options maps.Map) + func (this *RewriteRule) IsExternalURL(url string) bool + func (this *RewriteRule) Match(requestPath string, formatter func(source string) string) (replace string, varMapping map[string]string, matched bool) + func (this *RewriteRule) RedirectMode() string + func (this *RewriteRule) RefersProxy(proxyId string) bool + func (this *RewriteRule) ResetFlags() + func (this *RewriteRule) TargetProxy() string + func (this *RewriteRule) TargetType() int + func (this *RewriteRule) TargetURL() string + func (this *RewriteRule) Validate() error + type SSLCertConfig struct + CertFile string + Description string + Id string + IsCA bool + IsLocal bool + IsShared bool + KeyFile string + On bool + ServerName string + TaskId string + func NewSSLCertConfig(certFile string, keyFile string) *SSLCertConfig + func (this *SSLCertConfig) CertObject() *tls.Certificate + func (this *SSLCertConfig) DNSNames() []string + func (this *SSLCertConfig) DeleteFiles() error + func (this *SSLCertConfig) FindShared() *SSLCertConfig + func (this *SSLCertConfig) FullCertPath() string + func (this *SSLCertConfig) FullKeyPath() string + func (this *SSLCertConfig) Issuer() pkix.Name + func (this *SSLCertConfig) MatchDomain(domain string) bool + func (this *SSLCertConfig) MatchKeyword(keyword string) (matched bool, name string, tags []string) + func (this *SSLCertConfig) ReadCert() ([]byte, error) + func (this *SSLCertConfig) ReadKey() ([]byte, error) + func (this *SSLCertConfig) TimeAfter() time.Time + func (this *SSLCertConfig) TimeBefore() time.Time + func (this *SSLCertConfig) Validate() error + type SSLCertList struct + Certs []*SSLCertConfig + Tasks []*SSLCertTask + func NewSSLCertList() *SSLCertList + func SharedSSLCertList() *SSLCertList + func (this *SSLCertList) AddCert(cert *SSLCertConfig) + func (this *SSLCertList) AddTask(task *SSLCertTask) + func (this *SSLCertList) FindCert(certId string) *SSLCertConfig + func (this *SSLCertList) FindTask(taskId string) *SSLCertTask + func (this *SSLCertList) RemoveCert(certId string) + func (this *SSLCertList) RemoveTask(taskId string) + func (this *SSLCertList) Save() error + type SSLCertTask struct + Id string + On bool + Request *ACMERequest + RunAt int64 + RunError string + func NewSSLCertTask() *SSLCertTask + type SSLClientAuthType = int + const SSLClientAuthTypeNoClientCert + const SSLClientAuthTypeRequestClientCert + const SSLClientAuthTypeRequireAndVerifyClientCert + const SSLClientAuthTypeRequireAnyClientCert + const SSLClientAuthTypeVerifyClientCertIfGiven + type SSLConfig struct + CertTasks []*SSLCertTask + Certificate string + CertificateKey string + Certs []*SSLCertConfig + CipherSuites []TLSCipherSuite + ClientAuthType SSLClientAuthType + ClientCACertIds []string + HSTS *HSTSConfig + HTTP2Disabled bool + Listen []string + MinVersion TLSVersion + On bool + func NewSSLConfig() *SSLConfig + func (this *SSLConfig) AddCert(cert *SSLCertConfig) + func (this *SSLConfig) AddCertTask(certTask *SSLCertTask) + func (this *SSLConfig) CAPool() *x509.CertPool + func (this *SSLConfig) ContainsFile(file string) bool + func (this *SSLConfig) DeleteFiles() error + func (this *SSLConfig) FindCert(certId string) *SSLCertConfig + func (this *SSLConfig) FindCertTask(certTaskId string) *SSLCertTask + func (this *SSLConfig) FirstCert() *tls.Certificate + func (this *SSLConfig) MatchDomain(domain string) (cert *tls.Certificate, ok bool) + func (this *SSLConfig) ParseListenAddresses() []string + func (this *SSLConfig) RemoveCertTask(certTaskId string) + func (this *SSLConfig) TLSCipherSuites() []uint16 + func (this *SSLConfig) TLSMinVersion() uint16 + func (this *SSLConfig) Validate() error + type SchedulingConfig struct + Code string + Options maps.Map + func NewSchedulingConfig() *SchedulingConfig + type ServerConfig struct + API *api.APIConfig + AccessLog []*AccessLogConfig + AccessLogFields1 []int + Allow []string + CacheOn bool + CachePolicy string + CacheStatic bool + Charset string + Deny []string + Description string + DisableAccessLog1 bool + DisableStat bool + Filename string + ForwardHTTP *ForwardHTTPConfig + Gzip *GzipConfig + GzipLevel1 uint8 + GzipMinLength1 string + Http bool + Id string + Index []string + IsDefault bool + Listen []string + Locations []*LocationConfig + MaxBodySize string + Name []string + NoticeItems struct{ ... } + NoticeSetting map[notices.NoticeLevel][]*notices.NoticeReceiver + On bool + Pages []*PageConfig + Proxy string + RealtimeBoard *Board + RedirectToHttps bool + RequestGroups []*RequestGroup + Root string + SSL *SSLConfig + Shutdown *ShutdownConfig + ShutdownPage1 string + ShutdownPageOn1 bool + StatBoard *Board + StatItems []string + TCP *TCPConfig + TeaVersion string + Tunnel *TunnelConfig + Version int + WAFOn bool + WafId string + func LoadServerConfigsFromDir(dirPath string) []*ServerConfig + func NewServerConfig() *ServerConfig + func NewServerConfigFromFile(filename string) (*ServerConfig, error) + func NewServerConfigFromId(serverId string) *ServerConfig + func (this *ServerConfig) AddListen(address string) + func (this *ServerConfig) AddLocation(location *LocationConfig) + func (this *ServerConfig) AddName(name ...string) + func (this *ServerConfig) AddNoticeReceiver(level notices.NoticeLevel, receiver *notices.NoticeReceiver) + func (this *ServerConfig) AddPage(page *PageConfig) + func (this *ServerConfig) AddRequestGroup(group *RequestGroup) + func (this *ServerConfig) AddStatItem(item string) + func (this *ServerConfig) CachePolicyObject() *shared.CachePolicy + func (this *ServerConfig) CloneState(oldServer *ServerConfig) + func (this *ServerConfig) Delete() error + func (this *ServerConfig) FindAllNoticeReceivers(level ...notices.NoticeLevel) []*notices.NoticeReceiver + func (this *ServerConfig) FindBackendList(locationId string, websocket bool) (backendList BackendListInterface, err error) + func (this *ServerConfig) FindCerts(certId string) (result []*SSLCertConfig) + func (this *ServerConfig) FindFastcgiList(locationId string) (fastcgiList FastcgiListInterface, err error) + func (this *ServerConfig) FindHeaderList(locationId string, backendId string, rewriteId string, fastcgiId string) (headerList shared.HeaderListInterface, err error) + func (this *ServerConfig) FindLocation(locationId string) *LocationConfig + func (this *ServerConfig) FindRequestGroup(groupId string) *RequestGroup + func (this *ServerConfig) FindRewriteList(locationId string) (rewriteList RewriteListInterface, err error) + func (this *ServerConfig) FirstName() string + func (this *ServerConfig) IsForwardHTTP() bool + func (this *ServerConfig) IsHTTP() bool + func (this *ServerConfig) IsTCP() bool + func (this *ServerConfig) LocationAtIndex(index int) *LocationConfig + func (this *ServerConfig) MatchKeyword(keyword string) (matched bool, name string, tags []string) + func (this *ServerConfig) MatchName(name string) (matchedName string, matched bool) + func (this *ServerConfig) MatchRequestGroup(formatter func(source string) string) *RequestGroup + func (this *ServerConfig) MaxBodyBytes() int64 + func (this *ServerConfig) MoveLocation(fromIndex int, toIndex int) + func (this *ServerConfig) NextBackend(call *shared.RequestCall) *BackendConfig + func (this *ServerConfig) NextBackendIgnore(call *shared.RequestCall, backendIds []string) *BackendConfig + func (this *ServerConfig) OnAttach() + func (this *ServerConfig) OnDetach() + func (this *ServerConfig) ParseListenAddresses() []string + func (this *ServerConfig) RefersProxy(proxyId string) (description string, referred bool) + func (this *ServerConfig) RemoveLocation(locationId string) + func (this *ServerConfig) RemoveNoticeReceiver(level notices.NoticeLevel, receiverId string) + func (this *ServerConfig) RemoveRequestGroup(groupId string) + func (this *ServerConfig) RemoveStatItem(item string) + func (this *ServerConfig) Save() error + func (this *ServerConfig) SetupNoticeItems() + func (this *ServerConfig) SetupNoticeItemsFromRequest(req *http.Request) + func (this *ServerConfig) SetupScheduling(isBackup bool) + func (this *ServerConfig) Validate() error + func (this *ServerConfig) WAF() *teawaf.WAF + type ServerGroup struct + Id string + IsOn bool + Name string + ServerIds []string + func NewServerGroup() *ServerGroup + func (this *ServerGroup) Add(serverId ...string) + func (this *ServerGroup) Contains(serverId string) bool + func (this *ServerGroup) Remove(serverId string) + type ServerGroupList struct + Groups []*ServerGroup + func SharedServerGroupList() *ServerGroupList + func (this *ServerGroupList) Add(group *ServerGroup) + func (this *ServerGroupList) ContainsServer(serverId string) bool + func (this *ServerGroupList) Find(id string) *ServerGroup + func (this *ServerGroupList) Remove(id string) + func (this *ServerGroupList) Save() error + type ServerList struct + Files []string + func SharedServerList() (*ServerList, error) + func (this *ServerList) AddServer(serverFile string) + func (this *ServerList) FindAllServers() []*ServerConfig + func (this *ServerList) MoveServer(fromIndex int, toIndex int) + func (this *ServerList) RemoveServer(serverFile string) + func (this *ServerList) Save() error + type ShutdownConfig struct + On bool + Status int + URL string + func NewShutdownConfig() *ShutdownConfig + func (this *ShutdownConfig) Validate() error + type TCPConfig struct + ReadBufferSize int + TCPOn bool + WriteBufferSize int + func NewTCPConfig() *TCPConfig + func (this *TCPConfig) Validate() error + type TLSCipherSuite = string + type TLSVersion = string + type TimePast = string + const TimePast12h + const TimePast15m + const TimePast1d + const TimePast1h + const TimePast24h + const TimePast2d + const TimePast30d + const TimePast5m + const TimePast6h + const TimePast7d + type TimeUnit = string + const TimeUnitDay + const TimeUnitHour + const TimeUnitMinute + const TimeUnitMonth + const TimeUnitSecond + const TimeUnitYear + func TimePastUnit(past TimePast) TimeUnit + type TunnelConfig struct + Certs []*SSLCertConfig + Endpoint string + Id string + On bool + Secret string + TLS bool + func NewTunnelConfig() *TunnelConfig + func (this *TunnelConfig) AddError(err string) + func (this *TunnelConfig) Errors() []string + func (this *TunnelConfig) IsActive() bool + func (this *TunnelConfig) SetIsActive(isActive bool) + func (this *TunnelConfig) Validate() error + type WAFList struct + Files []string + func SharedWAFList() *WAFList + func (this *WAFList) AddFile(filename string) + func (this *WAFList) FindAllConfigs() []*teawaf.WAF + func (this *WAFList) FindWAF(wafId string) *teawaf.WAF + func (this *WAFList) RemoveFile(filename string) + func (this *WAFList) Save() error + func (this *WAFList) SaveWAF(waf *teawaf.WAF) error + type WebConfig struct + CertId string + func LoadWebConfig() (*WebConfig, error) + func (this *WebConfig) Save() error + type WebsocketConfig struct + AllowAllOrigins bool + ForwardMode WebsocketForwardMode + HandshakeTimeout string + On bool + Origins []string + func NewWebsocketConfig() *WebsocketConfig + func (this *WebsocketConfig) AddRequestGroup(group *RequestGroup) + func (this *WebsocketConfig) CloneState(oldWebsocket *WebsocketConfig) + func (this *WebsocketConfig) ForwardModeSummary() maps.Map + func (this *WebsocketConfig) HandshakeTimeoutDuration() time.Duration + func (this *WebsocketConfig) MatchOrigin(origin string) bool + func (this *WebsocketConfig) MatchRequestGroup(formatter func(source string) string) *RequestGroup + func (this *WebsocketConfig) NextBackend(call *shared.RequestCall) *BackendConfig + func (this *WebsocketConfig) OnDetach() + func (this *WebsocketConfig) SetupScheduling(isBackup bool) + func (this *WebsocketConfig) Validate() error + type WebsocketForwardMode = string + type WildcardStatus struct + StatusInt int + StatusRegexp *regexp.Regexp + func NewWildcardStatus(status string) *WildcardStatus + func (this *WildcardStatus) Match(status int) bool