dns

package
v2.0.0-beta.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyticsReportBytimeGetParams

type AnalyticsReportBytimeGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// A comma-separated list of dimensions to group results by.
	Dimensions param.Field[string] `query:"dimensions"`
	// Segmentation filter in 'attribute operator value' format.
	Filters param.Field[string] `query:"filters"`
	// Limit number of returned metrics.
	Limit param.Field[int64] `query:"limit"`
	// A comma-separated list of metrics to query.
	Metrics param.Field[string] `query:"metrics"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since param.Field[time.Time] `query:"since" format:"date-time"`
	// A comma-separated list of dimensions to sort by, where each dimension may be
	// prefixed by - (descending) or + (ascending).
	Sort param.Field[string] `query:"sort"`
	// Unit of time to group data by.
	TimeDelta param.Field[AnalyticsReportBytimeGetParamsTimeDelta] `query:"time_delta"`
	// End date and time of requesting data period in ISO 8601 format.
	Until param.Field[time.Time] `query:"until" format:"date-time"`
}

func (AnalyticsReportBytimeGetParams) URLQuery

func (r AnalyticsReportBytimeGetParams) URLQuery() (v url.Values)

URLQuery serializes AnalyticsReportBytimeGetParams's query parameters as `url.Values`.

type AnalyticsReportBytimeGetParamsTimeDelta

type AnalyticsReportBytimeGetParamsTimeDelta string

Unit of time to group data by.

const (
	AnalyticsReportBytimeGetParamsTimeDeltaAll        AnalyticsReportBytimeGetParamsTimeDelta = "all"
	AnalyticsReportBytimeGetParamsTimeDeltaAuto       AnalyticsReportBytimeGetParamsTimeDelta = "auto"
	AnalyticsReportBytimeGetParamsTimeDeltaYear       AnalyticsReportBytimeGetParamsTimeDelta = "year"
	AnalyticsReportBytimeGetParamsTimeDeltaQuarter    AnalyticsReportBytimeGetParamsTimeDelta = "quarter"
	AnalyticsReportBytimeGetParamsTimeDeltaMonth      AnalyticsReportBytimeGetParamsTimeDelta = "month"
	AnalyticsReportBytimeGetParamsTimeDeltaWeek       AnalyticsReportBytimeGetParamsTimeDelta = "week"
	AnalyticsReportBytimeGetParamsTimeDeltaDay        AnalyticsReportBytimeGetParamsTimeDelta = "day"
	AnalyticsReportBytimeGetParamsTimeDeltaHour       AnalyticsReportBytimeGetParamsTimeDelta = "hour"
	AnalyticsReportBytimeGetParamsTimeDeltaDekaminute AnalyticsReportBytimeGetParamsTimeDelta = "dekaminute"
	AnalyticsReportBytimeGetParamsTimeDeltaMinute     AnalyticsReportBytimeGetParamsTimeDelta = "minute"
)

func (AnalyticsReportBytimeGetParamsTimeDelta) IsKnown

type AnalyticsReportBytimeGetResponseEnvelope

type AnalyticsReportBytimeGetResponseEnvelope struct {
	Errors   []AnalyticsReportBytimeGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AnalyticsReportBytimeGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSDNSAnalyticsAPIReportBytime                     `json:"result,required"`
	// Whether the API call was successful
	Success AnalyticsReportBytimeGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    analyticsReportBytimeGetResponseEnvelopeJSON    `json:"-"`
}

func (*AnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON

func (r *AnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type AnalyticsReportBytimeGetResponseEnvelopeErrors

type AnalyticsReportBytimeGetResponseEnvelopeErrors struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    analyticsReportBytimeGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*AnalyticsReportBytimeGetResponseEnvelopeErrors) UnmarshalJSON

func (r *AnalyticsReportBytimeGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type AnalyticsReportBytimeGetResponseEnvelopeMessages

type AnalyticsReportBytimeGetResponseEnvelopeMessages struct {
	Code    int64                                                `json:"code,required"`
	Message string                                               `json:"message,required"`
	JSON    analyticsReportBytimeGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*AnalyticsReportBytimeGetResponseEnvelopeMessages) UnmarshalJSON

func (r *AnalyticsReportBytimeGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type AnalyticsReportBytimeGetResponseEnvelopeSuccess

type AnalyticsReportBytimeGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AnalyticsReportBytimeGetResponseEnvelopeSuccessTrue AnalyticsReportBytimeGetResponseEnvelopeSuccess = true
)

func (AnalyticsReportBytimeGetResponseEnvelopeSuccess) IsKnown

type AnalyticsReportBytimeService

type AnalyticsReportBytimeService struct {
	Options []option.RequestOption
}

AnalyticsReportBytimeService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAnalyticsReportBytimeService method instead.

func NewAnalyticsReportBytimeService

func NewAnalyticsReportBytimeService(opts ...option.RequestOption) (r *AnalyticsReportBytimeService)

NewAnalyticsReportBytimeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AnalyticsReportBytimeService) Get

Retrieves a list of aggregate metrics grouped by time interval.

See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.

type AnalyticsReportGetParams

type AnalyticsReportGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// A comma-separated list of dimensions to group results by.
	Dimensions param.Field[string] `query:"dimensions"`
	// Segmentation filter in 'attribute operator value' format.
	Filters param.Field[string] `query:"filters"`
	// Limit number of returned metrics.
	Limit param.Field[int64] `query:"limit"`
	// A comma-separated list of metrics to query.
	Metrics param.Field[string] `query:"metrics"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since param.Field[time.Time] `query:"since" format:"date-time"`
	// A comma-separated list of dimensions to sort by, where each dimension may be
	// prefixed by - (descending) or + (ascending).
	Sort param.Field[string] `query:"sort"`
	// End date and time of requesting data period in ISO 8601 format.
	Until param.Field[time.Time] `query:"until" format:"date-time"`
}

func (AnalyticsReportGetParams) URLQuery

func (r AnalyticsReportGetParams) URLQuery() (v url.Values)

URLQuery serializes AnalyticsReportGetParams's query parameters as `url.Values`.

type AnalyticsReportGetResponseEnvelope

type AnalyticsReportGetResponseEnvelope struct {
	Errors   []AnalyticsReportGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AnalyticsReportGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSDNSAnalyticsAPIReport                     `json:"result,required"`
	// Whether the API call was successful
	Success AnalyticsReportGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    analyticsReportGetResponseEnvelopeJSON    `json:"-"`
}

func (*AnalyticsReportGetResponseEnvelope) UnmarshalJSON

