域名服务增加访问日志

This commit is contained in:
GoEdgeLab
2021-06-02 11:53:15 +08:00
parent a5cdd6c9eb
commit 469379f63f
14 changed files with 1961 additions and 487 deletions

View File

@@ -0,0 +1,12 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package dnsconfigs
type AccessLogRef struct {
IsPrior bool `yaml:"isPrior" json:"isPrior"` // 是否覆盖
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用
}
func (this *AccessLogRef) Init() error {
return nil
}

View File

@@ -0,0 +1,31 @@
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package dnsconfigs
import "fmt"
type NSNodeConfig struct {
Id int64 `json:"id"`
ClusterId int64 `json:"clusterId"`
AccessLogRef *AccessLogRef `json:"accessLogRef"`
paddedId string
}
func (this *NSNodeConfig) Init() error {
this.paddedId = fmt.Sprintf("%08d", this.Id)
// accessLog
if this.AccessLogRef != nil {
err := this.AccessLogRef.Init()
if err != nil {
return err
}
}
return nil
}
func (this *NSNodeConfig) PaddedId() string {
return this.paddedId
}