tsig_key.go raw
1 package dns
2
3 // TSIGKey wraps an NS1 /tsig resource
4 type TSIGKey struct {
5 Name string `json:"name,omitempty"`
6 Algorithm string `json:"algorithm,omitempty"`
7 Secret string `json:"secret,omitempty"`
8 }
9
10 // NewTsigKey takes a name, algorithm and secret and creates a new TSIG key.
11 func NewTsigKey(name string, algorithm string, secret string) *TSIGKey {
12 tsigKey := TSIGKey{
13 Name: name,
14 Algorithm: algorithm,
15 Secret: secret,
16 }
17 return &tsigKey
18 }
19