func (r *AnalyticsReportGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type AnalyticsReportGetResponseEnvelopeErrors

type AnalyticsReportGetResponseEnvelopeErrors struct {
	Code    int64                                        `json:"code,required"`
	Message string                                       `json:"message,required"`
	JSON    analyticsReportGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*AnalyticsReportGetResponseEnvelopeErrors) UnmarshalJSON

func (r *AnalyticsReportGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type AnalyticsReportGetResponseEnvelopeMessages

type AnalyticsReportGetResponseEnvelopeMessages struct {
	Code    int64                                          `json:"code,required"`
	Message string                                         `json:"message,required"`
	JSON    analyticsReportGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*AnalyticsReportGetResponseEnvelopeMessages) UnmarshalJSON

func (r *AnalyticsReportGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type AnalyticsReportGetResponseEnvelopeSuccess

type AnalyticsReportGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AnalyticsReportGetResponseEnvelopeSuccessTrue AnalyticsReportGetResponseEnvelopeSuccess = true
)

func (AnalyticsReportGetResponseEnvelopeSuccess) IsKnown

type AnalyticsReportService

type AnalyticsReportService struct {
	Options []option.RequestOption
	Bytimes *AnalyticsReportBytimeService
}

AnalyticsReportService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAnalyticsReportService method instead.

func NewAnalyticsReportService

func NewAnalyticsReportService(opts ...option.RequestOption) (r *AnalyticsReportService)

NewAnalyticsReportService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AnalyticsReportService) Get

Retrieves a list of summarised aggregate metrics over a given time period.

See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.

type AnalyticsService

type AnalyticsService struct {
	Options []option.RequestOption
	Reports *AnalyticsReportService
}

AnalyticsService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAnalyticsService method instead.

func NewAnalyticsService

func NewAnalyticsService(opts ...option.RequestOption) (r *AnalyticsService)

NewAnalyticsService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type DNSDNSAnalyticsAPIReport

type DNSDNSAnalyticsAPIReport struct {
	// Array with one row per combination of dimension values.
	Data []DNSDNSAnalyticsAPIReportData `json:"data,required"`
	// Number of seconds between current time and last processed event, in another
	// words how many seconds of data could be missing.
	DataLag float64 `json:"data_lag,required"`
	// Maximum results for each metric (object mapping metric names to values).
	// Currently always an empty object.
	Max interface{} `json:"max,required"`
	// Minimum results for each metric (object mapping metric names to values).
	// Currently always an empty object.
	Min   interface{}                   `json:"min,required"`
	Query DNSDNSAnalyticsAPIReportQuery `json:"query,required"`
	// Total number of rows in the result.
	Rows float64 `json:"rows,required"`
	// Total results for metrics across all data (object mapping metric names to
	// values).
	Totals interface{}                  `json:"totals,required"`
	JSON   dnsdnsAnalyticsAPIReportJSON `json:"-"`
}

func (*DNSDNSAnalyticsAPIReport) UnmarshalJSON

func (r *DNSDNSAnalyticsAPIReport) UnmarshalJSON(data []byte) (err error)

type DNSDNSAnalyticsAPIReportBytime

type DNSDNSAnalyticsAPIReportBytime struct {
	// Array with one row per combination of dimension values.
	Data []DNSDNSAnalyticsAPIReportBytimeData `json:"data,required"`
	// Number of seconds between current time and last processed event, in another
	// words how many seconds of data could be missing.
	DataLag float64 `json:"data_lag,required"`
	// Maximum results for each metric (object mapping metric names to values).
	// Currently always an empty object.
	Max interface{} `json:"max,required"`
	// Minimum results for each metric (object mapping metric names to values).
	// Currently always an empty object.
	Min   interface{}                         `json:"min,required"`
	Query DNSDNSAnalyticsAPIReportBytimeQuery `json:"query,required"`
	// Total number of rows in the result.
	Rows float64 `json:"rows,required"`
	// Array of time intervals in the response data. Each interval is represented as an
	// array containing two values: the start time, and the end time.
	TimeIntervals [][]time.Time `json:"time_intervals,required" format:"date-time"`
	// Total results for metrics across all data (object mapping metric names to
	// values).
	Totals interface{}                        `json:"totals,required"`
	JSON   dnsdnsAnalyticsAPIReportBytimeJSON `json:"-"`
}

func (*DNSDNSAnalyticsAPIReportBytime) UnmarshalJSON

func (r *DNSDNSAnalyticsAPIReportBytime) UnmarshalJSON(data []byte) (err error)

type DNSDNSAnalyticsAPIReportBytimeData

type DNSDNSAnalyticsAPIReportBytimeData struct {
	// Array of dimension values, representing the combination of dimension values
	// corresponding to this row.
	Dimensions []string `json:"dimensions,required"`
	// Array with one item per requested metric. Each item is an array of values,
	// broken down by time interval.
	Metrics [][]interface{}                        `json:"metrics,required"`
	JSON    dnsdnsAnalyticsAPIReportBytimeDataJSON `json:"-"`
}

func (*DNSDNSAnalyticsAPIReportBytimeData) UnmarshalJSON

func (r *DNSDNSAnalyticsAPIReportBytimeData) UnmarshalJSON(data []byte) (err error)

type DNSDNSAnalyticsAPIReportBytimeQuery

type DNSDNSAnalyticsAPIReportBytimeQuery struct {
	// Array of dimension names.
	Dimensions []string `json:"dimensions,required"`
	// Limit number of returned metrics.
	Limit int64 `json:"limit,required"`
	// Array of metric names.
	Metrics []string `json:"metrics,required"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since time.Time `json:"since,required" format:"date-time"`
	// Unit of time to group data by.
	TimeDelta DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta `json:"time_delta,required"`
	// End date and time of requesting data period in ISO 8601 format.
	Until time.Time `json:"until,required" format:"date-time"`
	// Segmentation filter in 'attribute operator value' format.
	Filters string `json:"filters"`
	// Array of dimensions to sort by, where each dimension may be prefixed by -
	// (descending) or + (ascending).
	Sort []string                                `json:"sort"`
	JSON dnsdnsAnalyticsAPIReportBytimeQueryJSON `json:"-"`
}

func (*DNSDNSAnalyticsAPIReportBytimeQuery) UnmarshalJSON

func (r *DNSDNSAnalyticsAPIReportBytimeQuery) UnmarshalJSON(data []byte) (err error)

type DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta

type DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta string

Unit of time to group data by.

const (
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaAll        DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "all"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaAuto       DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "auto"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaYear       DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "year"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaQuarter    DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "quarter"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaMonth      DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "month"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaWeek       DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "week"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaDay        DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "day"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaHour       DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "hour"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaDekaminute DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "dekaminute"
	DNSDNSAnalyticsAPIReportBytimeQueryTimeDeltaMinute     DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta = "minute"
)

func (DNSDNSAnalyticsAPIReportBytimeQueryTimeDelta) IsKnown

type DNSDNSAnalyticsAPIReportData

type DNSDNSAnalyticsAPIReportData struct {
	// Array of dimension values, representing the combination of dimension values
	// corresponding to this row.
	Dimensions []string `json:"dimensions,required"`
	// Array with one item per requested metric. Each item is a single value.
	Metrics []float64                        `json:"metrics,required"`
	JSON    dnsdnsAnalyticsAPIReportDataJSON `json:"-"`
}

func (*DNSDNSAnalyticsAPIReportData) UnmarshalJSON

func (r *DNSDNSAnalyticsAPIReportData) UnmarshalJSON(data []byte) (err error)

type DNSDNSAnalyticsAPIReportQuery

type DNSDNSAnalyticsAPIReportQuery struct {
	// Array of dimension names.
	Dimensions []string `json:"dimensions,required"`
	// Limit number of returned metrics.
	Limit int64 `json:"limit,required"`
	// Array of metric names.
	Metrics []string `json:"metrics,required"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since time.Time `json:"since,required" format:"date-time"`
	// End date and time of requesting data period in ISO 8601 format.
	Until time.Time `json:"until,required" format:"date-time"`
	// Segmentation filter in 'attribute operator value' format.
	Filters string `json:"filters"`
	// Array of dimensions to sort by, where each dimension may be prefixed by -
	// (descending) or + (ascending).
	Sort []string                          `json:"sort"`
	JSON dnsdnsAnalyticsAPIReportQueryJSON `json:"-"`
}

func (*DNSDNSAnalyticsAPIReportQuery) UnmarshalJSON

func (r *DNSDNSAnalyticsAPIReportQuery) UnmarshalJSON(data []byte) (err error)

type DNSFirewallDNSFirewall

type DNSFirewallDNSFirewall struct {
	// Identifier
	ID string `json:"id,required"`
	// Deprecate the response to ANY requests.
	DeprecateAnyRequests bool                                  `json:"deprecate_any_requests,required"`
	DNSFirewallIPs       []DNSFirewallDNSFirewallDNSFirewallIP `json:"dns_firewall_ips,required" format:"ipv4"`
	// Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
	EcsFallback bool `json:"ecs_fallback,required"`
	// Maximum DNS Cache TTL.
	MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"`
	// Minimum DNS Cache TTL.
	MinimumCacheTTL float64 `json:"minimum_cache_ttl,required"`
	// Last modification of DNS Firewall cluster.
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// DNS Firewall Cluster Name.
	Name        string                             `json:"name,required"`
	UpstreamIPs []DNSFirewallDNSFirewallUpstreamIP `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings.
	AttackMitigation DNSFirewallDNSFirewallAttackMitigation `json:"attack_mitigation,nullable"`
	// Negative DNS Cache TTL.
	NegativeCacheTTL float64 `json:"negative_cache_ttl,nullable"`
	// Deprecated alias for "upstream_ips".
	OriginIPs interface{} `json:"origin_ips"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster).
	Ratelimit float64 `json:"ratelimit,nullable"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt).
	Retries float64                    `json:"retries"`
	JSON    dnsFirewallDNSFirewallJSON `json:"-"`
}

func (*DNSFirewallDNSFirewall) UnmarshalJSON

func (r *DNSFirewallDNSFirewall) UnmarshalJSON(data []byte) (err error)

type DNSFirewallDNSFirewallAttackMitigation

type DNSFirewallDNSFirewallAttackMitigation struct {
	// When enabled, random-prefix attacks are automatically mitigated and the upstream
	// DNS servers protected.
	Enabled bool `json:"enabled"`
	// Deprecated alias for "only_when_upstream_unhealthy".
	OnlyWhenOriginUnhealthy interface{} `json:"only_when_origin_unhealthy"`
	// Only mitigate attacks when upstream servers seem unhealthy.
	OnlyWhenUpstreamUnhealthy bool                                       `json:"only_when_upstream_unhealthy"`
	JSON                      dnsFirewallDNSFirewallAttackMitigationJSON `json:"-"`
}

Attack mitigation settings.

func (*DNSFirewallDNSFirewallAttackMitigation) UnmarshalJSON

func (r *DNSFirewallDNSFirewallAttackMitigation) UnmarshalJSON(data []byte) (err error)

type DNSFirewallDNSFirewallDNSFirewallIP

type DNSFirewallDNSFirewallDNSFirewallIP interface {
	ImplementsDNSDNSFirewallDNSFirewallDNSFirewallIP()
}

Cloudflare-assigned DNS IPv4 Address.

Union satisfied by shared.UnionString or shared.UnionString.

type DNSFirewallDNSFirewallUpstreamIP

type DNSFirewallDNSFirewallUpstreamIP interface {
	ImplementsDNSDNSFirewallDNSFirewallUpstreamIP()
}

Upstream DNS Server IPv4 Address.

Union satisfied by shared.UnionString or shared.UnionString.

type DNSRecordA

type DNSRecordA struct {
	// A valid IPv4 address.
	Content string `json:"content,required" format:"ipv4"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordAType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordAMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Whether the record is receiving the performance and security benefits of
	// Cloudflare.
	Proxied bool `json:"proxied"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordATTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string         `json:"zone_name" format:"hostname"`
	JSON     dnsRecordAJSON `json:"-"`
}

func (*DNSRecordA) UnmarshalJSON

func (r *DNSRecordA) UnmarshalJSON(data []byte) (err error)

type DNSRecordAAAA

type DNSRecordAAAA struct {
	// A valid IPv6 address.
	Content string `json:"content,required" format:"ipv6"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordAAAAType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordAAAAMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Whether the record is receiving the performance and security benefits of
	// Cloudflare.
	Proxied bool `json:"proxied"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordAAAATTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string            `json:"zone_name" format:"hostname"`
	JSON     dnsRecordAAAAJSON `json:"-"`
}

func (*DNSRecordAAAA) UnmarshalJSON

func (r *DNSRecordAAAA) UnmarshalJSON(data []byte) (err error)

type DNSRecordAAAAMeta

type DNSRecordAAAAMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                `json:"source"`
	JSON   dnsRecordAAAAMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordAAAAMeta) UnmarshalJSON

func (r *DNSRecordAAAAMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordAAAATTL

type DNSRecordAAAATTL interface {
	ImplementsDNSDNSRecordAaaattl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordAAAATTLNumber.

type DNSRecordAAAATTLNumber

type DNSRecordAAAATTLNumber float64
const (
	DNSRecordAAAATTLNumber1 DNSRecordAAAATTLNumber = 1
)

func (DNSRecordAAAATTLNumber) IsKnown

func (r DNSRecordAAAATTLNumber) IsKnown() bool

type DNSRecordAAAAType

type DNSRecordAAAAType string

Record type.

const (
	DNSRecordAAAATypeAAAA DNSRecordAAAAType = "AAAA"
)

func (DNSRecordAAAAType) IsKnown

func (r DNSRecordAAAAType) IsKnown() bool

type DNSRecordAMeta

type DNSRecordAMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string             `json:"source"`
	JSON   dnsRecordAMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordAMeta) UnmarshalJSON

func (r *DNSRecordAMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordATTL

type DNSRecordATTL interface {
	ImplementsDNSDNSRecordAttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordATTLNumber.

type DNSRecordATTLNumber

type DNSRecordATTLNumber float64
const (
	DNSRecordATTLNumber1 DNSRecordATTLNumber = 1
)

func (DNSRecordATTLNumber) IsKnown

func (r DNSRecordATTLNumber) IsKnown() bool

type DNSRecordAType

type DNSRecordAType string

Record type.

const (
	DNSRecordATypeA DNSRecordAType = "A"
)

func (DNSRecordAType) IsKnown

func (r DNSRecordAType) IsKnown() bool

type DNSRecordCAA

type DNSRecordCAA struct {
	// Components of a CAA record.
	Data DNSRecordCAAData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordCAAType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted CAA content. See 'data' to set CAA properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordCAAMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordCAATTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string           `json:"zone_name" format:"hostname"`
	JSON     dnsRecordCAAJSON `json:"-"`
}

func (*DNSRecordCAA) UnmarshalJSON

func (r *DNSRecordCAA) UnmarshalJSON(data []byte) (err error)

type DNSRecordCAAData

type DNSRecordCAAData struct {
	// Flags for the CAA record.
	Flags float64 `json:"flags"`
	// Name of the property controlled by this record (e.g.: issue, issuewild, iodef).
	Tag string `json:"tag"`
	// Value of the record. This field's semantics depend on the chosen tag.
	Value string               `json:"value"`
	JSON  dnsRecordCAADataJSON `json:"-"`
}

Components of a CAA record.

func (*DNSRecordCAAData) UnmarshalJSON

func (r *DNSRecordCAAData) UnmarshalJSON(data []byte) (err error)

type DNSRecordCAAMeta

type DNSRecordCAAMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string               `json:"source"`
	JSON   dnsRecordCAAMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordCAAMeta) UnmarshalJSON

func (r *DNSRecordCAAMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordCAATTL

type DNSRecordCAATTL interface {
	ImplementsDNSDNSRecordCaattl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordCAATTLNumber.

type DNSRecordCAATTLNumber

type DNSRecordCAATTLNumber float64
const (
	DNSRecordCAATTLNumber1 DNSRecordCAATTLNumber = 1
)

func (DNSRecordCAATTLNumber) IsKnown

func (r DNSRecordCAATTLNumber) IsKnown() bool

type DNSRecordCAAType

type DNSRecordCAAType string

Record type.

const (
	DNSRecordCAATypeCAA DNSRecordCAAType = "CAA"
)

func (DNSRecordCAAType) IsKnown

func (r DNSRecordCAAType) IsKnown() bool

type DNSRecordCNAME

type DNSRecordCNAME struct {
	// A valid hostname. Must not match the record's name.
	Content interface{} `json:"content,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordCNAMEType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordCNAMEMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Whether the record is receiving the performance and security benefits of
	// Cloudflare.
	Proxied bool `json:"proxied"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordCNAMETTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string             `json:"zone_name" format:"hostname"`
	JSON     dnsRecordCNAMEJSON `json:"-"`
}

func (*DNSRecordCNAME) UnmarshalJSON

func (r *DNSRecordCNAME) UnmarshalJSON(data []byte) (err error)

type DNSRecordCNAMEMeta

type DNSRecordCNAMEMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                 `json:"source"`
	JSON   dnsRecordCNAMEMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordCNAMEMeta) UnmarshalJSON

func (r *DNSRecordCNAMEMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordCNAMETTL

type DNSRecordCNAMETTL interface {
	ImplementsDNSDNSRecordCnamettl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordCNAMETTLNumber.

type DNSRecordCNAMETTLNumber

type DNSRecordCNAMETTLNumber float64
const (
	DNSRecordCNAMETTLNumber1 DNSRecordCNAMETTLNumber = 1
)

func (DNSRecordCNAMETTLNumber) IsKnown

func (r DNSRecordCNAMETTLNumber) IsKnown() bool

type DNSRecordCNAMEType

type DNSRecordCNAMEType string

Record type.

const (
	DNSRecordCNAMETypeCNAME DNSRecordCNAMEType = "CNAME"
)

func (DNSRecordCNAMEType) IsKnown

func (r DNSRecordCNAMEType) IsKnown() bool

type DNSRecordCert

type DNSRecordCert struct {
	// Components of a CERT record.
	Data DNSRecordCertData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordCertType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted CERT content. See 'data' to set CERT properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordCertMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordCertTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string            `json:"zone_name" format:"hostname"`
	JSON     dnsRecordCertJSON `json:"-"`
}

func (*DNSRecordCert) UnmarshalJSON

func (r *DNSRecordCert) UnmarshalJSON(data []byte) (err error)

type DNSRecordCertData

type DNSRecordCertData struct {
	// Algorithm.
	Algorithm float64 `json:"algorithm"`
	// Certificate.
	Certificate string `json:"certificate"`
	// Key Tag.
	KeyTag float64 `json:"key_tag"`
	// Type.
	Type float64               `json:"type"`
	JSON dnsRecordCertDataJSON `json:"-"`
}

Components of a CERT record.

func (*DNSRecordCertData) UnmarshalJSON

func (r *DNSRecordCertData) UnmarshalJSON(data []byte) (err error)

type DNSRecordCertMeta

type DNSRecordCertMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                `json:"source"`
	JSON   dnsRecordCertMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordCertMeta) UnmarshalJSON

func (r *DNSRecordCertMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordCertTTL

type DNSRecordCertTTL interface {
	ImplementsDNSDNSRecordCertTTL()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordCertTTLNumber.

type DNSRecordCertTTLNumber

type DNSRecordCertTTLNumber float64
const (
	DNSRecordCertTTLNumber1 DNSRecordCertTTLNumber = 1
)

func (DNSRecordCertTTLNumber) IsKnown

func (r DNSRecordCertTTLNumber) IsKnown() bool

type DNSRecordCertType

type DNSRecordCertType string

Record type.

const (
	DNSRecordCertTypeCert DNSRecordCertType = "CERT"
)

func (DNSRecordCertType) IsKnown

func (r DNSRecordCertType) IsKnown() bool

type DNSRecordDNSKEY

type DNSRecordDNSKEY struct {
	// Components of a DNSKEY record.
	Data DNSRecordDNSKEYData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordDNSKEYType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted DNSKEY content. See 'data' to set DNSKEY properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordDNSKEYMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordDNSKEYTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string              `json:"zone_name" format:"hostname"`
	JSON     dnsRecordDNSKEYJSON `json:"-"`
}

func (*DNSRecordDNSKEY) UnmarshalJSON

func (r *DNSRecordDNSKEY) UnmarshalJSON(data []byte) (err error)

type DNSRecordDNSKEYData

type DNSRecordDNSKEYData struct {
	// Algorithm.
	Algorithm float64 `json:"algorithm"`
	// Flags.
	Flags float64 `json:"flags"`
	// Protocol.
	Protocol float64 `json:"protocol"`
	// Public Key.
	PublicKey string                  `json:"public_key"`
	JSON      dnsRecordDNSKEYDataJSON `json:"-"`
}

Components of a DNSKEY record.

func (*DNSRecordDNSKEYData) UnmarshalJSON

func (r *DNSRecordDNSKEYData) UnmarshalJSON(data []byte) (err error)

type DNSRecordDNSKEYMeta

type DNSRecordDNSKEYMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                  `json:"source"`
	JSON   dnsRecordDNSKEYMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordDNSKEYMeta) UnmarshalJSON

func (r *DNSRecordDNSKEYMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordDNSKEYTTL

type DNSRecordDNSKEYTTL interface {
	ImplementsDNSDNSRecordDnskeyttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordDNSKEYTTLNumber.

type DNSRecordDNSKEYTTLNumber

type DNSRecordDNSKEYTTLNumber float64
const (
	DNSRecordDNSKEYTTLNumber1 DNSRecordDNSKEYTTLNumber = 1
)

func (DNSRecordDNSKEYTTLNumber) IsKnown

func (r DNSRecordDNSKEYTTLNumber) IsKnown() bool

type DNSRecordDNSKEYType

type DNSRecordDNSKEYType string

Record type.

const (
	DNSRecordDNSKEYTypeDNSKEY DNSRecordDNSKEYType = "DNSKEY"
)

func (DNSRecordDNSKEYType) IsKnown

func (r DNSRecordDNSKEYType) IsKnown() bool

type DNSRecordDS

type DNSRecordDS struct {
	// Components of a DS record.
	Data DNSRecordDSData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordDSType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted DS content. See 'data' to set DS properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordDSMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordDSTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string          `json:"zone_name" format:"hostname"`
	JSON     dnsRecordDSJSON `json:"-"`
}

func (*DNSRecordDS) UnmarshalJSON

func (r *DNSRecordDS) UnmarshalJSON(data []byte) (err error)

type DNSRecordDSData

type DNSRecordDSData struct {
	// Algorithm.
	Algorithm float64 `json:"algorithm"`
	// Digest.
	Digest string `json:"digest"`
	// Digest Type.
	DigestType float64 `json:"digest_type"`
	// Key Tag.
	KeyTag float64             `json:"key_tag"`
	JSON   dnsRecordDSDataJSON `json:"-"`
}

Components of a DS record.

func (*DNSRecordDSData) UnmarshalJSON

func (r *DNSRecordDSData) UnmarshalJSON(data []byte) (err error)

type DNSRecordDSMeta

type DNSRecordDSMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string              `json:"source"`
	JSON   dnsRecordDSMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordDSMeta) UnmarshalJSON

func (r *DNSRecordDSMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordDSTTL

type DNSRecordDSTTL interface {
	ImplementsDNSDNSRecordDsttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordDSTTLNumber.

type DNSRecordDSTTLNumber

type DNSRecordDSTTLNumber float64
const (
	DNSRecordDSTTLNumber1 DNSRecordDSTTLNumber = 1
)

func (DNSRecordDSTTLNumber) IsKnown

func (r DNSRecordDSTTLNumber) IsKnown() bool

type DNSRecordDSType

type DNSRecordDSType string

Record type.

const (
	DNSRecordDSTypeDS DNSRecordDSType = "DS"
)

func (DNSRecordDSType) IsKnown

func (r DNSRecordDSType) IsKnown() bool

type DNSRecordHTTPS

type DNSRecordHTTPS struct {
	// Components of a HTTPS record.
	Data DNSRecordHTTPSData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordHTTPSType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted HTTPS content. See 'data' to set HTTPS properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordHTTPSMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordHTTPSTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string             `json:"zone_name" format:"hostname"`
	JSON     dnsRecordHTTPSJSON `json:"-"`
}

func (*DNSRecordHTTPS) UnmarshalJSON

func (r *DNSRecordHTTPS) UnmarshalJSON(data []byte) (err error)

type DNSRecordHTTPSData

type DNSRecordHTTPSData struct {
	// priority.
	Priority float64 `json:"priority"`
	// target.
	Target string `json:"target"`
	// value.
	Value string                 `json:"value"`
	JSON  dnsRecordHTTPSDataJSON `json:"-"`
}

Components of a HTTPS record.

func (*DNSRecordHTTPSData) UnmarshalJSON

func (r *DNSRecordHTTPSData) UnmarshalJSON(data []byte) (err error)

type DNSRecordHTTPSMeta

type DNSRecordHTTPSMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                 `json:"source"`
	JSON   dnsRecordHTTPSMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordHTTPSMeta) UnmarshalJSON

func (r *DNSRecordHTTPSMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordHTTPSTTL

type DNSRecordHTTPSTTL interface {
	ImplementsDNSDNSRecordHttpsttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordHTTPSTTLNumber.

type DNSRecordHTTPSTTLNumber

type DNSRecordHTTPSTTLNumber float64
const (
	DNSRecordHTTPSTTLNumber1 DNSRecordHTTPSTTLNumber = 1
)

func (DNSRecordHTTPSTTLNumber) IsKnown

func (r DNSRecordHTTPSTTLNumber) IsKnown() bool

type DNSRecordHTTPSType

type DNSRecordHTTPSType string

Record type.

const (
	DNSRecordHTTPSTypeHTTPS DNSRecordHTTPSType = "HTTPS"
)

func (DNSRecordHTTPSType) IsKnown

func (r DNSRecordHTTPSType) IsKnown() bool

type DNSRecordLOC

type DNSRecordLOC struct {
	// Components of a LOC record.
	Data DNSRecordLOCData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordLOCType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted LOC content. See 'data' to set LOC properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordLOCMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordLOCTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string           `json:"zone_name" format:"hostname"`
	JSON     dnsRecordLOCJSON `json:"-"`
}

func (*DNSRecordLOC) UnmarshalJSON

func (r *DNSRecordLOC) UnmarshalJSON(data []byte) (err error)

type DNSRecordLOCData

type DNSRecordLOCData struct {
	// Altitude of location in meters.
	Altitude float64 `json:"altitude"`
	// Degrees of latitude.
	LatDegrees float64 `json:"lat_degrees"`
	// Latitude direction.
	LatDirection DNSRecordLOCDataLatDirection `json:"lat_direction"`
	// Minutes of latitude.
	LatMinutes float64 `json:"lat_minutes"`
	// Seconds of latitude.
	LatSeconds float64 `json:"lat_seconds"`
	// Degrees of longitude.
	LongDegrees float64 `json:"long_degrees"`
	// Longitude direction.
	LongDirection DNSRecordLOCDataLongDirection `json:"long_direction"`
	// Minutes of longitude.
	LongMinutes float64 `json:"long_minutes"`
	// Seconds of longitude.
	LongSeconds float64 `json:"long_seconds"`
	// Horizontal precision of location.
	PrecisionHorz float64 `json:"precision_horz"`
	// Vertical precision of location.
	PrecisionVert float64 `json:"precision_vert"`
	// Size of location in meters.
	Size float64              `json:"size"`
	JSON dnsRecordLOCDataJSON `json:"-"`
}

Components of a LOC record.

func (*DNSRecordLOCData) UnmarshalJSON

func (r *DNSRecordLOCData) UnmarshalJSON(data []byte) (err error)

type DNSRecordLOCDataLatDirection

type DNSRecordLOCDataLatDirection string

Latitude direction.

const (
	DNSRecordLOCDataLatDirectionN DNSRecordLOCDataLatDirection = "N"
	DNSRecordLOCDataLatDirectionS DNSRecordLOCDataLatDirection = "S"
)

func (DNSRecordLOCDataLatDirection) IsKnown

func (r DNSRecordLOCDataLatDirection) IsKnown() bool

type DNSRecordLOCDataLongDirection

type DNSRecordLOCDataLongDirection string

Longitude direction.

const (
	DNSRecordLOCDataLongDirectionE DNSRecordLOCDataLongDirection = "E"
	DNSRecordLOCDataLongDirectionW DNSRecordLOCDataLongDirection = "W"
)

func (DNSRecordLOCDataLongDirection) IsKnown

func (r DNSRecordLOCDataLongDirection) IsKnown() bool

type DNSRecordLOCMeta

type DNSRecordLOCMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string               `json:"source"`
	JSON   dnsRecordLOCMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordLOCMeta) UnmarshalJSON

func (r *DNSRecordLOCMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordLOCTTL

type DNSRecordLOCTTL interface {
	ImplementsDNSDNSRecordLocttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordLOCTTLNumber.

type DNSRecordLOCTTLNumber

type DNSRecordLOCTTLNumber float64
const (
	DNSRecordLOCTTLNumber1 DNSRecordLOCTTLNumber = 1
)

func (DNSRecordLOCTTLNumber) IsKnown

func (r DNSRecordLOCTTLNumber) IsKnown() bool

type DNSRecordLOCType

type DNSRecordLOCType string

Record type.

const (
	DNSRecordLOCTypeLOC DNSRecordLOCType = "LOC"
)

func (DNSRecordLOCType) IsKnown

func (r DNSRecordLOCType) IsKnown() bool

type DNSRecordMX

type DNSRecordMX struct {
	// A valid mail server hostname.
	Content string `json:"content,required" format:"hostname"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Required for MX, SRV and URI records; unused by other record types. Records with
	// lower priorities are preferred.
	Priority float64 `json:"priority,required"`
	// Record type.
	Type DNSRecordMXType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordMXMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordMXTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string          `json:"zone_name" format:"hostname"`
	JSON     dnsRecordMXJSON `json:"-"`
}

