File: model.go

package info (click to toggle)
golang-github-xenolf-lego 4.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,080 kB
  • sloc: xml: 533; makefile: 128; sh: 18
file content (31 lines) | stat: -rw-r--r-- 928 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package internal

import "encoding/json"

type apiResponse struct {
	Message string          `json:"message"`
	Data    json.RawMessage `json:"data"`
}

// DNSRecord a DNS record.
type DNSRecord struct {
	ID            string        `json:"id,omitempty"`
	Type          string        `json:"type"`
	Value         interface{}   `json:"value,omitempty"`
	Name          string        `json:"name,omitempty"`
	TTL           int           `json:"ttl,omitempty"`
	UpstreamHTTPS string        `json:"upstream_https,omitempty"`
	IPFilterMode  *IPFilterMode `json:"ip_filter_mode,omitempty"`
}

// TXTRecordValue represents a TXT record value.
type TXTRecordValue struct {
	Text string `json:"text,omitempty"` // only for TXT Record.
}

// IPFilterMode a DNS ip_filter_mode.
type IPFilterMode struct {
	Count     string `json:"count,omitempty"`
	Order     string `json:"order,omitempty"`
	GeoFilter string `json:"geo_filter,omitempty"`
}