Documentation ¶
Index ¶
- Constants
- func Serve(w http.ResponseWriter, r *http.Request, id, ext, lang string, download bool, ...) error
- type AppSecurity
- type AppSecuritySet
- type AppSetting
- type CR
- type DeleteRecordRequest
- type DnsRecord
- type DnsRecordResp
- type DnsServer
- type DnsServerConfig
- type HttpRecord
- type HttpRecordResp
- type LoginRequest
- type LoginResponse
- type MyClaims
- type Pagination
- type Permission
- type PermissionActionSet
- type Resolve
- type ResolveItem
- type ResolveList
- type ResolveResult
- type Role
- type TranslateItem
- type UserInfo
- type UserListResp
- type UserRequest
- type WebServer
- func (h *WebServer) Index(c *gin.Context)
- func (self *WebServer) IsDuplicate(err error) bool
- func (self *WebServer) ResetPassword(user, password string) error
- func (self *WebServer) Run() error
- func (self *WebServer) RunStoreRoutine()
- func (self *WebServer) Shutdown(ctx context.Context) error
- func (h *WebServer) Status(c *gin.Context)
- type WebServerConfig
Constants ¶
View Source
const ( LOG_TTL = 0 NS_TTL = 600 DEFAULT_TTL = 300 XIP_TTL = 86400 * 7 // one week CUSTOM_REBIND_EXPIRE = 3600 * time.Second )
View Source
const ( CodeOK = models.CodeOK CodeBadPermission = models.CodeBadPermission CodeBadData = models.CodeBadData CodeNoAuth = models.CodeNoAuth CodeNoPermission = models.CodeNoPermission CodeServerInternal = models.CodeServerInternal CodeNoData = models.CodeNoData CodeExpire = models.CodeExpire VerifycodeErr = models.VerifycodeErr )
============================================================================== api models ==============================================================================
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppSecurity ¶
type AppSecurity models.AppSecurity
type AppSecuritySet ¶
type AppSecuritySet models.AppSecuritySet
type AppSetting ¶
type AppSetting models.AppSetting
type DeleteRecordRequest ¶
type DeleteRecordRequest models.DeleteRecordRequest
type DnsRecordResp ¶
type DnsRecordResp models.DnsRecordResp
type DnsServer ¶
type DnsServer struct { DnsServerConfig // contains filtered or unexported fields }
func NewDnsServer ¶
func NewDnsServer(cfg *DnsServerConfig, store *cache.Cache) (*DnsServer, error)
type DnsServerConfig ¶
type DnsServerConfig struct { Domain string RTimeout, WTimeout time.Duration V4, V6 net.IP Upstream string }
dns server 配置
type HttpRecord ¶
type HttpRecord models.HttpRecord
type HttpRecordResp ¶
type HttpRecordResp models.HttpRecordResp
type LoginRequest ¶
type LoginRequest models.LoginRequest
type LoginResponse ¶
type LoginResponse models.LoginResponse
type Pagination ¶
type Pagination models.Pagination
type Permission ¶
type Permission models.Permission
type PermissionActionSet ¶
type PermissionActionSet models.PermissionActionSet
type ResolveItem ¶
type ResolveList ¶
type ResolveList []*ResolveItem
type ResolveResult ¶
type ResolveResult struct { Pagination Data ResolveList `json:"data"` }
type TranslateItem ¶
type UserListResp ¶
type UserListResp models.UserListResp
type UserRequest ¶
type UserRequest models.UserRequest
type WebServer ¶
type WebServer struct { WebServerConfig // contains filtered or unexported fields }
func NewWebServer ¶
func NewWebServer(cfg *WebServerConfig, store *cache.Cache) (*WebServer, error)
func (*WebServer) Index ¶
Reference: https://github.com/fanjq99/dnslog.git
func (*WebServer) IsDuplicate ¶
func (*WebServer) ResetPassword ¶
func (*WebServer) RunStoreRoutine ¶
func (self *WebServer) RunStoreRoutine()
type WebServerConfig ¶
type WebServerConfig struct { Driver string `json:"driver"` // 驱动名 Dsn string `json:"dsn"` // 驱动链接信息 Domain string `json:"domain"` // 域名 Author string `json:"author"` // IP string `json:"ip"` // ip地址 Listen string `json:"listen"` // 监听地址,默认 0:8081 Swagger bool `json:"swagger"` // 默认 false WithGuest bool `json:"withGuest"` // 默认false AuthExpire time.Duration `json:"auth_expire"` // 登陆有效期 DefaultCleanInterval int64 `json:"default_clean_interval"` DefaultQueryApiMaxItem int `json:"default_query_api_max_item"` DefaultMaxCallbackErrorCount int64 `json:"default_max_callback_error_count"` DefaultLanguage string `json:"default_language"` ServerPem string `json:"server_pem"` ServerKey string `json:"server_key"` }
Click to show internal directories.
Click to hide internal directories.