func (*DNSRecordMX) UnmarshalJSON

func (r *DNSRecordMX) UnmarshalJSON(data []byte) (err error)

type DNSRecordMXMeta

type DNSRecordMXMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string              `json:"source"`
	JSON   dnsRecordMXMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordMXMeta) UnmarshalJSON

func (r *DNSRecordMXMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordMXTTL

type DNSRecordMXTTL interface {
	ImplementsDNSDNSRecordMxttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordMXTTLNumber.

type DNSRecordMXTTLNumber

type DNSRecordMXTTLNumber float64
const (
	DNSRecordMXTTLNumber1 DNSRecordMXTTLNumber = 1
)

func (DNSRecordMXTTLNumber) IsKnown

func (r DNSRecordMXTTLNumber) IsKnown() bool

type DNSRecordMXType

type DNSRecordMXType string

Record type.

const (
	DNSRecordMXTypeMX DNSRecordMXType = "MX"
)

func (DNSRecordMXType) IsKnown

func (r DNSRecordMXType) IsKnown() bool

type DNSRecordNAPTR

type DNSRecordNAPTR struct {
	// Components of a NAPTR record.
	Data DNSRecordNAPTRData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordNAPTRType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted NAPTR content. See 'data' to set NAPTR properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordNAPTRMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordNAPTRTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string             `json:"zone_name" format:"hostname"`
	JSON     dnsRecordNAPTRJSON `json:"-"`
}

func (*DNSRecordNAPTR) UnmarshalJSON

func (r *DNSRecordNAPTR) UnmarshalJSON(data []byte) (err error)

type DNSRecordNAPTRData

type DNSRecordNAPTRData struct {
	// Flags.
	Flags string `json:"flags"`
	// Order.
	Order float64 `json:"order"`
	// Preference.
	Preference float64 `json:"preference"`
	// Regex.
	Regex string `json:"regex"`
	// Replacement.
	Replacement string `json:"replacement"`
	// Service.
	Service string                 `json:"service"`
	JSON    dnsRecordNAPTRDataJSON `json:"-"`
}

Components of a NAPTR record.

func (*DNSRecordNAPTRData) UnmarshalJSON

func (r *DNSRecordNAPTRData) UnmarshalJSON(data []byte) (err error)

type DNSRecordNAPTRMeta

type DNSRecordNAPTRMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                 `json:"source"`
	JSON   dnsRecordNAPTRMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordNAPTRMeta) UnmarshalJSON

func (r *DNSRecordNAPTRMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordNAPTRTTL

type DNSRecordNAPTRTTL interface {
	ImplementsDNSDNSRecordNaptrttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordNAPTRTTLNumber.

type DNSRecordNAPTRTTLNumber

type DNSRecordNAPTRTTLNumber float64
const (
	DNSRecordNAPTRTTLNumber1 DNSRecordNAPTRTTLNumber = 1
)

func (DNSRecordNAPTRTTLNumber) IsKnown

func (r DNSRecordNAPTRTTLNumber) IsKnown() bool

type DNSRecordNAPTRType

type DNSRecordNAPTRType string

Record type.

const (
	DNSRecordNAPTRTypeNAPTR DNSRecordNAPTRType = "NAPTR"
)

func (DNSRecordNAPTRType) IsKnown

func (r DNSRecordNAPTRType) IsKnown() bool

type DNSRecordNS

type DNSRecordNS struct {
	// A valid name server host name.
	Content interface{} `json:"content,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordNSType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordNSMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordNSTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string          `json:"zone_name" format:"hostname"`
	JSON     dnsRecordNSJSON `json:"-"`
}

func (*DNSRecordNS) UnmarshalJSON

func (r *DNSRecordNS) UnmarshalJSON(data []byte) (err error)

type DNSRecordNSMeta

type DNSRecordNSMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string              `json:"source"`
	JSON   dnsRecordNSMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordNSMeta) UnmarshalJSON

func (r *DNSRecordNSMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordNSTTL

type DNSRecordNSTTL interface {
	ImplementsDNSDNSRecordNsttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordNSTTLNumber.

type DNSRecordNSTTLNumber

type DNSRecordNSTTLNumber float64
const (
	DNSRecordNSTTLNumber1 DNSRecordNSTTLNumber = 1
)

func (DNSRecordNSTTLNumber) IsKnown

func (r DNSRecordNSTTLNumber) IsKnown() bool

type DNSRecordNSType

type DNSRecordNSType string

Record type.

const (
	DNSRecordNSTypeNS DNSRecordNSType = "NS"
)

func (DNSRecordNSType) IsKnown

func (r DNSRecordNSType) IsKnown() bool

type DNSRecordPTR

type DNSRecordPTR struct {
	// Domain name pointing to the address.
	Content string `json:"content,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordPTRType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordPTRMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordPTRTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string           `json:"zone_name" format:"hostname"`
	JSON     dnsRecordPTRJSON `json:"-"`
}

func (*DNSRecordPTR) UnmarshalJSON

func (r *DNSRecordPTR) UnmarshalJSON(data []byte) (err error)

type DNSRecordPTRMeta

type DNSRecordPTRMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string               `json:"source"`
	JSON   dnsRecordPTRMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordPTRMeta) UnmarshalJSON

func (r *DNSRecordPTRMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordPTRTTL

type DNSRecordPTRTTL interface {
	ImplementsDNSDNSRecordPtrttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordPTRTTLNumber.

type DNSRecordPTRTTLNumber

type DNSRecordPTRTTLNumber float64
const (
	DNSRecordPTRTTLNumber1 DNSRecordPTRTTLNumber = 1
)

func (DNSRecordPTRTTLNumber) IsKnown

func (r DNSRecordPTRTTLNumber) IsKnown() bool

type DNSRecordPTRType

type DNSRecordPTRType string

Record type.

const (
	DNSRecordPTRTypePTR DNSRecordPTRType = "PTR"
)

func (DNSRecordPTRType) IsKnown

func (r DNSRecordPTRType) IsKnown() bool

type DNSRecordSRV

type DNSRecordSRV struct {
	// Components of a SRV record.
	Data DNSRecordSRVData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode. For SRV records, the first
	// label is normally a service and the second a protocol name, each starting with
	// an underscore.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordSRVType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Priority, weight, port, and SRV target. See 'data' for setting the individual
	// component values.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordSRVMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordSRVTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string           `json:"zone_name" format:"hostname"`
	JSON     dnsRecordSRVJSON `json:"-"`
}

func (*DNSRecordSRV) UnmarshalJSON

func (r *DNSRecordSRV) UnmarshalJSON(data []byte) (err error)

type DNSRecordSRVData

type DNSRecordSRVData struct {
	// A valid hostname. Deprecated in favor of the regular 'name' outside the data
	// map. This data map field represents the remainder of the full 'name' after the
	// service and protocol.
	Name string `json:"name" format:"hostname"`
	// The port of the service.
	Port float64 `json:"port"`
	// Required for MX, SRV and URI records; unused by other record types. Records with
	// lower priorities are preferred.
	Priority float64 `json:"priority"`
	// A valid protocol, prefixed with an underscore. Deprecated in favor of the
	// regular 'name' outside the data map. This data map field normally represents the
	// second label of that 'name'.
	Proto string `json:"proto"`
	// A service type, prefixed with an underscore. Deprecated in favor of the regular
	// 'name' outside the data map. This data map field normally represents the first
	// label of that 'name'.
	Service string `json:"service"`
	// A valid hostname.
	Target string `json:"target" format:"hostname"`
	// The record weight.
	Weight float64              `json:"weight"`
	JSON   dnsRecordSRVDataJSON `json:"-"`
}

Components of a SRV record.

func (*DNSRecordSRVData) UnmarshalJSON

func (r *DNSRecordSRVData) UnmarshalJSON(data []byte) (err error)

type DNSRecordSRVMeta

type DNSRecordSRVMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string               `json:"source"`
	JSON   dnsRecordSRVMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordSRVMeta) UnmarshalJSON

func (r *DNSRecordSRVMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordSRVTTL

type DNSRecordSRVTTL interface {
	ImplementsDNSDNSRecordSrvttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordSRVTTLNumber.

type DNSRecordSRVTTLNumber

type DNSRecordSRVTTLNumber float64
const (
	DNSRecordSRVTTLNumber1 DNSRecordSRVTTLNumber = 1
)

func (DNSRecordSRVTTLNumber) IsKnown

func (r DNSRecordSRVTTLNumber) IsKnown() bool

type DNSRecordSRVType

type DNSRecordSRVType string

Record type.

const (
	DNSRecordSRVTypeSRV DNSRecordSRVType = "SRV"
)

func (DNSRecordSRVType) IsKnown

func (r DNSRecordSRVType) IsKnown() bool

type DNSRecordSSHFP

type DNSRecordSSHFP struct {
	// Components of a SSHFP record.
	Data DNSRecordSSHFPData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordSSHFPType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted SSHFP content. See 'data' to set SSHFP properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordSSHFPMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordSSHFPTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string             `json:"zone_name" format:"hostname"`
	JSON     dnsRecordSSHFPJSON `json:"-"`
}

func (*DNSRecordSSHFP) UnmarshalJSON

func (r *DNSRecordSSHFP) UnmarshalJSON(data []byte) (err error)

type DNSRecordSSHFPData

type DNSRecordSSHFPData struct {
	// algorithm.
	Algorithm float64 `json:"algorithm"`
	// fingerprint.
	Fingerprint string `json:"fingerprint"`
	// type.
	Type float64                `json:"type"`
	JSON dnsRecordSSHFPDataJSON `json:"-"`
}

Components of a SSHFP record.

func (*DNSRecordSSHFPData) UnmarshalJSON

func (r *DNSRecordSSHFPData) UnmarshalJSON(data []byte) (err error)

type DNSRecordSSHFPMeta

type DNSRecordSSHFPMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                 `json:"source"`
	JSON   dnsRecordSSHFPMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordSSHFPMeta) UnmarshalJSON

func (r *DNSRecordSSHFPMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordSSHFPTTL

type DNSRecordSSHFPTTL interface {
	ImplementsDNSDNSRecordSshfpttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordSSHFPTTLNumber.

type DNSRecordSSHFPTTLNumber

type DNSRecordSSHFPTTLNumber float64
const (
	DNSRecordSSHFPTTLNumber1 DNSRecordSSHFPTTLNumber = 1
)

func (DNSRecordSSHFPTTLNumber) IsKnown

func (r DNSRecordSSHFPTTLNumber) IsKnown() bool

type DNSRecordSSHFPType

type DNSRecordSSHFPType string

Record type.

const (
	DNSRecordSSHFPTypeSSHFP DNSRecordSSHFPType = "SSHFP"
)

func (DNSRecordSSHFPType) IsKnown

func (r DNSRecordSSHFPType) IsKnown() bool

type DNSRecordSVCB

type DNSRecordSVCB struct {
	// Components of a SVCB record.
	Data DNSRecordSVCBData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordSVCBType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted SVCB content. See 'data' to set SVCB properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordSVCBMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordSVCBTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string            `json:"zone_name" format:"hostname"`
	JSON     dnsRecordSVCBJSON `json:"-"`
}

func (*DNSRecordSVCB) UnmarshalJSON

func (r *DNSRecordSVCB) UnmarshalJSON(data []byte) (err error)

type DNSRecordSVCBData

type DNSRecordSVCBData struct {
	// priority.
	Priority float64 `json:"priority"`
	// target.
	Target string `json:"target"`
	// value.
	Value string                `json:"value"`
	JSON  dnsRecordSVCBDataJSON `json:"-"`
}

Components of a SVCB record.

func (*DNSRecordSVCBData) UnmarshalJSON

func (r *DNSRecordSVCBData) UnmarshalJSON(data []byte) (err error)

type DNSRecordSVCBMeta

type DNSRecordSVCBMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                `json:"source"`
	JSON   dnsRecordSVCBMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordSVCBMeta) UnmarshalJSON

func (r *DNSRecordSVCBMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordSVCBTTL

type DNSRecordSVCBTTL interface {
	ImplementsDNSDNSRecordSvcbttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordSVCBTTLNumber.

type DNSRecordSVCBTTLNumber

type DNSRecordSVCBTTLNumber float64
const (
	DNSRecordSVCBTTLNumber1 DNSRecordSVCBTTLNumber = 1
)

func (DNSRecordSVCBTTLNumber) IsKnown

func (r DNSRecordSVCBTTLNumber) IsKnown() bool

type DNSRecordSVCBType

type DNSRecordSVCBType string

Record type.

const (
	DNSRecordSVCBTypeSVCB DNSRecordSVCBType = "SVCB"
)

func (DNSRecordSVCBType) IsKnown

func (r DNSRecordSVCBType) IsKnown() bool

type DNSRecordSmimea

type DNSRecordSmimea struct {
	// Components of a SMIMEA record.
	Data DNSRecordSmimeaData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordSmimeaType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted SMIMEA content. See 'data' to set SMIMEA properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordSmimeaMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordSmimeaTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string              `json:"zone_name" format:"hostname"`
	JSON     dnsRecordSmimeaJSON `json:"-"`
}

func (*DNSRecordSmimea) UnmarshalJSON

func (r *DNSRecordSmimea) UnmarshalJSON(data []byte) (err error)

type DNSRecordSmimeaData

type DNSRecordSmimeaData struct {
	// Certificate.
	Certificate string `json:"certificate"`
	// Matching Type.
	MatchingType float64 `json:"matching_type"`
	// Selector.
	Selector float64 `json:"selector"`
	// Usage.
	Usage float64                 `json:"usage"`
	JSON  dnsRecordSmimeaDataJSON `json:"-"`
}

Components of a SMIMEA record.

func (*DNSRecordSmimeaData) UnmarshalJSON

func (r *DNSRecordSmimeaData) UnmarshalJSON(data []byte) (err error)

type DNSRecordSmimeaMeta

type DNSRecordSmimeaMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                  `json:"source"`
	JSON   dnsRecordSmimeaMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordSmimeaMeta) UnmarshalJSON

func (r *DNSRecordSmimeaMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordSmimeaTTL

type DNSRecordSmimeaTTL interface {
	ImplementsDNSDNSRecordSmimeaTTL()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordSmimeaTTLNumber.

type DNSRecordSmimeaTTLNumber

type DNSRecordSmimeaTTLNumber float64
const (
	DNSRecordSmimeaTTLNumber1 DNSRecordSmimeaTTLNumber = 1
)

func (DNSRecordSmimeaTTLNumber) IsKnown

func (r DNSRecordSmimeaTTLNumber) IsKnown() bool

type DNSRecordSmimeaType

type DNSRecordSmimeaType string

Record type.

const (
	DNSRecordSmimeaTypeSmimea DNSRecordSmimeaType = "SMIMEA"
)

func (DNSRecordSmimeaType) IsKnown

func (r DNSRecordSmimeaType) IsKnown() bool

type DNSRecordTLSA

type DNSRecordTLSA struct {
	// Components of a TLSA record.
	Data DNSRecordTLSAData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordTLSAType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted TLSA content. See 'data' to set TLSA properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordTLSAMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordTLSATTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string            `json:"zone_name" format:"hostname"`
	JSON     dnsRecordTLSAJSON `json:"-"`
}

func (*DNSRecordTLSA) UnmarshalJSON

func (r *DNSRecordTLSA) UnmarshalJSON(data []byte) (err error)

type DNSRecordTLSAData

type DNSRecordTLSAData struct {
	// certificate.
	Certificate string `json:"certificate"`
	// Matching Type.
	MatchingType float64 `json:"matching_type"`
	// Selector.
	Selector float64 `json:"selector"`
	// Usage.
	Usage float64               `json:"usage"`
	JSON  dnsRecordTLSADataJSON `json:"-"`
}

Components of a TLSA record.

func (*DNSRecordTLSAData) UnmarshalJSON

func (r *DNSRecordTLSAData) UnmarshalJSON(data []byte) (err error)

type DNSRecordTLSAMeta

type DNSRecordTLSAMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string                `json:"source"`
	JSON   dnsRecordTLSAMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordTLSAMeta) UnmarshalJSON

func (r *DNSRecordTLSAMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordTLSATTL

type DNSRecordTLSATTL interface {
	ImplementsDNSDNSRecordTlsattl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordTLSATTLNumber.

type DNSRecordTLSATTLNumber

type DNSRecordTLSATTLNumber float64
const (
	DNSRecordTLSATTLNumber1 DNSRecordTLSATTLNumber = 1
)

func (DNSRecordTLSATTLNumber) IsKnown

func (r DNSRecordTLSATTLNumber) IsKnown() bool

type DNSRecordTLSAType

type DNSRecordTLSAType string

Record type.

const (
	DNSRecordTLSATypeTLSA DNSRecordTLSAType = "TLSA"
)

func (DNSRecordTLSAType) IsKnown

func (r DNSRecordTLSAType) IsKnown() bool

type DNSRecordTXT

type DNSRecordTXT struct {
	// Text content for the record.
	Content string `json:"content,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Record type.
	Type DNSRecordTXTType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordTXTMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordTXTTTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string           `json:"zone_name" format:"hostname"`
	JSON     dnsRecordTXTJSON `json:"-"`
}

func (*DNSRecordTXT) UnmarshalJSON

func (r *DNSRecordTXT) UnmarshalJSON(data []byte) (err error)

type DNSRecordTXTMeta

type DNSRecordTXTMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string               `json:"source"`
	JSON   dnsRecordTXTMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordTXTMeta) UnmarshalJSON

func (r *DNSRecordTXTMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordTXTTTL

type DNSRecordTXTTTL interface {
	ImplementsDNSDNSRecordTxtttl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordTXTTTLNumber.

type DNSRecordTXTTTLNumber

type DNSRecordTXTTTLNumber float64
const (
	DNSRecordTXTTTLNumber1 DNSRecordTXTTTLNumber = 1
)

func (DNSRecordTXTTTLNumber) IsKnown

func (r DNSRecordTXTTTLNumber) IsKnown() bool

type DNSRecordTXTType

type DNSRecordTXTType string

Record type.

const (
	DNSRecordTXTTypeTXT DNSRecordTXTType = "TXT"
)

func (DNSRecordTXTType) IsKnown

func (r DNSRecordTXTType) IsKnown() bool

type DNSRecordURI

type DNSRecordURI struct {
	// Components of a URI record.
	Data DNSRecordURIData `json:"data,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name string `json:"name,required"`
	// Required for MX, SRV and URI records; unused by other record types. Records with
	// lower priorities are preferred.
	Priority float64 `json:"priority,required"`
	// Record type.
	Type DNSRecordURIType `json:"type,required"`
	// Identifier
	ID string `json:"id"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment string `json:"comment"`
	// Formatted URI content. See 'data' to set URI properties.
	Content string `json:"content"`
	// When the record was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Whether this record can be modified/deleted (true means it's managed by
	// Cloudflare).
	Locked bool `json:"locked"`
	// Extra Cloudflare-specific information about the record.
	Meta DNSRecordURIMeta `json:"meta"`
	// When the record was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Whether the record can be proxied by Cloudflare or not.
	Proxiable bool `json:"proxiable"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags []string `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL DNSRecordURITTL `json:"ttl"`
	// Identifier
	ZoneID string `json:"zone_id"`
	// The domain of the record.
	ZoneName string           `json:"zone_name" format:"hostname"`
	JSON     dnsRecordURIJSON `json:"-"`
}

func (*DNSRecordURI) UnmarshalJSON

func (r *DNSRecordURI) UnmarshalJSON(data []byte) (err error)

type DNSRecordURIData

type DNSRecordURIData struct {
	// The record content.
	Content string `json:"content"`
	// The record weight.
	Weight float64              `json:"weight"`
	JSON   dnsRecordURIDataJSON `json:"-"`
}

Components of a URI record.

func (*DNSRecordURIData) UnmarshalJSON

func (r *DNSRecordURIData) UnmarshalJSON(data []byte) (err error)

type DNSRecordURIMeta

type DNSRecordURIMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded bool `json:"auto_added"`
	// Where the record originated from.
	Source string               `json:"source"`
	JSON   dnsRecordURIMetaJSON `json:"-"`
}

Extra Cloudflare-specific information about the record.

func (*DNSRecordURIMeta) UnmarshalJSON

func (r *DNSRecordURIMeta) UnmarshalJSON(data []byte) (err error)

type DNSRecordURITTL

type DNSRecordURITTL interface {
	ImplementsDNSDNSRecordUrittl()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Union satisfied by shared.UnionFloat or dns.DNSRecordURITTLNumber.

type DNSRecordURITTLNumber

type DNSRecordURITTLNumber float64
const (
	DNSRecordURITTLNumber1 DNSRecordURITTLNumber = 1
)

func (DNSRecordURITTLNumber) IsKnown

func (r DNSRecordURITTLNumber) IsKnown() bool

type DNSRecordURIType

type DNSRecordURIType string

Record type.

const (
	DNSRecordURITypeURI DNSRecordURIType = "URI"
)

func (DNSRecordURIType) IsKnown

func (r DNSRecordURIType) IsKnown() bool

type DNSService

type DNSService struct {
	Options   []option.RequestOption
	Records   *RecordService
	Analytics *AnalyticsService
	Firewall  *FirewallService
}

DNSService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDNSService method instead.

func NewDNSService

func NewDNSService(opts ...option.RequestOption) (r *DNSService)

NewDNSService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Error

type Error = apierror.Error

type FirewallAnalyticsReportBytimeGetParams

type FirewallAnalyticsReportBytimeGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A comma-separated list of dimensions to group results by.
	Dimensions param.Field[string] `query:"dimensions"`
	// Segmentation filter in 'attribute operator value' format.
	Filters param.Field[string] `query:"filters"`
	// Limit number of returned metrics.
	Limit param.Field[int64] `query:"limit"`
	// A comma-separated list of metrics to query.
	Metrics param.Field[string] `query:"metrics"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since param.Field[time.Time] `query:"since" format:"date-time"`
	// A comma-separated list of dimensions to sort by, where each dimension may be
	// prefixed by - (descending) or + (ascending).
	Sort param.Field[string] `query:"sort"`
	// Unit of time to group data by.
	TimeDelta param.Field[FirewallAnalyticsReportBytimeGetParamsTimeDelta] `query:"time_delta"`
	// End date and time of requesting data period in ISO 8601 format.
	Until param.Field[time.Time] `query:"until" format:"date-time"`
}

func (FirewallAnalyticsReportBytimeGetParams) URLQuery

URLQuery serializes FirewallAnalyticsReportBytimeGetParams's query parameters as `url.Values`.

type FirewallAnalyticsReportBytimeGetParamsTimeDelta

type FirewallAnalyticsReportBytimeGetParamsTimeDelta string

Unit of time to group data by.

const (
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaAll        FirewallAnalyticsReportBytimeGetParamsTimeDelta = "all"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaAuto       FirewallAnalyticsReportBytimeGetParamsTimeDelta = "auto"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaYear       FirewallAnalyticsReportBytimeGetParamsTimeDelta = "year"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaQuarter    FirewallAnalyticsReportBytimeGetParamsTimeDelta = "quarter"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaMonth      FirewallAnalyticsReportBytimeGetParamsTimeDelta = "month"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaWeek       FirewallAnalyticsReportBytimeGetParamsTimeDelta = "week"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaDay        FirewallAnalyticsReportBytimeGetParamsTimeDelta = "day"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaHour       FirewallAnalyticsReportBytimeGetParamsTimeDelta = "hour"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaDekaminute FirewallAnalyticsReportBytimeGetParamsTimeDelta = "dekaminute"
	FirewallAnalyticsReportBytimeGetParamsTimeDeltaMinute     FirewallAnalyticsReportBytimeGetParamsTimeDelta = "minute"
)

func (FirewallAnalyticsReportBytimeGetParamsTimeDelta) IsKnown

type FirewallAnalyticsReportBytimeGetResponseEnvelope

type FirewallAnalyticsReportBytimeGetResponseEnvelope struct {
	Errors   []FirewallAnalyticsReportBytimeGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FirewallAnalyticsReportBytimeGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSDNSAnalyticsAPIReportBytime                             `json:"result,required"`
	// Whether the API call was successful
	Success FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    firewallAnalyticsReportBytimeGetResponseEnvelopeJSON    `json:"-"`
}

func (*FirewallAnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON

func (r *FirewallAnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type FirewallAnalyticsReportBytimeGetResponseEnvelopeErrors

type FirewallAnalyticsReportBytimeGetResponseEnvelopeErrors struct {
	Code    int64                                                      `json:"code,required"`
	Message string                                                     `json:"message,required"`
	JSON    firewallAnalyticsReportBytimeGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*FirewallAnalyticsReportBytimeGetResponseEnvelopeErrors) UnmarshalJSON

func (r *FirewallAnalyticsReportBytimeGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type FirewallAnalyticsReportBytimeGetResponseEnvelopeMessages

type FirewallAnalyticsReportBytimeGetResponseEnvelopeMessages struct {
	Code    int64                                                        `json:"code,required"`
	Message string                                                       `json:"message,required"`
	JSON    firewallAnalyticsReportBytimeGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*FirewallAnalyticsReportBytimeGetResponseEnvelopeMessages) UnmarshalJSON

type FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess

type FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccessTrue FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess = true
)

func (FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess) IsKnown

type FirewallAnalyticsReportBytimeService

type FirewallAnalyticsReportBytimeService struct {
	Options []option.RequestOption
}

FirewallAnalyticsReportBytimeService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFirewallAnalyticsReportBytimeService method instead.

func NewFirewallAnalyticsReportBytimeService

func NewFirewallAnalyticsReportBytimeService(opts ...option.RequestOption) (r *FirewallAnalyticsReportBytimeService)

NewFirewallAnalyticsReportBytimeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FirewallAnalyticsReportBytimeService) Get

Retrieves a list of aggregate metrics grouped by time interval.

See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.

type FirewallAnalyticsReportGetParams

type FirewallAnalyticsReportGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A comma-separated list of dimensions to group results by.
	Dimensions param.Field[string] `query:"dimensions"`
	// Segmentation filter in 'attribute operator value' format.
	Filters param.Field[string] `query:"filters"`
	// Limit number of returned metrics.
	Limit param.Field[int64] `query:"limit"`
	// A comma-separated list of metrics to query.
	Metrics param.Field[string] `query:"metrics"`
	// Start date and time of requesting data period in ISO 8601 format.
	Since param.Field[time.Time] `query:"since" format:"date-time"`
	// A comma-separated list of dimensions to sort by, where each dimension may be
	// prefixed by - (descending) or + (ascending).
	Sort param.Field[string] `query:"sort"`
	// End date and time of requesting data period in ISO 8601 format.
	Until param.Field[time.Time] `query:"until" format:"date-time"`
}

func (FirewallAnalyticsReportGetParams) URLQuery

func (r FirewallAnalyticsReportGetParams) URLQuery() (v url.Values)

URLQuery serializes FirewallAnalyticsReportGetParams's query parameters as `url.Values`.

type FirewallAnalyticsReportGetResponseEnvelope

type FirewallAnalyticsReportGetResponseEnvelope struct {
	Errors   []FirewallAnalyticsReportGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FirewallAnalyticsReportGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSDNSAnalyticsAPIReport                             `json:"result,required"`
	// Whether the API call was successful
	Success FirewallAnalyticsReportGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    firewallAnalyticsReportGetResponseEnvelopeJSON    `json:"-"`
}

func (*FirewallAnalyticsReportGetResponseEnvelope) UnmarshalJSON

func (r *FirewallAnalyticsReportGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type FirewallAnalyticsReportGetResponseEnvelopeErrors

type FirewallAnalyticsReportGetResponseEnvelopeErrors struct {
	Code    int64                                                `json:"code,required"`
	Message string                                               `json:"message,required"`
	JSON    firewallAnalyticsReportGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*FirewallAnalyticsReportGetResponseEnvelopeErrors) UnmarshalJSON

func (r *FirewallAnalyticsReportGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type FirewallAnalyticsReportGetResponseEnvelopeMessages

type FirewallAnalyticsReportGetResponseEnvelopeMessages struct {
	Code    int64                                                  `json:"code,required"`
	Message string                                                 `json:"message,required"`
	JSON    firewallAnalyticsReportGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*FirewallAnalyticsReportGetResponseEnvelopeMessages) UnmarshalJSON

func (r *FirewallAnalyticsReportGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type FirewallAnalyticsReportGetResponseEnvelopeSuccess

type FirewallAnalyticsReportGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FirewallAnalyticsReportGetResponseEnvelopeSuccessTrue FirewallAnalyticsReportGetResponseEnvelopeSuccess = true
)

func (FirewallAnalyticsReportGetResponseEnvelopeSuccess) IsKnown

type FirewallAnalyticsReportService

type FirewallAnalyticsReportService struct {
	Options []option.RequestOption
	Bytimes *FirewallAnalyticsReportBytimeService
}

FirewallAnalyticsReportService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFirewallAnalyticsReportService method instead.

func NewFirewallAnalyticsReportService

func NewFirewallAnalyticsReportService(opts ...option.RequestOption) (r *FirewallAnalyticsReportService)

NewFirewallAnalyticsReportService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FirewallAnalyticsReportService) Get

Retrieves a list of summarised aggregate metrics over a given time period.

See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.

type FirewallAnalyticsService

type FirewallAnalyticsService struct {
	Options []option.RequestOption
	Reports *FirewallAnalyticsReportService
}

FirewallAnalyticsService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFirewallAnalyticsService method instead.

func NewFirewallAnalyticsService

func NewFirewallAnalyticsService(opts ...option.RequestOption) (r *FirewallAnalyticsService)

NewFirewallAnalyticsService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type FirewallDeleteParams

type FirewallDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type FirewallDeleteResponse

type FirewallDeleteResponse struct {
	// Identifier
	ID   string                     `json:"id"`
	JSON firewallDeleteResponseJSON `json:"-"`
}

func (*FirewallDeleteResponse) UnmarshalJSON

func (r *FirewallDeleteResponse) UnmarshalJSON(data []byte) (err error)

type FirewallDeleteResponseEnvelope

type FirewallDeleteResponseEnvelope struct {
	Errors   []FirewallDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FirewallDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   FirewallDeleteResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success FirewallDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    firewallDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*FirewallDeleteResponseEnvelope) UnmarshalJSON

func (r *FirewallDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type FirewallDeleteResponseEnvelopeErrors

type FirewallDeleteResponseEnvelopeErrors struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    firewallDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*FirewallDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *FirewallDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type FirewallDeleteResponseEnvelopeMessages

type FirewallDeleteResponseEnvelopeMessages struct {
	Code    int64                                      `json:"code,required"`
	Message string                                     `json:"message,required"`
	JSON    firewallDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*FirewallDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *FirewallDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type FirewallDeleteResponseEnvelopeSuccess

type FirewallDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FirewallDeleteResponseEnvelopeSuccessTrue FirewallDeleteResponseEnvelopeSuccess = true
)

func (FirewallDeleteResponseEnvelopeSuccess) IsKnown

type FirewallEditParams

type FirewallEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Deprecate the response to ANY requests.
	DeprecateAnyRequests param.Field[bool]                              `json:"deprecate_any_requests,required"`
	DNSFirewallIPs       param.Field[[]FirewallEditParamsDNSFirewallIP] `json:"dns_firewall_ips,required" format:"ipv4"`
	// Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
	EcsFallback param.Field[bool] `json:"ecs_fallback,required"`
	// Maximum DNS Cache TTL.
	MaximumCacheTTL param.Field[float64] `json:"maximum_cache_ttl,required"`
	// Minimum DNS Cache TTL.
	MinimumCacheTTL param.Field[float64] `json:"minimum_cache_ttl,required"`
	// DNS Firewall Cluster Name.
	Name        param.Field[string]                         `json:"name,required"`
	UpstreamIPs param.Field[[]FirewallEditParamsUpstreamIP] `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings.
	AttackMitigation param.Field[FirewallEditParamsAttackMitigation] `json:"attack_mitigation"`
	// Negative DNS Cache TTL.
	NegativeCacheTTL param.Field[float64] `json:"negative_cache_ttl"`
	// Deprecated alias for "upstream_ips".
	OriginIPs param.Field[interface{}] `json:"origin_ips"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster).
	Ratelimit param.Field[float64] `json:"ratelimit"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt).
	Retries param.Field[float64] `json:"retries"`
}

func (FirewallEditParams) MarshalJSON

func (r FirewallEditParams) MarshalJSON() (data []byte, err error)

type FirewallEditParamsAttackMitigation

type FirewallEditParamsAttackMitigation struct {
	// When enabled, random-prefix attacks are automatically mitigated and the upstream
	// DNS servers protected.
	Enabled param.Field[bool] `json:"enabled"`
	// Deprecated alias for "only_when_upstream_unhealthy".
	OnlyWhenOriginUnhealthy param.Field[interface{}] `json:"only_when_origin_unhealthy"`
	// Only mitigate attacks when upstream servers seem unhealthy.
	OnlyWhenUpstreamUnhealthy param.Field[bool] `json:"only_when_upstream_unhealthy"`
}

Attack mitigation settings.

func (FirewallEditParamsAttackMitigation) MarshalJSON

func (r FirewallEditParamsAttackMitigation) MarshalJSON() (data []byte, err error)

type FirewallEditParamsDNSFirewallIP

type FirewallEditParamsDNSFirewallIP interface {
	ImplementsDNSFirewallEditParamsDNSFirewallIP()
}

Cloudflare-assigned DNS IPv4 Address.

Satisfied by shared.UnionString, shared.UnionString.

type FirewallEditParamsUpstreamIP

type FirewallEditParamsUpstreamIP interface {
	ImplementsDNSFirewallEditParamsUpstreamIP()
}

Upstream DNS Server IPv4 Address.

Satisfied by shared.UnionString, shared.UnionString.

type FirewallEditResponseEnvelope

type FirewallEditResponseEnvelope struct {
	Errors   []FirewallEditResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FirewallEditResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSFirewallDNSFirewall                 `json:"result,required"`
	// Whether the API call was successful
	Success FirewallEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    firewallEditResponseEnvelopeJSON    `json:"-"`
}

func (*FirewallEditResponseEnvelope) UnmarshalJSON

func (r *FirewallEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type FirewallEditResponseEnvelopeErrors

type FirewallEditResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    firewallEditResponseEnvelopeErrorsJSON `json:"-"`
}

func (*FirewallEditResponseEnvelopeErrors) UnmarshalJSON

func (r *FirewallEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type FirewallEditResponseEnvelopeMessages

type FirewallEditResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    firewallEditResponseEnvelopeMessagesJSON `json:"-"`
}

func (*FirewallEditResponseEnvelopeMessages) UnmarshalJSON

func (r *FirewallEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type FirewallEditResponseEnvelopeSuccess

type FirewallEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FirewallEditResponseEnvelopeSuccessTrue FirewallEditResponseEnvelopeSuccess = true
)

func (FirewallEditResponseEnvelopeSuccess) IsKnown

type FirewallGetParams

type FirewallGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type FirewallGetResponseEnvelope

type FirewallGetResponseEnvelope struct {
	Errors   []FirewallGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FirewallGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSFirewallDNSFirewall                `json:"result,required"`
	// Whether the API call was successful
	Success FirewallGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    firewallGetResponseEnvelopeJSON    `json:"-"`
}

func (*FirewallGetResponseEnvelope) UnmarshalJSON

func (r *FirewallGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type FirewallGetResponseEnvelopeErrors

type FirewallGetResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    firewallGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*FirewallGetResponseEnvelopeErrors) UnmarshalJSON

func (r *FirewallGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type FirewallGetResponseEnvelopeMessages

type FirewallGetResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    firewallGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*FirewallGetResponseEnvelopeMessages) UnmarshalJSON

func (r *FirewallGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type FirewallGetResponseEnvelopeSuccess

type FirewallGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FirewallGetResponseEnvelopeSuccessTrue FirewallGetResponseEnvelopeSuccess = true
)

func (FirewallGetResponseEnvelopeSuccess) IsKnown

type FirewallListParams

type FirewallListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Number of clusters per page.
	PerPage param.Field[float64] `query:"per_page"`
}

func (FirewallListParams) URLQuery

func (r FirewallListParams) URLQuery() (v url.Values)

URLQuery serializes FirewallListParams's query parameters as `url.Values`.

type FirewallNewParams

type FirewallNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// DNS Firewall Cluster Name.
	Name        param.Field[string]                        `json:"name,required"`
	UpstreamIPs param.Field[[]FirewallNewParamsUpstreamIP] `json:"upstream_ips,required" format:"ipv4"`
	// Attack mitigation settings.
	AttackMitigation param.Field[FirewallNewParamsAttackMitigation] `json:"attack_mitigation"`
	// Deprecate the response to ANY requests.
	DeprecateAnyRequests param.Field[bool] `json:"deprecate_any_requests"`
	// Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
	EcsFallback param.Field[bool] `json:"ecs_fallback"`
	// Maximum DNS Cache TTL.
	MaximumCacheTTL param.Field[float64] `json:"maximum_cache_ttl"`
	// Minimum DNS Cache TTL.
	MinimumCacheTTL param.Field[float64] `json:"minimum_cache_ttl"`
	// Negative DNS Cache TTL.
	NegativeCacheTTL param.Field[float64] `json:"negative_cache_ttl"`
	// Deprecated alias for "upstream_ips".
	OriginIPs param.Field[interface{}] `json:"origin_ips"`
	// Ratelimit in queries per second per datacenter (applies to DNS queries sent to
	// the upstream nameservers configured on the cluster).
	Ratelimit param.Field[float64] `json:"ratelimit"`
	// Number of retries for fetching DNS responses from upstream nameservers (not
	// counting the initial attempt).
	Retries param.Field[float64] `json:"retries"`
}

func (FirewallNewParams) MarshalJSON

func (r FirewallNewParams) MarshalJSON() (data []byte, err error)

type FirewallNewParamsAttackMitigation

type FirewallNewParamsAttackMitigation struct {
	// When enabled, random-prefix attacks are automatically mitigated and the upstream
	// DNS servers protected.
	Enabled param.Field[bool] `json:"enabled"`
	// Deprecated alias for "only_when_upstream_unhealthy".
	OnlyWhenOriginUnhealthy param.Field[interface{}] `json:"only_when_origin_unhealthy"`
	// Only mitigate attacks when upstream servers seem unhealthy.
	OnlyWhenUpstreamUnhealthy param.Field[bool] `json:"only_when_upstream_unhealthy"`
}

Attack mitigation settings.

func (FirewallNewParamsAttackMitigation) MarshalJSON

func (r FirewallNewParamsAttackMitigation) MarshalJSON() (data []byte, err error)

type FirewallNewParamsUpstreamIP

type FirewallNewParamsUpstreamIP interface {
	ImplementsDNSFirewallNewParamsUpstreamIP()
}

Upstream DNS Server IPv4 Address.

Satisfied by shared.UnionString, shared.UnionString.

type FirewallNewResponseEnvelope

type FirewallNewResponseEnvelope struct {
	Errors   []FirewallNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FirewallNewResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSFirewallDNSFirewall                `json:"result,required"`
	// Whether the API call was successful
	Success FirewallNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    firewallNewResponseEnvelopeJSON    `json:"-"`
}

func (*FirewallNewResponseEnvelope) UnmarshalJSON

func (r *FirewallNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type FirewallNewResponseEnvelopeErrors

type FirewallNewResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    firewallNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*FirewallNewResponseEnvelopeErrors) UnmarshalJSON

func (r *FirewallNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type FirewallNewResponseEnvelopeMessages

type FirewallNewResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    firewallNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*FirewallNewResponseEnvelopeMessages) UnmarshalJSON

func (r *FirewallNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type FirewallNewResponseEnvelopeSuccess

type FirewallNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FirewallNewResponseEnvelopeSuccessTrue FirewallNewResponseEnvelopeSuccess = true
)

func (FirewallNewResponseEnvelopeSuccess) IsKnown

type FirewallService

type FirewallService struct {
	Options   []option.RequestOption
	Analytics *FirewallAnalyticsService
}

FirewallService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFirewallService method instead.

func NewFirewallService

func NewFirewallService(opts ...option.RequestOption) (r *FirewallService)

NewFirewallService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FirewallService) Delete

func (r *FirewallService) Delete(ctx context.Context, dnsFirewallID string, body FirewallDeleteParams, opts ...option.RequestOption) (res *FirewallDeleteResponse, err error)

Delete a configured DNS Firewall Cluster.

func (*FirewallService) Edit

func (r *FirewallService) Edit(ctx context.Context, dnsFirewallID string, params FirewallEditParams, opts ...option.RequestOption) (res *DNSFirewallDNSFirewall, err error)

Modify a DNS Firewall Cluster configuration.

func (*FirewallService) Get

func (r *FirewallService) Get(ctx context.Context, dnsFirewallID string, query FirewallGetParams, opts ...option.RequestOption) (res *DNSFirewallDNSFirewall, err error)

Show a single configured DNS Firewall cluster for an account.

func (*FirewallService) List

List configured DNS Firewall clusters for an account.

func (*FirewallService) ListAutoPaging

List configured DNS Firewall clusters for an account.

func (*FirewallService) New

Create a configured DNS Firewall Cluster.

type RecordDeleteParams

type RecordDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RecordDeleteResponse

type RecordDeleteResponse struct {
	// Identifier
	ID   string                   `json:"id"`
	JSON recordDeleteResponseJSON `json:"-"`
}

func (*RecordDeleteResponse) UnmarshalJSON

func (r *RecordDeleteResponse) UnmarshalJSON(data []byte) (err error)

type RecordDeleteResponseEnvelope

type RecordDeleteResponseEnvelope struct {
	Result RecordDeleteResponse             `json:"result"`
	JSON   recordDeleteResponseEnvelopeJSON `json:"-"`
}

func (*RecordDeleteResponseEnvelope) UnmarshalJSON

func (r *RecordDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RecordEditParams

type RecordEditParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name param.Field[string] `json:"name,required"`
	// Record type.
	Type param.Field[RecordEditParamsType] `json:"type,required"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment param.Field[string] `json:"comment"`
	// Formatted URI content. See 'data' to set URI properties.
	Content param.Field[interface{}]          `json:"content"`
	Data    param.Field[RecordEditParamsData] `json:"data"`
	Meta    param.Field[RecordEditParamsMeta] `json:"meta"`
	// Required for MX, SRV and URI records; unused by other record types. Records with
	// lower priorities are preferred.
	Priority param.Field[float64] `json:"priority"`
	// Whether the record is receiving the performance and security benefits of
	// Cloudflare.
	Proxied param.Field[bool] `json:"proxied"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags param.Field[[]string] `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL param.Field[RecordEditParamsTTL] `json:"ttl"`
}

func (RecordEditParams) MarshalJSON

func (r RecordEditParams) MarshalJSON() (data []byte, err error)

type RecordEditParamsData

type RecordEditParamsData struct {
	// algorithm.
	Algorithm param.Field[float64] `json:"algorithm"`
	// Altitude of location in meters.
	Altitude param.Field[float64] `json:"altitude"`
	// certificate.
	Certificate param.Field[string] `json:"certificate"`
	// The record content.
	Content param.Field[string] `json:"content"`
	// Digest.
	Digest param.Field[string] `json:"digest"`
	// Digest Type.
	DigestType param.Field[float64] `json:"digest_type"`
	// fingerprint.
	Fingerprint param.Field[string] `json:"fingerprint"`
	// Flags.
	Flags param.Field[interface{}] `json:"flags"`
	// Key Tag.
	KeyTag param.Field[float64] `json:"key_tag"`
	// Degrees of latitude.
	LatDegrees param.Field[float64] `json:"lat_degrees"`
	// Latitude direction.
	LatDirection param.Field[RecordEditParamsDataLatDirection] `json:"lat_direction"`
	// Minutes of latitude.
	LatMinutes param.Field[float64] `json:"lat_minutes"`
	// Seconds of latitude.
	LatSeconds param.Field[float64] `json:"lat_seconds"`
	// Degrees of longitude.
	LongDegrees param.Field[float64] `json:"long_degrees"`
	// Longitude direction.
	LongDirection param.Field[RecordEditParamsDataLongDirection] `json:"long_direction"`
	// Minutes of longitude.
	LongMinutes param.Field[float64] `json:"long_minutes"`
	// Seconds of longitude.
	LongSeconds param.Field[float64] `json:"long_seconds"`
	// Matching Type.
	MatchingType param.Field[float64] `json:"matching_type"`
	// A valid hostname. Deprecated in favor of the regular 'name' outside the data
	// map. This data map field represents the remainder of the full 'name' after the
	// service and protocol.
	Name param.Field[string] `json:"name" format:"hostname"`
	// Order.
	Order param.Field[float64] `json:"order"`
	// The port of the service.
	Port param.Field[float64] `json:"port"`
	// Horizontal precision of location.
	PrecisionHorz param.Field[float64] `json:"precision_horz"`
	// Vertical precision of location.
	PrecisionVert param.Field[float64] `json:"precision_vert"`
	// Preference.
	Preference param.Field[float64] `json:"preference"`
	// priority.
	Priority param.Field[float64] `json:"priority"`
	// A valid protocol, prefixed with an underscore. Deprecated in favor of the
	// regular 'name' outside the data map. This data map field normally represents the
	// second label of that 'name'.
	Proto param.Field[string] `json:"proto"`
	// Protocol.
	Protocol param.Field[float64] `json:"protocol"`
	// Public Key.
	PublicKey param.Field[string] `json:"public_key"`
	// Regex.
	Regex param.Field[string] `json:"regex"`
	// Replacement.
	Replacement param.Field[string] `json:"replacement"`
	// Selector.
	Selector param.Field[float64] `json:"selector"`
	// A service type, prefixed with an underscore. Deprecated in favor of the regular
	// 'name' outside the data map. This data map field normally represents the first
	// label of that 'name'.
	Service param.Field[string] `json:"service"`
	// Size of location in meters.
	Size param.Field[float64] `json:"size"`
	// Name of the property controlled by this record (e.g.: issue, issuewild, iodef).
	Tag param.Field[string] `json:"tag"`
	// target.
	Target param.Field[string] `json:"target"`
	// type.
	Type param.Field[float64] `json:"type"`
	// Usage.
	Usage param.Field[float64] `json:"usage"`
	// value.
	Value param.Field[string] `json:"value"`
	// The record weight.
	Weight param.Field[float64] `json:"weight"`
}

func (RecordEditParamsData) MarshalJSON

func (r RecordEditParamsData) MarshalJSON() (data []byte, err error)

type RecordEditParamsDataLatDirection

type RecordEditParamsDataLatDirection string

Latitude direction.

const (
	RecordEditParamsDataLatDirectionN RecordEditParamsDataLatDirection = "N"
	RecordEditParamsDataLatDirectionS RecordEditParamsDataLatDirection = "S"
)

func (RecordEditParamsDataLatDirection) IsKnown

type RecordEditParamsDataLongDirection

type RecordEditParamsDataLongDirection string

Longitude direction.

const (
	RecordEditParamsDataLongDirectionE RecordEditParamsDataLongDirection = "E"
	RecordEditParamsDataLongDirectionW RecordEditParamsDataLongDirection = "W"
)

func (RecordEditParamsDataLongDirection) IsKnown

type RecordEditParamsMeta

type RecordEditParamsMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded param.Field[bool] `json:"auto_added"`
	// Where the record originated from.
	Source param.Field[string] `json:"source"`
}

func (RecordEditParamsMeta) MarshalJSON

func (r RecordEditParamsMeta) MarshalJSON() (data []byte, err error)

type RecordEditParamsTTL

type RecordEditParamsTTL interface {
	ImplementsDNSRecordEditParamsTTL()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Satisfied by shared.UnionFloat, dns.RecordEditParamsTTLNumber.

type RecordEditParamsTTLNumber

type RecordEditParamsTTLNumber float64
const (
	RecordEditParamsTTLNumber1 RecordEditParamsTTLNumber = 1
)

func (RecordEditParamsTTLNumber) IsKnown

func (r RecordEditParamsTTLNumber) IsKnown() bool

type RecordEditParamsType

type RecordEditParamsType string

Record type.

const (
	RecordEditParamsTypeURI    RecordEditParamsType = "URI"
	RecordEditParamsTypeTXT    RecordEditParamsType = "TXT"
	RecordEditParamsTypeTLSA   RecordEditParamsType = "TLSA"
	RecordEditParamsTypeSVCB   RecordEditParamsType = "SVCB"
	RecordEditParamsTypeSSHFP  RecordEditParamsType = "SSHFP"
	RecordEditParamsTypeSRV    RecordEditParamsType = "SRV"
	RecordEditParamsTypeSmimea RecordEditParamsType = "SMIMEA"
	RecordEditParamsTypePTR    RecordEditParamsType = "PTR"
	RecordEditParamsTypeNS     RecordEditParamsType = "NS"
	RecordEditParamsTypeNAPTR  RecordEditParamsType = "NAPTR"
	RecordEditParamsTypeMX     RecordEditParamsType = "MX"
	RecordEditParamsTypeLOC    RecordEditParamsType = "LOC"
	RecordEditParamsTypeHTTPS  RecordEditParamsType = "HTTPS"
	RecordEditParamsTypeDS     RecordEditParamsType = "DS"
	RecordEditParamsTypeDNSKEY RecordEditParamsType = "DNSKEY"
	RecordEditParamsTypeCNAME  RecordEditParamsType = "CNAME"
	RecordEditParamsTypeCert   RecordEditParamsType = "CERT"
	RecordEditParamsTypeCAA    RecordEditParamsType = "CAA"
	RecordEditParamsTypeAAAA   RecordEditParamsType = "AAAA"
	RecordEditParamsTypeA      RecordEditParamsType = "A"
)

func (RecordEditParamsType) IsKnown

func (r RecordEditParamsType) IsKnown() bool

type RecordEditResponseEnvelope

type RecordEditResponseEnvelope struct {
	Errors   []RecordEditResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RecordEditResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSRecord                            `json:"result,required"`
	// Whether the API call was successful
	Success RecordEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    recordEditResponseEnvelopeJSON    `json:"-"`
}

func (*RecordEditResponseEnvelope) UnmarshalJSON

func (r *RecordEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RecordEditResponseEnvelopeErrors

type RecordEditResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    recordEditResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RecordEditResponseEnvelopeErrors) UnmarshalJSON

func (r *RecordEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RecordEditResponseEnvelopeMessages

type RecordEditResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    recordEditResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RecordEditResponseEnvelopeMessages) UnmarshalJSON

func (r *RecordEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RecordEditResponseEnvelopeSuccess

type RecordEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RecordEditResponseEnvelopeSuccessTrue RecordEditResponseEnvelopeSuccess = true
)

func (RecordEditResponseEnvelopeSuccess) IsKnown

type RecordExportParams

type RecordExportParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RecordGetParams

type RecordGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RecordGetResponseEnvelope

type RecordGetResponseEnvelope struct {
	Errors   []RecordGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RecordGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSRecord                           `json:"result,required"`
	// Whether the API call was successful
	Success RecordGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    recordGetResponseEnvelopeJSON    `json:"-"`
}

func (*RecordGetResponseEnvelope) UnmarshalJSON

func (r *RecordGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RecordGetResponseEnvelopeErrors

type RecordGetResponseEnvelopeErrors struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    recordGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RecordGetResponseEnvelopeErrors) UnmarshalJSON

func (r *RecordGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RecordGetResponseEnvelopeMessages

type RecordGetResponseEnvelopeMessages struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    recordGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RecordGetResponseEnvelopeMessages) UnmarshalJSON

func (r *RecordGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RecordGetResponseEnvelopeSuccess

type RecordGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RecordGetResponseEnvelopeSuccessTrue RecordGetResponseEnvelopeSuccess = true
)

func (RecordGetResponseEnvelopeSuccess) IsKnown

type RecordImportParams

type RecordImportParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// BIND config to import.
	//
	// **Tip:** When using cURL, a file can be uploaded using
	// `--form 'file=@bind_config.txt'`.
	File param.Field[string] `json:"file,required"`
	// Whether or not proxiable records should receive the performance and security
	// benefits of Cloudflare.
	//
	// The value should be either `true` or `false`.
	Proxied param.Field[string] `json:"proxied"`
}

func (RecordImportParams) MarshalJSON

func (r RecordImportParams) MarshalJSON() (data []byte, err error)

type RecordImportResponse

type RecordImportResponse struct {
	// Number of DNS records added.
	RecsAdded float64 `json:"recs_added"`
	// Total number of DNS records parsed.
	TotalRecordsParsed float64                  `json:"total_records_parsed"`
	JSON               recordImportResponseJSON `json:"-"`
}

func (*RecordImportResponse) UnmarshalJSON

func (r *RecordImportResponse) UnmarshalJSON(data []byte) (err error)

type RecordImportResponseEnvelope

type RecordImportResponseEnvelope struct {
	Errors   []RecordImportResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RecordImportResponseEnvelopeMessages `json:"messages,required"`
	Result   RecordImportResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RecordImportResponseEnvelopeSuccess `json:"success,required"`
	Timing  RecordImportResponseEnvelopeTiming  `json:"timing"`
	JSON    recordImportResponseEnvelopeJSON    `json:"-"`
}

func (*RecordImportResponseEnvelope) UnmarshalJSON

func (r *RecordImportResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RecordImportResponseEnvelopeErrors

type RecordImportResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    recordImportResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RecordImportResponseEnvelopeErrors) UnmarshalJSON

func (r *RecordImportResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RecordImportResponseEnvelopeMessages

type RecordImportResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    recordImportResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RecordImportResponseEnvelopeMessages) UnmarshalJSON

func (r *RecordImportResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RecordImportResponseEnvelopeSuccess

type RecordImportResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RecordImportResponseEnvelopeSuccessTrue RecordImportResponseEnvelopeSuccess = true
)

func (RecordImportResponseEnvelopeSuccess) IsKnown

type RecordImportResponseEnvelopeTiming

type RecordImportResponseEnvelopeTiming struct {
	// When the file parsing ended.
	EndTime time.Time `json:"end_time" format:"date-time"`
	// Processing time of the file in seconds.
	ProcessTime float64 `json:"process_time"`
	// When the file parsing started.
	StartTime time.Time                              `json:"start_time" format:"date-time"`
	JSON      recordImportResponseEnvelopeTimingJSON `json:"-"`
}

func (*RecordImportResponseEnvelopeTiming) UnmarshalJSON

func (r *RecordImportResponseEnvelopeTiming) UnmarshalJSON(data []byte) (err error)

type RecordListParams

type RecordListParams struct {
	// Identifier
	ZoneID  param.Field[string]                  `path:"zone_id,required"`
	Comment param.Field[RecordListParamsComment] `query:"comment"`
	// DNS record content.
	Content param.Field[string] `query:"content"`
	// Direction to order DNS records in.
	Direction param.Field[RecordListParamsDirection] `query:"direction"`
	// Whether to match all search requirements or at least one (any). If set to `all`,
	// acts like a logical AND between filters. If set to `any`, acts like a logical OR
	// instead. Note that the interaction between tag filters is controlled by the
	// `tag-match` parameter instead.
	Match param.Field[RecordListParamsMatch] `query:"match"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name param.Field[string] `query:"name"`
	// Field to order DNS records by.
	Order param.Field[RecordListParamsOrder] `query:"order"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Number of DNS records per page.
	PerPage param.Field[float64] `query:"per_page"`
	// Whether the record is receiving the performance and security benefits of
	// Cloudflare.
	Proxied param.Field[bool] `query:"proxied"`
	// Allows searching in multiple properties of a DNS record simultaneously. This
	// parameter is intended for human users, not automation. Its exact behavior is
	// intentionally left unspecified and is subject to change in the future. This
	// parameter works independently of the `match` setting. For automated searches,
	// please use the other available parameters.
	Search param.Field[string]              `query:"search"`
	Tag    param.Field[RecordListParamsTag] `query:"tag"`
	// Whether to match all tag search requirements or at least one (any). If set to
	// `all`, acts like a logical AND between tag filters. If set to `any`, acts like a
	// logical OR instead. Note that the regular `match` parameter is still used to
	// combine the resulting condition with other filters that aren't related to tags.
	TagMatch param.Field[RecordListParamsTagMatch] `query:"tag_match"`
	// Record type.
	Type param.Field[RecordListParamsType] `query:"type"`
}

func (RecordListParams) URLQuery

func (r RecordListParams) URLQuery() (v url.Values)

URLQuery serializes RecordListParams's query parameters as `url.Values`.

type RecordListParamsComment

type RecordListParamsComment struct {
	// If this parameter is present, only records _without_ a comment are returned.
	Absent param.Field[string] `query:"absent"`
	// Substring of the DNS record comment. Comment filters are case-insensitive.
	Contains param.Field[string] `query:"contains"`
	// Suffix of the DNS record comment. Comment filters are case-insensitive.
	Endswith param.Field[string] `query:"endswith"`
	// Exact value of the DNS record comment. Comment filters are case-insensitive.
	Exact param.Field[string] `query:"exact"`
	// If this parameter is present, only records _with_ a comment are returned.
	Present param.Field[string] `query:"present"`
	// Prefix of the DNS record comment. Comment filters are case-insensitive.
	Startswith param.Field[string] `query:"startswith"`
}

func (RecordListParamsComment) URLQuery

func (r RecordListParamsComment) URLQuery() (v url.Values)

URLQuery serializes RecordListParamsComment's query parameters as `url.Values`.

type RecordListParamsDirection

type RecordListParamsDirection string

Direction to order DNS records in.

const (
	RecordListParamsDirectionAsc  RecordListParamsDirection = "asc"
	RecordListParamsDirectionDesc RecordListParamsDirection = "desc"
)

func (RecordListParamsDirection) IsKnown

func (r RecordListParamsDirection) IsKnown() bool

type RecordListParamsMatch

type RecordListParamsMatch string

Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.

const (
	RecordListParamsMatchAny RecordListParamsMatch = "any"
	RecordListParamsMatchAll RecordListParamsMatch = "all"
)

func (RecordListParamsMatch) IsKnown

func (r RecordListParamsMatch) IsKnown() bool

type RecordListParamsOrder

type RecordListParamsOrder string

Field to order DNS records by.

const (
	RecordListParamsOrderType    RecordListParamsOrder = "type"
	RecordListParamsOrderName    RecordListParamsOrder = "name"
	RecordListParamsOrderContent RecordListParamsOrder = "content"
	RecordListParamsOrderTTL     RecordListParamsOrder = "ttl"
	RecordListParamsOrderProxied RecordListParamsOrder = "proxied"
)

func (RecordListParamsOrder) IsKnown

func (r RecordListParamsOrder) IsKnown() bool

type RecordListParamsTag

type RecordListParamsTag struct {
	// Name of a tag which must _not_ be present on the DNS record. Tag filters are
	// case-insensitive.
	Absent param.Field[string] `query:"absent"`
	// A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return
	// DNS records that have a tag named `<tag-name>` whose value contains
	// `<tag-value>`. Tag filters are case-insensitive.
	Contains param.Field[string] `query:"contains"`
	// A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return
	// DNS records that have a tag named `<tag-name>` whose value ends with
	// `<tag-value>`. Tag filters are case-insensitive.
	Endswith param.Field[string] `query:"endswith"`
	// A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return
	// DNS records that have a tag named `<tag-name>` whose value is `<tag-value>`. Tag
	// filters are case-insensitive.
	Exact param.Field[string] `query:"exact"`
	// Name of a tag which must be present on the DNS record. Tag filters are
	// case-insensitive.
	Present param.Field[string] `query:"present"`
	// A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return
	// DNS records that have a tag named `<tag-name>` whose value starts with
	// `<tag-value>`. Tag filters are case-insensitive.
	Startswith param.Field[string] `query:"startswith"`
}

func (RecordListParamsTag) URLQuery

func (r RecordListParamsTag) URLQuery() (v url.Values)

URLQuery serializes RecordListParamsTag's query parameters as `url.Values`.

type RecordListParamsTagMatch

type RecordListParamsTagMatch string

Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.

const (
	RecordListParamsTagMatchAny RecordListParamsTagMatch = "any"
	RecordListParamsTagMatchAll RecordListParamsTagMatch = "all"
)

func (RecordListParamsTagMatch) IsKnown

func (r RecordListParamsTagMatch) IsKnown() bool

type RecordListParamsType

type RecordListParamsType string

Record type.

const (
	RecordListParamsTypeA      RecordListParamsType = "A"
	RecordListParamsTypeAAAA   RecordListParamsType = "AAAA"
	RecordListParamsTypeCAA    RecordListParamsType = "CAA"
	RecordListParamsTypeCert   RecordListParamsType = "CERT"
	RecordListParamsTypeCNAME  RecordListParamsType = "CNAME"
	RecordListParamsTypeDNSKEY RecordListParamsType = "DNSKEY"
	RecordListParamsTypeDS     RecordListParamsType = "DS"
	RecordListParamsTypeHTTPS  RecordListParamsType = "HTTPS"
	RecordListParamsTypeLOC    RecordListParamsType = "LOC"
	RecordListParamsTypeMX     RecordListParamsType = "MX"
	RecordListParamsTypeNAPTR  RecordListParamsType = "NAPTR"
	RecordListParamsTypeNS     RecordListParamsType = "NS"
	RecordListParamsTypePTR    RecordListParamsType = "PTR"
	RecordListParamsTypeSmimea RecordListParamsType = "SMIMEA"
	RecordListParamsTypeSRV    RecordListParamsType = "SRV"
	RecordListParamsTypeSSHFP  RecordListParamsType = "SSHFP"
	RecordListParamsTypeSVCB   RecordListParamsType = "SVCB"
	RecordListParamsTypeTLSA   RecordListParamsType = "TLSA"
	RecordListParamsTypeTXT    RecordListParamsType = "TXT"
	RecordListParamsTypeURI    RecordListParamsType = "URI"
)

func (RecordListParamsType) IsKnown

func (r RecordListParamsType) IsKnown() bool

type RecordNewParams

type RecordNewParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name param.Field[string] `json:"name,required"`
	// Record type.
	Type param.Field[RecordNewParamsType] `json:"type,required"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment param.Field[string] `json:"comment"`
	// Formatted URI content. See 'data' to set URI properties.
	Content param.Field[interface{}]         `json:"content"`
	Data    param.Field[RecordNewParamsData] `json:"data"`
	Meta    param.Field[RecordNewParamsMeta] `json:"meta"`
	// Required for MX, SRV and URI records; unused by other record types. Records with
	// lower priorities are preferred.
	Priority param.Field[float64] `json:"priority"`
	// Whether the record is receiving the performance and security benefits of
	// Cloudflare.
	Proxied param.Field[bool] `json:"proxied"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags param.Field[[]string] `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL param.Field[RecordNewParamsTTL] `json:"ttl"`
}

func (RecordNewParams) MarshalJSON

func (r RecordNewParams) MarshalJSON() (data []byte, err error)

type RecordNewParamsData

type RecordNewParamsData struct {
	// algorithm.
	Algorithm param.Field[float64] `json:"algorithm"`
	// Altitude of location in meters.
	Altitude param.Field[float64] `json:"altitude"`
	// certificate.
	Certificate param.Field[string] `json:"certificate"`
	// The record content.
	Content param.Field[string] `json:"content"`
	// Digest.
	Digest param.Field[string] `json:"digest"`
	// Digest Type.
	DigestType param.Field[float64] `json:"digest_type"`
	// fingerprint.
	Fingerprint param.Field[string] `json:"fingerprint"`
	// Flags.
	Flags param.Field[interface{}] `json:"flags"`
	// Key Tag.
	KeyTag param.Field[float64] `json:"key_tag"`
	// Degrees of latitude.
	LatDegrees param.Field[float64] `json:"lat_degrees"`
	// Latitude direction.
	LatDirection param.Field[RecordNewParamsDataLatDirection] `json:"lat_direction"`
	// Minutes of latitude.
	LatMinutes param.Field[float64] `json:"lat_minutes"`
	// Seconds of latitude.
	LatSeconds param.Field[float64] `json:"lat_seconds"`
	// Degrees of longitude.
	LongDegrees param.Field[float64] `json:"long_degrees"`
	// Longitude direction.
	LongDirection param.Field[RecordNewParamsDataLongDirection] `json:"long_direction"`
	// Minutes of longitude.
	LongMinutes param.Field[float64] `json:"long_minutes"`
	// Seconds of longitude.
	LongSeconds param.Field[float64] `json:"long_seconds"`
	// Matching Type.
	MatchingType param.Field[float64] `json:"matching_type"`
	// A valid hostname. Deprecated in favor of the regular 'name' outside the data
	// map. This data map field represents the remainder of the full 'name' after the
	// service and protocol.
	Name param.Field[string] `json:"name" format:"hostname"`
	// Order.
	Order param.Field[float64] `json:"order"`
	// The port of the service.
	Port param.Field[float64] `json:"port"`
	// Horizontal precision of location.
	PrecisionHorz param.Field[float64] `json:"precision_horz"`
	// Vertical precision of location.
	PrecisionVert param.Field[float64] `json:"precision_vert"`
	// Preference.
	Preference param.Field[float64] `json:"preference"`
	// priority.
	Priority param.Field[float64] `json:"priority"`
	// A valid protocol, prefixed with an underscore. Deprecated in favor of the
	// regular 'name' outside the data map. This data map field normally represents the
	// second label of that 'name'.
	Proto param.Field[string] `json:"proto"`
	// Protocol.
	Protocol param.Field[float64] `json:"protocol"`
	// Public Key.
	PublicKey param.Field[string] `json:"public_key"`
	// Regex.
	Regex param.Field[string] `json:"regex"`
	// Replacement.
	Replacement param.Field[string] `json:"replacement"`
	// Selector.
	Selector param.Field[float64] `json:"selector"`
	// A service type, prefixed with an underscore. Deprecated in favor of the regular
	// 'name' outside the data map. This data map field normally represents the first
	// label of that 'name'.
	Service param.Field[string] `json:"service"`
	// Size of location in meters.
	Size param.Field[float64] `json:"size"`
	// Name of the property controlled by this record (e.g.: issue, issuewild, iodef).
	Tag param.Field[string] `json:"tag"`
	// target.
	Target param.Field[string] `json:"target"`
	// type.
	Type param.Field[float64] `json:"type"`
	// Usage.
	Usage param.Field[float64] `json:"usage"`
	// value.
	Value param.Field[string] `json:"value"`
	// The record weight.
	Weight param.Field[float64] `json:"weight"`
}

func (RecordNewParamsData) MarshalJSON

func (r RecordNewParamsData) MarshalJSON() (data []byte, err error)

type RecordNewParamsDataLatDirection

type RecordNewParamsDataLatDirection string

Latitude direction.

const (
	RecordNewParamsDataLatDirectionN RecordNewParamsDataLatDirection = "N"
	RecordNewParamsDataLatDirectionS RecordNewParamsDataLatDirection = "S"
)

func (RecordNewParamsDataLatDirection) IsKnown

type RecordNewParamsDataLongDirection

type RecordNewParamsDataLongDirection string

Longitude direction.

const (
	RecordNewParamsDataLongDirectionE RecordNewParamsDataLongDirection = "E"
	RecordNewParamsDataLongDirectionW RecordNewParamsDataLongDirection = "W"
)

func (RecordNewParamsDataLongDirection) IsKnown

type RecordNewParamsMeta

type RecordNewParamsMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded param.Field[bool] `json:"auto_added"`
	// Where the record originated from.
	Source param.Field[string] `json:"source"`
}

func (RecordNewParamsMeta) MarshalJSON

func (r RecordNewParamsMeta) MarshalJSON() (data []byte, err error)

type RecordNewParamsTTL

type RecordNewParamsTTL interface {
	ImplementsDNSRecordNewParamsTTL()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Satisfied by shared.UnionFloat, dns.RecordNewParamsTTLNumber.

type RecordNewParamsTTLNumber

type RecordNewParamsTTLNumber float64
const (
	RecordNewParamsTTLNumber1 RecordNewParamsTTLNumber = 1
)

func (RecordNewParamsTTLNumber) IsKnown

func (r RecordNewParamsTTLNumber) IsKnown() bool

type RecordNewParamsType

type RecordNewParamsType string

Record type.

const (
	RecordNewParamsTypeURI    RecordNewParamsType = "URI"
	RecordNewParamsTypeTXT    RecordNewParamsType = "TXT"
	RecordNewParamsTypeTLSA   RecordNewParamsType = "TLSA"
	RecordNewParamsTypeSVCB   RecordNewParamsType = "SVCB"
	RecordNewParamsTypeSSHFP  RecordNewParamsType = "SSHFP"
	RecordNewParamsTypeSRV    RecordNewParamsType = "SRV"
	RecordNewParamsTypeSmimea RecordNewParamsType = "SMIMEA"
	RecordNewParamsTypePTR    RecordNewParamsType = "PTR"
	RecordNewParamsTypeNS     RecordNewParamsType = "NS"
	RecordNewParamsTypeNAPTR  RecordNewParamsType = "NAPTR"
	RecordNewParamsTypeMX     RecordNewParamsType = "MX"
	RecordNewParamsTypeLOC    RecordNewParamsType = "LOC"
	RecordNewParamsTypeHTTPS  RecordNewParamsType = "HTTPS"
	RecordNewParamsTypeDS     RecordNewParamsType = "DS"
	RecordNewParamsTypeDNSKEY RecordNewParamsType = "DNSKEY"
	RecordNewParamsTypeCNAME  RecordNewParamsType = "CNAME"
	RecordNewParamsTypeCert   RecordNewParamsType = "CERT"
	RecordNewParamsTypeCAA    RecordNewParamsType = "CAA"
	RecordNewParamsTypeAAAA   RecordNewParamsType = "AAAA"
	RecordNewParamsTypeA      RecordNewParamsType = "A"
)

func (RecordNewParamsType) IsKnown

func (r RecordNewParamsType) IsKnown() bool

type RecordNewResponseEnvelope

type RecordNewResponseEnvelope struct {
	Errors   []RecordNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RecordNewResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSRecord                           `json:"result,required"`
	// Whether the API call was successful
	Success RecordNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    recordNewResponseEnvelopeJSON    `json:"-"`
}

func (*RecordNewResponseEnvelope) UnmarshalJSON

func (r *RecordNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RecordNewResponseEnvelopeErrors

type RecordNewResponseEnvelopeErrors struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    recordNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RecordNewResponseEnvelopeErrors) UnmarshalJSON

func (r *RecordNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RecordNewResponseEnvelopeMessages

type RecordNewResponseEnvelopeMessages struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    recordNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RecordNewResponseEnvelopeMessages) UnmarshalJSON

func (r *RecordNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RecordNewResponseEnvelopeSuccess

type RecordNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RecordNewResponseEnvelopeSuccessTrue RecordNewResponseEnvelopeSuccess = true
)

func (RecordNewResponseEnvelopeSuccess) IsKnown

type RecordScanParams

type RecordScanParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RecordScanResponse

type RecordScanResponse struct {
	// Number of DNS records added.
	RecsAdded float64 `json:"recs_added"`
	// Total number of DNS records parsed.
	TotalRecordsParsed float64                `json:"total_records_parsed"`
	JSON               recordScanResponseJSON `json:"-"`
}

func (*RecordScanResponse) UnmarshalJSON

func (r *RecordScanResponse) UnmarshalJSON(data []byte) (err error)

type RecordScanResponseEnvelope

type RecordScanResponseEnvelope struct {
	Errors   []RecordScanResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RecordScanResponseEnvelopeMessages `json:"messages,required"`
	Result   RecordScanResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RecordScanResponseEnvelopeSuccess `json:"success,required"`
	Timing  RecordScanResponseEnvelopeTiming  `json:"timing"`
	JSON    recordScanResponseEnvelopeJSON    `json:"-"`
}

func (*RecordScanResponseEnvelope) UnmarshalJSON

func (r *RecordScanResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RecordScanResponseEnvelopeErrors

type RecordScanResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    recordScanResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RecordScanResponseEnvelopeErrors) UnmarshalJSON

func (r *RecordScanResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RecordScanResponseEnvelopeMessages

type RecordScanResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    recordScanResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RecordScanResponseEnvelopeMessages) UnmarshalJSON

func (r *RecordScanResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RecordScanResponseEnvelopeSuccess

type RecordScanResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RecordScanResponseEnvelopeSuccessTrue RecordScanResponseEnvelopeSuccess = true
)

func (RecordScanResponseEnvelopeSuccess) IsKnown

type RecordScanResponseEnvelopeTiming

type RecordScanResponseEnvelopeTiming struct {
	// When the file parsing ended.
	EndTime time.Time `json:"end_time" format:"date-time"`
	// Processing time of the file in seconds.
	ProcessTime float64 `json:"process_time"`
	// When the file parsing started.
	StartTime time.Time                            `json:"start_time" format:"date-time"`
	JSON      recordScanResponseEnvelopeTimingJSON `json:"-"`
}

func (*RecordScanResponseEnvelopeTiming) UnmarshalJSON

func (r *RecordScanResponseEnvelopeTiming) UnmarshalJSON(data []byte) (err error)

type RecordService

type RecordService struct {
	Options []option.RequestOption
}

RecordService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRecordService method instead.

func NewRecordService

func NewRecordService(opts ...option.RequestOption) (r *RecordService)

NewRecordService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RecordService) Delete

func (r *RecordService) Delete(ctx context.Context, dnsRecordID string, body RecordDeleteParams, opts ...option.RequestOption) (res *RecordDeleteResponse, err error)

Delete DNS Record

func (*RecordService) Edit

func (r *RecordService) Edit(ctx context.Context, dnsRecordID string, params RecordEditParams, opts ...option.RequestOption) (res *DNSRecord, err error)

Update an existing DNS record. Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.

func (*RecordService) Export

func (r *RecordService) Export(ctx context.Context, query RecordExportParams, opts ...option.RequestOption) (res *string, err error)

You can export your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint.

See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.

func (*RecordService) Get

func (r *RecordService) Get(ctx context.Context, dnsRecordID string, query RecordGetParams, opts ...option.RequestOption) (res *DNSRecord, err error)

DNS Record Details

func (*RecordService) Import

func (r *RecordService) Import(ctx context.Context, params RecordImportParams, opts ...option.RequestOption) (res *RecordImportResponse, err error)

You can upload your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present.

See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.

func (*RecordService) List

List, search, sort, and filter a zones' DNS records.

func (*RecordService) ListAutoPaging

List, search, sort, and filter a zones' DNS records.

func (*RecordService) New

func (r *RecordService) New(ctx context.Context, params RecordNewParams, opts ...option.RequestOption) (res *DNSRecord, err error)

Create a new DNS record for a zone.

Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.

func (*RecordService) Scan

Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.

func (*RecordService) Update

func (r *RecordService) Update(ctx context.Context, dnsRecordID string, params RecordUpdateParams, opts ...option.RequestOption) (res *DNSRecord, err error)

Overwrite an existing DNS record. Notes:

  • A/AAAA records cannot exist on the same name as CNAME records.
  • NS records cannot exist on the same name as any other record type.
  • Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.

type RecordUpdateParams

type RecordUpdateParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// DNS record name (or @ for the zone apex) in Punycode.
	Name param.Field[string] `json:"name,required"`
	// Record type.
	Type param.Field[RecordUpdateParamsType] `json:"type,required"`
	// Comments or notes about the DNS record. This field has no effect on DNS
	// responses.
	Comment param.Field[string] `json:"comment"`
	// Formatted URI content. See 'data' to set URI properties.
	Content param.Field[interface{}]            `json:"content"`
	Data    param.Field[RecordUpdateParamsData] `json:"data"`
	Meta    param.Field[RecordUpdateParamsMeta] `json:"meta"`
	// Required for MX, SRV and URI records; unused by other record types. Records with
	// lower priorities are preferred.
	Priority param.Field[float64] `json:"priority"`
	// Whether the record is receiving the performance and security benefits of
	// Cloudflare.
	Proxied param.Field[bool] `json:"proxied"`
	// Custom tags for the DNS record. This field has no effect on DNS responses.
	Tags param.Field[[]string] `json:"tags"`
	// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
	// Value must be between 60 and 86400, with the minimum reduced to 30 for
	// Enterprise zones.
	TTL param.Field[RecordUpdateParamsTTL] `json:"ttl"`
}

func (RecordUpdateParams) MarshalJSON

func (r RecordUpdateParams) MarshalJSON() (data []byte, err error)

type RecordUpdateParamsData

type RecordUpdateParamsData struct {
	// algorithm.
	Algorithm param.Field[float64] `json:"algorithm"`
	// Altitude of location in meters.
	Altitude param.Field[float64] `json:"altitude"`
	// certificate.
	Certificate param.Field[string] `json:"certificate"`
	// The record content.
	Content param.Field[string] `json:"content"`
	// Digest.
	Digest param.Field[string] `json:"digest"`
	// Digest Type.
	DigestType param.Field[float64] `json:"digest_type"`
	// fingerprint.
	Fingerprint param.Field[string] `json:"fingerprint"`
	// Flags.
	Flags param.Field[interface{}] `json:"flags"`
	// Key Tag.
	KeyTag param.Field[float64] `json:"key_tag"`
	// Degrees of latitude.
	LatDegrees param.Field[float64] `json:"lat_degrees"`
	// Latitude direction.
	LatDirection param.Field[RecordUpdateParamsDataLatDirection] `json:"lat_direction"`
	// Minutes of latitude.
	LatMinutes param.Field[float64] `json:"lat_minutes"`
	// Seconds of latitude.
	LatSeconds param.Field[float64] `json:"lat_seconds"`
	// Degrees of longitude.
	LongDegrees param.Field[float64] `json:"long_degrees"`
	// Longitude direction.
	LongDirection param.Field[RecordUpdateParamsDataLongDirection] `json:"long_direction"`
	// Minutes of longitude.
	LongMinutes param.Field[float64] `json:"long_minutes"`
	// Seconds of longitude.
	LongSeconds param.Field[float64] `json:"long_seconds"`
	// Matching Type.
	MatchingType param.Field[float64] `json:"matching_type"`
	// A valid hostname. Deprecated in favor of the regular 'name' outside the data
	// map. This data map field represents the remainder of the full 'name' after the
	// service and protocol.
	Name param.Field[string] `json:"name" format:"hostname"`
	// Order.
	Order param.Field[float64] `json:"order"`
	// The port of the service.
	Port param.Field[float64] `json:"port"`
	// Horizontal precision of location.
	PrecisionHorz param.Field[float64] `json:"precision_horz"`
	// Vertical precision of location.
	PrecisionVert param.Field[float64] `json:"precision_vert"`
	// Preference.
	Preference param.Field[float64] `json:"preference"`
	// priority.
	Priority param.Field[float64] `json:"priority"`
	// A valid protocol, prefixed with an underscore. Deprecated in favor of the
	// regular 'name' outside the data map. This data map field normally represents the
	// second label of that 'name'.
	Proto param.Field[string] `json:"proto"`
	// Protocol.
	Protocol param.Field[float64] `json:"protocol"`
	// Public Key.
	PublicKey param.Field[string] `json:"public_key"`
	// Regex.
	Regex param.Field[string] `json:"regex"`
	// Replacement.
	Replacement param.Field[string] `json:"replacement"`
	// Selector.
	Selector param.Field[float64] `json:"selector"`
	// A service type, prefixed with an underscore. Deprecated in favor of the regular
	// 'name' outside the data map. This data map field normally represents the first
	// label of that 'name'.
	Service param.Field[string] `json:"service"`
	// Size of location in meters.
	Size param.Field[float64] `json:"size"`
	// Name of the property controlled by this record (e.g.: issue, issuewild, iodef).
	Tag param.Field[string] `json:"tag"`
	// target.
	Target param.Field[string] `json:"target"`
	// type.
	Type param.Field[float64] `json:"type"`
	// Usage.
	Usage param.Field[float64] `json:"usage"`
	// value.
	Value param.Field[string] `json:"value"`
	// The record weight.
	Weight param.Field[float64] `json:"weight"`
}

func (RecordUpdateParamsData) MarshalJSON

func (r RecordUpdateParamsData) MarshalJSON() (data []byte, err error)

type RecordUpdateParamsDataLatDirection

type RecordUpdateParamsDataLatDirection string

Latitude direction.

const (
	RecordUpdateParamsDataLatDirectionN RecordUpdateParamsDataLatDirection = "N"
	RecordUpdateParamsDataLatDirectionS RecordUpdateParamsDataLatDirection = "S"
)

func (RecordUpdateParamsDataLatDirection) IsKnown

type RecordUpdateParamsDataLongDirection

type RecordUpdateParamsDataLongDirection string

Longitude direction.

const (
	RecordUpdateParamsDataLongDirectionE RecordUpdateParamsDataLongDirection = "E"
	RecordUpdateParamsDataLongDirectionW RecordUpdateParamsDataLongDirection = "W"
)

func (RecordUpdateParamsDataLongDirection) IsKnown

type RecordUpdateParamsMeta

type RecordUpdateParamsMeta struct {
	// Will exist if Cloudflare automatically added this DNS record during initial
	// setup.
	AutoAdded param.Field[bool] `json:"auto_added"`
	// Where the record originated from.
	Source param.Field[string] `json:"source"`
}

func (RecordUpdateParamsMeta) MarshalJSON

func (r RecordUpdateParamsMeta) MarshalJSON() (data []byte, err error)

type RecordUpdateParamsTTL

type RecordUpdateParamsTTL interface {
	ImplementsDNSRecordUpdateParamsTTL()
}

Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.

Satisfied by shared.UnionFloat, dns.RecordUpdateParamsTTLNumber.

type RecordUpdateParamsTTLNumber

type RecordUpdateParamsTTLNumber float64
const (
	RecordUpdateParamsTTLNumber1 RecordUpdateParamsTTLNumber = 1
)

func (RecordUpdateParamsTTLNumber) IsKnown

func (r RecordUpdateParamsTTLNumber) IsKnown() bool

type RecordUpdateParamsType

type RecordUpdateParamsType string

Record type.

const (
	RecordUpdateParamsTypeURI    RecordUpdateParamsType = "URI"
	RecordUpdateParamsTypeTXT    RecordUpdateParamsType = "TXT"
	RecordUpdateParamsTypeTLSA   RecordUpdateParamsType = "TLSA"
	RecordUpdateParamsTypeSVCB   RecordUpdateParamsType = "SVCB"
	RecordUpdateParamsTypeSSHFP  RecordUpdateParamsType = "SSHFP"
	RecordUpdateParamsTypeSRV    RecordUpdateParamsType = "SRV"
	RecordUpdateParamsTypeSmimea RecordUpdateParamsType = "SMIMEA"
	RecordUpdateParamsTypePTR    RecordUpdateParamsType = "PTR"
	RecordUpdateParamsTypeNS     RecordUpdateParamsType = "NS"
	RecordUpdateParamsTypeNAPTR  RecordUpdateParamsType = "NAPTR"
	RecordUpdateParamsTypeMX     RecordUpdateParamsType = "MX"
	RecordUpdateParamsTypeLOC    RecordUpdateParamsType = "LOC"
	RecordUpdateParamsTypeHTTPS  RecordUpdateParamsType = "HTTPS"
	RecordUpdateParamsTypeDS     RecordUpdateParamsType = "DS"
	RecordUpdateParamsTypeDNSKEY RecordUpdateParamsType = "DNSKEY"
	RecordUpdateParamsTypeCNAME  RecordUpdateParamsType = "CNAME"
	RecordUpdateParamsTypeCert   RecordUpdateParamsType = "CERT"
	RecordUpdateParamsTypeCAA    RecordUpdateParamsType = "CAA"
	RecordUpdateParamsTypeAAAA   RecordUpdateParamsType = "AAAA"
	RecordUpdateParamsTypeA      RecordUpdateParamsType = "A"
)

func (RecordUpdateParamsType) IsKnown

func (r RecordUpdateParamsType) IsKnown() bool

type RecordUpdateResponseEnvelope

type RecordUpdateResponseEnvelope struct {
	Errors   []RecordUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RecordUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   DNSRecord                              `json:"result,required"`
	// Whether the API call was successful
	Success RecordUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    recordUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*RecordUpdateResponseEnvelope) UnmarshalJSON

func (r *RecordUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RecordUpdateResponseEnvelopeErrors

type RecordUpdateResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    recordUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RecordUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *RecordUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RecordUpdateResponseEnvelopeMessages

type RecordUpdateResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    recordUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RecordUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *RecordUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RecordUpdateResponseEnvelopeSuccess

type RecordUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RecordUpdateResponseEnvelopeSuccessTrue RecordUpdateResponseEnvelopeSuccess = true
)

func (RecordUpdateResponseEnvelopeSuccess) IsKnown

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL