dns_view.go raw
1 package dns
2
3 // View wraps an NS1 views/ resource
4 type View struct {
5 Name string `json:"name,omitempty"`
6 CreatedAt int `json:"created_at,omitempty"`
7 UpdatedAt int `json:"updated_at,omitempty"`
8 ReadACLs []string `json:"read_acls"`
9 UpdateACLs []string `json:"update_acls"`
10 Zones []string `json:"zones"`
11 Networks []int `json:"networks"`
12 Preference int `json:"preference,omitempty"`
13 }
14
15 // NewView takes a viewName and creates a *DNSView
16 func NewView(viewName string) *View {
17 return &View{
18 Name: viewName,
19 }
20 }
21