Browse Source

new dns update model

Matthew R Kasun 2 years ago
parent
commit
2c36dfb0bf
1 changed files with 14 additions and 0 deletions
  1. 14 0
      models/dnsEntry.go

+ 14 - 0
models/dnsEntry.go

@@ -1,6 +1,20 @@
 // TODO:  Either add a returnNetwork and returnKey, or delete this
 package models
 
+type DNSUpdateAction int
+
+const (
+	DNSDelete = iota
+	DNSInsert
+	DNSReplace
+)
+
+type DNSUpdate struct {
+	Action  DNSUpdateAction
+	Name    string
+	Address string
+}
+
 // DNSEntry - a DNS entry represented as struct
 type DNSEntry struct {
 	Address  string `json:"address" bson:"address" validate:"ip"`