model.go raw
1 package v2
2
3 type (
4 List[T Zone | RRSet] struct {
5 Count int `json:"count"`
6 NextOffset int `json:"next_offset"`
7 Items []*T `json:"result"` //nolint: tagliatelle
8 }
9
10 APIError struct {
11 Error string `json:"error,omitempty"`
12 }
13 )
14
15 func (l List[T]) GetCount() int {
16 return l.Count
17 }
18
19 func (l List[T]) GetNextOffset() int {
20 return l.NextOffset
21 }
22
23 func (l List[T]) GetItems() []*T {
24 return l.Items
25 }
26