Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpsertRules ¶
UpsertRules creates or updates dns rule from user submit
Types ¶
type Record ¶
type Record struct { Domain string `gorm:"index" form:"domain" json:"domain"` Value string `form:"value" json:"value"` record.BaseRecord Rule Rule `gorm:"foreignKey:RuleName;references:Name;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;" form:"-" json:"-" notice:"-"` }
type Rule ¶
type Rule struct { rule.BaseRule `yaml:",inline"` Type newdns.Type `gorm:"default:1" form:"type" json:"type"` Value string `form:"value" json:"value"` TTL time.Duration `gorm:"ttl;default:10" form:"ttl" json:"ttl"` }
func NewRule ¶
func NewRule(name, flagFormat, value string, pushToClient, notice bool, _type newdns.Type, ttl time.Duration) *Rule
NewRule new dns rule struct
func (*Rule) CreateOrUpdate ¶
CreateOrUpdate creates or updates the dns rule in database and ruleSet
type Server ¶
type Server struct { Config // contains filtered or unexported fields }
func (*Server) SetServerDomain ¶
func (*Server) SetServerIP ¶
func (*Server) UpdateRules ¶
Click to show internal directories.
Click to hide internal directories.