Explorar o código

new dns update model

Matthew R Kasun %!s(int64=2) %!d(string=hai) anos
pai
achega
2c36dfb0bf
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  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
 // TODO:  Either add a returnNetwork and returnKey, or delete this
 package models
 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
 // DNSEntry - a DNS entry represented as struct
 type DNSEntry struct {
 type DNSEntry struct {
 	Address  string `json:"address" bson:"address" validate:"ip"`
 	Address  string `json:"address" bson:"address" validate:"ip"`