Browse Source

new dns update model

Matthew R Kasun 2 năm trước cách đây
mục cha
commit
2c36dfb0bf
1 tập tin đã thay đổi với 14 bổ sung0 xóa
  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"`