summaryrefslogtreecommitdiff
path: root/bind/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'bind/config.go')
-rw-r--r--bind/config.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/bind/config.go b/bind/config.go
index 42b97cf..9d630f1 100644
--- a/bind/config.go
+++ b/bind/config.go
@@ -33,6 +33,21 @@ func (c *BINDConfig) Views() []string {
33 return v 33 return v
34} 34}
35 35
36func (c *BINDConfig) ZonesInView(view string) []*Zone {
37 out := []*Zone{}
38
39 zm, ok := c.zones[view]
40 if !ok {
41 return out
42 }
43
44 for _, z := range zm {
45 out = append(out, z)
46 }
47
48 return out
49}
50
36func (c *BINDConfig) Zone(view, name string) *Zone { 51func (c *BINDConfig) Zone(view, name string) *Zone {
37 if !strings.HasSuffix(name, ".") { 52 if !strings.HasSuffix(name, ".") {
38 name = fmt.Sprintf("%s.", name) 53 name = fmt.Sprintf("%s.", name)