Documentation ¶
Index ¶
- Constants
- type AAAARecord
- type AAAARecordParam
- type AAAARecordType
- type ARecord
- type ARecordParam
- type ARecordType
- type ASN
- type ASNParam
- type AnalyticsReportBytimeGetParams
- type AnalyticsReportBytimeGetParamsTimeDelta
- type AnalyticsReportBytimeGetResponseEnvelope
- type AnalyticsReportBytimeGetResponseEnvelopeSuccess
- type AnalyticsReportBytimeService
- type AnalyticsReportGetParams
- type AnalyticsReportGetResponseEnvelope
- type AnalyticsReportGetResponseEnvelopeSuccess
- type AnalyticsReportService
- type AnalyticsService
- type AttackMitigation
- type AttackMitigationParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type ByTime
- type ByTimeData
- type CAARecord
- type CAARecordData
- type CAARecordDataParam
- type CAARecordParam
- type CAARecordType
- type CERTRecord
- type CERTRecordData
- type CERTRecordDataParam
- type CERTRecordParam
- type CERTRecordType
- type CNAMERecord
- type CNAMERecordParam
- type CNAMERecordType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type DNSAnalyticsNominalMetric
- type DNSAnalyticsQuery
- type DNSAnalyticsQueryTimeDelta
- type DNSKEYRecord
- type DNSKEYRecordData
- type DNSKEYRecordDataParam
- type DNSKEYRecordParam
- type DNSKEYRecordType
- type DNSService
- type DSRecord
- type DSRecordData
- type DSRecordDataParam
- type DSRecordParam
- type DSRecordType
- type Error
- type ErrorData
- type Firewall
- type FirewallAnalyticsReportBytimeGetParams
- type FirewallAnalyticsReportBytimeGetParamsTimeDelta
- type FirewallAnalyticsReportBytimeGetResponseEnvelope
- type FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess
- type FirewallAnalyticsReportBytimeService
- type FirewallAnalyticsReportGetParams
- type FirewallAnalyticsReportGetResponseEnvelope
- type FirewallAnalyticsReportGetResponseEnvelopeSuccess
- type FirewallAnalyticsReportService
- type FirewallAnalyticsService
- type FirewallDeleteParams
- type FirewallDeleteResponse
- type FirewallDeleteResponseEnvelope
- type FirewallDeleteResponseEnvelopeSuccess
- type FirewallEditParams
- type FirewallEditResponseEnvelope
- type FirewallEditResponseEnvelopeSuccess
- type FirewallGetParams
- type FirewallGetResponseEnvelope
- type FirewallGetResponseEnvelopeSuccess
- type FirewallIPsUnion
- type FirewallIPsUnionParam
- type FirewallListParams
- type FirewallNewParams
- type FirewallNewResponseEnvelope
- type FirewallNewResponseEnvelopeSuccess
- type FirewallParam
- type FirewallService
- func (r *FirewallService) Delete(ctx context.Context, dnsFirewallID string, params FirewallDeleteParams, ...) (res *FirewallDeleteResponse, err error)
- func (r *FirewallService) Edit(ctx context.Context, dnsFirewallID string, params FirewallEditParams, ...) (res *Firewall, err error)
- func (r *FirewallService) Get(ctx context.Context, dnsFirewallID string, query FirewallGetParams, ...) (res *Firewall, err error)
- func (r *FirewallService) List(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Firewall], err error)
- func (r *FirewallService) ListAutoPaging(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Firewall]
- func (r *FirewallService) New(ctx context.Context, params FirewallNewParams, opts ...option.RequestOption) (res *Firewall, err error)
- type HTTPSRecord
- type HTTPSRecordData
- type HTTPSRecordDataParam
- type HTTPSRecordParam
- type HTTPSRecordType
- type LOCRecord
- type LOCRecordData
- type LOCRecordDataLatDirection
- type LOCRecordDataLongDirection
- type LOCRecordDataParam
- type LOCRecordParam
- type LOCRecordType
- type MXRecord
- type MXRecordParam
- type MXRecordType
- type Member
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberUser
- type MemberUserParam
- type NAPTRRecord
- type NAPTRRecordData
- type NAPTRRecordDataParam
- type NAPTRRecordParam
- type NAPTRRecordType
- type NSRecord
- type NSRecordParam
- type NSRecordType
- type PTRRecord
- type PTRRecordParam
- type PTRRecordType
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Record
- type RecordDeleteParams
- type RecordDeleteResponse
- type RecordDeleteResponseEnvelope
- type RecordEditParams
- type RecordEditResponseEnvelope
- type RecordEditResponseEnvelopeSuccess
- type RecordExportParams
- type RecordGetParams
- type RecordGetResponseEnvelope
- type RecordGetResponseEnvelopeSuccess
- type RecordImportParams
- type RecordImportResponse
- type RecordImportResponseEnvelope
- type RecordImportResponseEnvelopeSuccess
- type RecordListParams
- type RecordListParamsComment
- type RecordListParamsDirection
- type RecordListParamsMatch
- type RecordListParamsOrder
- type RecordListParamsTag
- type RecordListParamsTagMatch
- type RecordListParamsType
- type RecordMetadata
- type RecordMetadataParam
- type RecordNewParams
- type RecordNewResponseEnvelope
- type RecordNewResponseEnvelopeSuccess
- type RecordParam
- type RecordProcessTiming
- type RecordScanParams
- type RecordScanResponse
- type RecordScanResponseEnvelope
- type RecordScanResponseEnvelopeSuccess
- type RecordService
- func (r *RecordService) Delete(ctx context.Context, dnsRecordID string, params RecordDeleteParams, ...) (res *RecordDeleteResponse, err error)
- func (r *RecordService) Edit(ctx context.Context, dnsRecordID string, params RecordEditParams, ...) (res *Record, err error)
- func (r *RecordService) Export(ctx context.Context, query RecordExportParams, opts ...option.RequestOption) (res *string, err error)
- func (r *RecordService) Get(ctx context.Context, dnsRecordID string, query RecordGetParams, ...) (res *Record, err error)
- func (r *RecordService) Import(ctx context.Context, params RecordImportParams, opts ...option.RequestOption) (res *RecordImportResponse, err error)
- func (r *RecordService) List(ctx context.Context, params RecordListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Record], err error)
- func (r *RecordService) ListAutoPaging(ctx context.Context, params RecordListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Record]
- func (r *RecordService) New(ctx context.Context, params RecordNewParams, opts ...option.RequestOption) (res *Record, err error)
- func (r *RecordService) Scan(ctx context.Context, params RecordScanParams, opts ...option.RequestOption) (res *RecordScanResponse, err error)
- func (r *RecordService) Update(ctx context.Context, dnsRecordID string, params RecordUpdateParams, ...) (res *Record, err error)
- type RecordTags
- type RecordTagsParam
- type RecordType
- type RecordUnion
- type RecordUnionParam
- type RecordUpdateParams
- type RecordUpdateResponseEnvelope
- type RecordUpdateResponseEnvelopeSuccess
- type Report
- type ReportData
- type ReportQuery
- type ResponseInfo
- type Role
- type SMIMEARecord
- type SMIMEARecordData
- type SMIMEARecordDataParam
- type SMIMEARecordParam
- type SMIMEARecordType
- type SRVRecord
- type SRVRecordData
- type SRVRecordDataParam
- type SRVRecordParam
- type SRVRecordType
- type SSHFPRecord
- type SSHFPRecordData
- type SSHFPRecordDataParam
- type SSHFPRecordParam
- type SSHFPRecordType
- type SVCBRecord
- type SVCBRecordData
- type SVCBRecordDataParam
- type SVCBRecordParam
- type SVCBRecordType
- type TLSARecord
- type TLSARecordData
- type TLSARecordDataParam
- type TLSARecordParam
- type TLSARecordType
- type TTLNumber
- type TTLUnion
- type TTLUnionParam
- type TXTRecord
- type TXTRecordParam
- type TXTRecordType
- type URIRecord
- type URIRecordData
- type URIRecordDataParam
- type URIRecordParam
- type URIRecordType
- type UpstreamIPsUnion
- type UpstreamIPsUnionParam
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AAAARecord ¶
type AAAARecord 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 AAAARecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON aaaaRecordJSON `json:"-"` }
func (*AAAARecord) UnmarshalJSON ¶
func (r *AAAARecord) UnmarshalJSON(data []byte) (err error)
type AAAARecordParam ¶
type AAAARecordParam struct { // A valid IPv6 address. Content param.Field[string] `json:"content,required" format:"ipv6"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[AAAARecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // 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[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (AAAARecordParam) MarshalJSON ¶
func (r AAAARecordParam) MarshalJSON() (data []byte, err error)
type AAAARecordType ¶
type AAAARecordType string
Record type.
const (
AAAARecordTypeAAAA AAAARecordType = "AAAA"
)
func (AAAARecordType) IsKnown ¶
func (r AAAARecordType) IsKnown() bool
type ARecord ¶
type ARecord 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 ARecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON aRecordJSON `json:"-"` }
func (*ARecord) UnmarshalJSON ¶
type ARecordParam ¶
type ARecordParam struct { // A valid IPv4 address. Content param.Field[string] `json:"content,required" format:"ipv4"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[ARecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // 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[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (ARecordParam) MarshalJSON ¶
func (r ARecordParam) MarshalJSON() (data []byte, err error)
type ARecordType ¶
type ARecordType string
Record type.
const (
ARecordTypeA ARecordType = "A"
)
func (ARecordType) IsKnown ¶
func (r ARecordType) IsKnown() bool
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 ¶
func (r AnalyticsReportBytimeGetParamsTimeDelta) IsKnown() bool
type AnalyticsReportBytimeGetResponseEnvelope ¶
type AnalyticsReportBytimeGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AnalyticsReportBytimeGetResponseEnvelopeSuccess `json:"success,required"` Result ByTime `json:"result"` JSON analyticsReportBytimeGetResponseEnvelopeJSON `json:"-"` }
func (*AnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsReportBytimeGetResponseEnvelopeSuccess ¶
type AnalyticsReportBytimeGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AnalyticsReportBytimeGetResponseEnvelopeSuccessTrue AnalyticsReportBytimeGetResponseEnvelopeSuccess = true
)
func (AnalyticsReportBytimeGetResponseEnvelopeSuccess) IsKnown ¶
func (r AnalyticsReportBytimeGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *AnalyticsReportBytimeService) Get(ctx context.Context, params AnalyticsReportBytimeGetParams, opts ...option.RequestOption) (res *ByTime, err error)
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 []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AnalyticsReportGetResponseEnvelopeSuccess `json:"success,required"` Result Report `json:"result"` JSON analyticsReportGetResponseEnvelopeJSON `json:"-"` }
func (*AnalyticsReportGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsReportGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsReportGetResponseEnvelopeSuccess ¶
type AnalyticsReportGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AnalyticsReportGetResponseEnvelopeSuccessTrue AnalyticsReportGetResponseEnvelopeSuccess = true
)
func (AnalyticsReportGetResponseEnvelopeSuccess) IsKnown ¶
func (r AnalyticsReportGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *AnalyticsReportService) Get(ctx context.Context, params AnalyticsReportGetParams, opts ...option.RequestOption) (res *Report, err error)
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 AttackMitigation ¶
type AttackMitigation struct { // When enabled, random-prefix attacks are automatically mitigated and the upstream // DNS servers protected. Enabled bool `json:"enabled"` // Only mitigate attacks when upstream servers seem unhealthy. OnlyWhenUpstreamUnhealthy bool `json:"only_when_upstream_unhealthy"` JSON attackMitigationJSON `json:"-"` }
Attack mitigation settings.
func (*AttackMitigation) UnmarshalJSON ¶
func (r *AttackMitigation) UnmarshalJSON(data []byte) (err error)
type AttackMitigationParam ¶
type AttackMitigationParam struct { // When enabled, random-prefix attacks are automatically mitigated and the upstream // DNS servers protected. Enabled param.Field[bool] `json:"enabled"` // Only mitigate attacks when upstream servers seem unhealthy. OnlyWhenUpstreamUnhealthy param.Field[bool] `json:"only_when_upstream_unhealthy"` }
Attack mitigation settings.
func (AttackMitigationParam) MarshalJSON ¶
func (r AttackMitigationParam) MarshalJSON() (data []byte, err error)
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type ByTime ¶
type ByTime struct { // Array with one row per combination of dimension values. Data []ByTimeData `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 DNSAnalyticsQuery `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 byTimeJSON `json:"-"` }
func (*ByTime) UnmarshalJSON ¶
type ByTimeData ¶
type ByTimeData 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 []DNSAnalyticsNominalMetric `json:"metrics,required"` JSON byTimeDataJSON `json:"-"` }
func (*ByTimeData) UnmarshalJSON ¶
func (r *ByTimeData) UnmarshalJSON(data []byte) (err error)
type CAARecord ¶
type CAARecord struct { // Components of a CAA record. Data CAARecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type CAARecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON caaRecordJSON `json:"-"` }
func (*CAARecord) UnmarshalJSON ¶
type CAARecordData ¶
type CAARecordData 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 caaRecordDataJSON `json:"-"` }
Components of a CAA record.
func (*CAARecordData) UnmarshalJSON ¶
func (r *CAARecordData) UnmarshalJSON(data []byte) (err error)
type CAARecordDataParam ¶
type CAARecordDataParam struct { // Flags for the CAA record. Flags param.Field[float64] `json:"flags"` // Name of the property controlled by this record (e.g.: issue, issuewild, iodef). Tag param.Field[string] `json:"tag"` // Value of the record. This field's semantics depend on the chosen tag. Value param.Field[string] `json:"value"` }
Components of a CAA record.
func (CAARecordDataParam) MarshalJSON ¶
func (r CAARecordDataParam) MarshalJSON() (data []byte, err error)
type CAARecordParam ¶
type CAARecordParam struct { // Components of a CAA record. Data param.Field[CAARecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[CAARecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (CAARecordParam) MarshalJSON ¶
func (r CAARecordParam) MarshalJSON() (data []byte, err error)
type CAARecordType ¶
type CAARecordType string
Record type.
const (
CAARecordTypeCAA CAARecordType = "CAA"
)
func (CAARecordType) IsKnown ¶
func (r CAARecordType) IsKnown() bool
type CERTRecord ¶
type CERTRecord struct { // Components of a CERT record. Data CERTRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type CERTRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON certRecordJSON `json:"-"` }
func (*CERTRecord) UnmarshalJSON ¶
func (r *CERTRecord) UnmarshalJSON(data []byte) (err error)
type CERTRecordData ¶
type CERTRecordData struct { // Algorithm. Algorithm float64 `json:"algorithm"` // Certificate. Certificate string `json:"certificate"` // Key Tag. KeyTag float64 `json:"key_tag"` // Type. Type float64 `json:"type"` JSON certRecordDataJSON `json:"-"` }
Components of a CERT record.
func (*CERTRecordData) UnmarshalJSON ¶
func (r *CERTRecordData) UnmarshalJSON(data []byte) (err error)
type CERTRecordDataParam ¶
type CERTRecordDataParam struct { // Algorithm. Algorithm param.Field[float64] `json:"algorithm"` // Certificate. Certificate param.Field[string] `json:"certificate"` // Key Tag. KeyTag param.Field[float64] `json:"key_tag"` // Type. Type param.Field[float64] `json:"type"` }
Components of a CERT record.
func (CERTRecordDataParam) MarshalJSON ¶
func (r CERTRecordDataParam) MarshalJSON() (data []byte, err error)
type CERTRecordParam ¶
type CERTRecordParam struct { // Components of a CERT record. Data param.Field[CERTRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[CERTRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (CERTRecordParam) MarshalJSON ¶
func (r CERTRecordParam) MarshalJSON() (data []byte, err error)
type CERTRecordType ¶
type CERTRecordType string
Record type.
const (
CERTRecordTypeCERT CERTRecordType = "CERT"
)
func (CERTRecordType) IsKnown ¶
func (r CERTRecordType) IsKnown() bool
type CNAMERecord ¶
type CNAMERecord 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 CNAMERecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON cnameRecordJSON `json:"-"` }
func (*CNAMERecord) UnmarshalJSON ¶
func (r *CNAMERecord) UnmarshalJSON(data []byte) (err error)
type CNAMERecordParam ¶
type CNAMERecordParam struct { // A valid hostname. Must not match the record's name. Content param.Field[interface{}] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[CNAMERecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // 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[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (CNAMERecordParam) MarshalJSON ¶
func (r CNAMERecordParam) MarshalJSON() (data []byte, err error)
type CNAMERecordType ¶
type CNAMERecordType string
Record type.
const (
CNAMERecordTypeCNAME CNAMERecordType = "CNAME"
)
func (CNAMERecordType) IsKnown ¶
func (r CNAMERecordType) IsKnown() bool
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type DNSAnalyticsNominalMetric ¶
type DNSAnalyticsNominalMetric []interface{}
type DNSAnalyticsQuery ¶
type DNSAnalyticsQuery 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 DNSAnalyticsQueryTimeDelta `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 dnsAnalyticsQueryJSON `json:"-"` }
func (*DNSAnalyticsQuery) UnmarshalJSON ¶
func (r *DNSAnalyticsQuery) UnmarshalJSON(data []byte) (err error)
type DNSAnalyticsQueryTimeDelta ¶
type DNSAnalyticsQueryTimeDelta string
Unit of time to group data by.
const ( DNSAnalyticsQueryTimeDeltaAll DNSAnalyticsQueryTimeDelta = "all" DNSAnalyticsQueryTimeDeltaAuto DNSAnalyticsQueryTimeDelta = "auto" DNSAnalyticsQueryTimeDeltaYear DNSAnalyticsQueryTimeDelta = "year" DNSAnalyticsQueryTimeDeltaQuarter DNSAnalyticsQueryTimeDelta = "quarter" DNSAnalyticsQueryTimeDeltaMonth DNSAnalyticsQueryTimeDelta = "month" DNSAnalyticsQueryTimeDeltaWeek DNSAnalyticsQueryTimeDelta = "week" DNSAnalyticsQueryTimeDeltaDay DNSAnalyticsQueryTimeDelta = "day" DNSAnalyticsQueryTimeDeltaHour DNSAnalyticsQueryTimeDelta = "hour" DNSAnalyticsQueryTimeDeltaDekaminute DNSAnalyticsQueryTimeDelta = "dekaminute" DNSAnalyticsQueryTimeDeltaMinute DNSAnalyticsQueryTimeDelta = "minute" )
func (DNSAnalyticsQueryTimeDelta) IsKnown ¶
func (r DNSAnalyticsQueryTimeDelta) IsKnown() bool
type DNSKEYRecord ¶
type DNSKEYRecord struct { // Components of a DNSKEY record. Data DNSKEYRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type DNSKEYRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON dnskeyRecordJSON `json:"-"` }
func (*DNSKEYRecord) UnmarshalJSON ¶
func (r *DNSKEYRecord) UnmarshalJSON(data []byte) (err error)
type DNSKEYRecordData ¶
type DNSKEYRecordData struct { // Algorithm. Algorithm float64 `json:"algorithm"` // Flags. Flags float64 `json:"flags"` // Protocol. Protocol float64 `json:"protocol"` // Public Key. PublicKey string `json:"public_key"` JSON dnskeyRecordDataJSON `json:"-"` }
Components of a DNSKEY record.
func (*DNSKEYRecordData) UnmarshalJSON ¶
func (r *DNSKEYRecordData) UnmarshalJSON(data []byte) (err error)
type DNSKEYRecordDataParam ¶
type DNSKEYRecordDataParam struct { // Algorithm. Algorithm param.Field[float64] `json:"algorithm"` // Flags. Flags param.Field[float64] `json:"flags"` // Protocol. Protocol param.Field[float64] `json:"protocol"` // Public Key. PublicKey param.Field[string] `json:"public_key"` }
Components of a DNSKEY record.
func (DNSKEYRecordDataParam) MarshalJSON ¶
func (r DNSKEYRecordDataParam) MarshalJSON() (data []byte, err error)
type DNSKEYRecordParam ¶
type DNSKEYRecordParam struct { // Components of a DNSKEY record. Data param.Field[DNSKEYRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[DNSKEYRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (DNSKEYRecordParam) MarshalJSON ¶
func (r DNSKEYRecordParam) MarshalJSON() (data []byte, err error)
type DNSKEYRecordType ¶
type DNSKEYRecordType string
Record type.
const (
DNSKEYRecordTypeDNSKEY DNSKEYRecordType = "DNSKEY"
)
func (DNSKEYRecordType) IsKnown ¶
func (r DNSKEYRecordType) 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 DSRecord ¶
type DSRecord struct { // Components of a DS record. Data DSRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type DSRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON dsRecordJSON `json:"-"` }
func (*DSRecord) UnmarshalJSON ¶
type DSRecordData ¶
type DSRecordData 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 dsRecordDataJSON `json:"-"` }
Components of a DS record.
func (*DSRecordData) UnmarshalJSON ¶
func (r *DSRecordData) UnmarshalJSON(data []byte) (err error)
type DSRecordDataParam ¶
type DSRecordDataParam struct { // Algorithm. Algorithm param.Field[float64] `json:"algorithm"` // Digest. Digest param.Field[string] `json:"digest"` // Digest Type. DigestType param.Field[float64] `json:"digest_type"` // Key Tag. KeyTag param.Field[float64] `json:"key_tag"` }
Components of a DS record.
func (DSRecordDataParam) MarshalJSON ¶
func (r DSRecordDataParam) MarshalJSON() (data []byte, err error)
type DSRecordParam ¶
type DSRecordParam struct { // Components of a DS record. Data param.Field[DSRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[DSRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (DSRecordParam) MarshalJSON ¶
func (r DSRecordParam) MarshalJSON() (data []byte, err error)
type DSRecordType ¶
type DSRecordType string
Record type.
const (
DSRecordTypeDS DSRecordType = "DS"
)
func (DSRecordType) IsKnown ¶
func (r DSRecordType) IsKnown() bool
type Firewall ¶
type Firewall struct { // Identifier ID string `json:"id,required"` // Deprecate the response to ANY requests. DeprecateAnyRequests bool `json:"deprecate_any_requests,required"` DNSFirewallIPs []FirewallIPsUnion `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 []UpstreamIPsUnion `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings. AttackMitigation AttackMitigation `json:"attack_mitigation,nullable"` // Negative DNS Cache TTL. NegativeCacheTTL float64 `json:"negative_cache_ttl,nullable"` // 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 firewallJSON `json:"-"` }
func (*Firewall) UnmarshalJSON ¶
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 ¶
func (r FirewallAnalyticsReportBytimeGetParams) URLQuery() (v url.Values)
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 ¶
func (r FirewallAnalyticsReportBytimeGetParamsTimeDelta) IsKnown() bool
type FirewallAnalyticsReportBytimeGetResponseEnvelope ¶
type FirewallAnalyticsReportBytimeGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess `json:"success,required"` Result ByTime `json:"result"` JSON firewallAnalyticsReportBytimeGetResponseEnvelopeJSON `json:"-"` }
func (*FirewallAnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON ¶
func (r *FirewallAnalyticsReportBytimeGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess ¶
type FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccessTrue FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess = true
)
func (FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallAnalyticsReportBytimeGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *FirewallAnalyticsReportBytimeService) Get(ctx context.Context, dnsFirewallID string, params FirewallAnalyticsReportBytimeGetParams, opts ...option.RequestOption) (res *ByTime, err error)
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 []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FirewallAnalyticsReportGetResponseEnvelopeSuccess `json:"success,required"` Result Report `json:"result"` JSON firewallAnalyticsReportGetResponseEnvelopeJSON `json:"-"` }
func (*FirewallAnalyticsReportGetResponseEnvelope) UnmarshalJSON ¶
func (r *FirewallAnalyticsReportGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FirewallAnalyticsReportGetResponseEnvelopeSuccess ¶
type FirewallAnalyticsReportGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallAnalyticsReportGetResponseEnvelopeSuccessTrue FirewallAnalyticsReportGetResponseEnvelopeSuccess = true
)
func (FirewallAnalyticsReportGetResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallAnalyticsReportGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *FirewallAnalyticsReportService) Get(ctx context.Context, dnsFirewallID string, params FirewallAnalyticsReportGetParams, opts ...option.RequestOption) (res *Report, err error)
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"` Body interface{} `json:"body,required"` }
func (FirewallDeleteParams) MarshalJSON ¶
func (r FirewallDeleteParams) MarshalJSON() (data []byte, err error)
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 []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `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 FirewallDeleteResponseEnvelopeSuccess ¶
type FirewallDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallDeleteResponseEnvelopeSuccessTrue FirewallDeleteResponseEnvelopeSuccess = true
)
func (FirewallDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallDeleteResponseEnvelopeSuccess) IsKnown() bool
type FirewallEditParams ¶
type FirewallEditParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Firewall FirewallParam `json:"firewall,required"` }
func (FirewallEditParams) MarshalJSON ¶
func (r FirewallEditParams) MarshalJSON() (data []byte, err error)
type FirewallEditResponseEnvelope ¶
type FirewallEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Firewall `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 FirewallEditResponseEnvelopeSuccess ¶
type FirewallEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallEditResponseEnvelopeSuccessTrue FirewallEditResponseEnvelopeSuccess = true
)
func (FirewallEditResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallEditResponseEnvelopeSuccess) IsKnown() bool
type FirewallGetParams ¶
type FirewallGetResponseEnvelope ¶
type FirewallGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Firewall `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 FirewallGetResponseEnvelopeSuccess ¶
type FirewallGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallGetResponseEnvelopeSuccessTrue FirewallGetResponseEnvelopeSuccess = true
)
func (FirewallGetResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallGetResponseEnvelopeSuccess) IsKnown() bool
type FirewallIPsUnion ¶
type FirewallIPsUnion interface {
ImplementsDNSFirewallIPsUnion()
}
Cloudflare-assigned DNS IPv4 Address.
Union satisfied by shared.UnionString or shared.UnionString.
type FirewallIPsUnionParam ¶
type FirewallIPsUnionParam interface {
ImplementsDNSFirewallIPsUnionParam()
}
Cloudflare-assigned DNS IPv4 Address.
Satisfied by shared.UnionString, shared.UnionString.
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[[]UpstreamIPsUnionParam] `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings. AttackMitigation param.Field[AttackMitigationParam] `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"` // 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 FirewallNewResponseEnvelope ¶
type FirewallNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Firewall `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 FirewallNewResponseEnvelopeSuccess ¶
type FirewallNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallNewResponseEnvelopeSuccessTrue FirewallNewResponseEnvelopeSuccess = true
)
func (FirewallNewResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallNewResponseEnvelopeSuccess) IsKnown() bool
type FirewallParam ¶
type FirewallParam struct { // Deprecate the response to ANY requests. DeprecateAnyRequests param.Field[bool] `json:"deprecate_any_requests,required"` DNSFirewallIPs param.Field[[]FirewallIPsUnionParam] `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[[]UpstreamIPsUnionParam] `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings. AttackMitigation param.Field[AttackMitigationParam] `json:"attack_mitigation"` // Negative DNS Cache TTL. NegativeCacheTTL param.Field[float64] `json:"negative_cache_ttl"` // 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 (FirewallParam) MarshalJSON ¶
func (r FirewallParam) MarshalJSON() (data []byte, err error)
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, params 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 *Firewall, 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 *Firewall, err error)
Show a single configured DNS Firewall cluster for an account.
func (*FirewallService) List ¶
func (r *FirewallService) List(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Firewall], err error)
List configured DNS Firewall clusters for an account.
func (*FirewallService) ListAutoPaging ¶
func (r *FirewallService) ListAutoPaging(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Firewall]
List configured DNS Firewall clusters for an account.
func (*FirewallService) New ¶
func (r *FirewallService) New(ctx context.Context, params FirewallNewParams, opts ...option.RequestOption) (res *Firewall, err error)
Create a configured DNS Firewall Cluster.
type HTTPSRecord ¶
type HTTPSRecord struct { // Components of a HTTPS record. Data HTTPSRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type HTTPSRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON httpsRecordJSON `json:"-"` }
func (*HTTPSRecord) UnmarshalJSON ¶
func (r *HTTPSRecord) UnmarshalJSON(data []byte) (err error)
type HTTPSRecordData ¶
type HTTPSRecordData struct { // priority. Priority float64 `json:"priority"` // target. Target string `json:"target"` // value. Value string `json:"value"` JSON httpsRecordDataJSON `json:"-"` }
Components of a HTTPS record.
func (*HTTPSRecordData) UnmarshalJSON ¶
func (r *HTTPSRecordData) UnmarshalJSON(data []byte) (err error)
type HTTPSRecordDataParam ¶
type HTTPSRecordDataParam struct { // priority. Priority param.Field[float64] `json:"priority"` // target. Target param.Field[string] `json:"target"` // value. Value param.Field[string] `json:"value"` }
Components of a HTTPS record.
func (HTTPSRecordDataParam) MarshalJSON ¶
func (r HTTPSRecordDataParam) MarshalJSON() (data []byte, err error)
type HTTPSRecordParam ¶
type HTTPSRecordParam struct { // Components of a HTTPS record. Data param.Field[HTTPSRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[HTTPSRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (HTTPSRecordParam) MarshalJSON ¶
func (r HTTPSRecordParam) MarshalJSON() (data []byte, err error)
type HTTPSRecordType ¶
type HTTPSRecordType string
Record type.
const (
HTTPSRecordTypeHTTPS HTTPSRecordType = "HTTPS"
)
func (HTTPSRecordType) IsKnown ¶
func (r HTTPSRecordType) IsKnown() bool
type LOCRecord ¶
type LOCRecord struct { // Components of a LOC record. Data LOCRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type LOCRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON locRecordJSON `json:"-"` }
func (*LOCRecord) UnmarshalJSON ¶
type LOCRecordData ¶
type LOCRecordData struct { // Altitude of location in meters. Altitude float64 `json:"altitude"` // Degrees of latitude. LatDegrees float64 `json:"lat_degrees"` // Latitude direction. LatDirection LOCRecordDataLatDirection `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 LOCRecordDataLongDirection `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 locRecordDataJSON `json:"-"` }
Components of a LOC record.
func (*LOCRecordData) UnmarshalJSON ¶
func (r *LOCRecordData) UnmarshalJSON(data []byte) (err error)
type LOCRecordDataLatDirection ¶
type LOCRecordDataLatDirection string
Latitude direction.
const ( LOCRecordDataLatDirectionN LOCRecordDataLatDirection = "N" LOCRecordDataLatDirectionS LOCRecordDataLatDirection = "S" )
func (LOCRecordDataLatDirection) IsKnown ¶
func (r LOCRecordDataLatDirection) IsKnown() bool
type LOCRecordDataLongDirection ¶
type LOCRecordDataLongDirection string
Longitude direction.
const ( LOCRecordDataLongDirectionE LOCRecordDataLongDirection = "E" LOCRecordDataLongDirectionW LOCRecordDataLongDirection = "W" )
func (LOCRecordDataLongDirection) IsKnown ¶
func (r LOCRecordDataLongDirection) IsKnown() bool
type LOCRecordDataParam ¶
type LOCRecordDataParam struct { // Altitude of location in meters. Altitude param.Field[float64] `json:"altitude"` // Degrees of latitude. LatDegrees param.Field[float64] `json:"lat_degrees"` // Latitude direction. LatDirection param.Field[LOCRecordDataLatDirection] `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[LOCRecordDataLongDirection] `json:"long_direction"` // Minutes of longitude. LongMinutes param.Field[float64] `json:"long_minutes"` // Seconds of longitude. LongSeconds param.Field[float64] `json:"long_seconds"` // Horizontal precision of location. PrecisionHorz param.Field[float64] `json:"precision_horz"` // Vertical precision of location. PrecisionVert param.Field[float64] `json:"precision_vert"` // Size of location in meters. Size param.Field[float64] `json:"size"` }
Components of a LOC record.
func (LOCRecordDataParam) MarshalJSON ¶
func (r LOCRecordDataParam) MarshalJSON() (data []byte, err error)
type LOCRecordParam ¶
type LOCRecordParam struct { // Components of a LOC record. Data param.Field[LOCRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[LOCRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (LOCRecordParam) MarshalJSON ¶
func (r LOCRecordParam) MarshalJSON() (data []byte, err error)
type LOCRecordType ¶
type LOCRecordType string
Record type.
const (
LOCRecordTypeLOC LOCRecordType = "LOC"
)
func (LOCRecordType) IsKnown ¶
func (r LOCRecordType) IsKnown() bool
type MXRecord ¶
type MXRecord 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 MXRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON mxRecordJSON `json:"-"` }
func (*MXRecord) UnmarshalJSON ¶
type MXRecordParam ¶
type MXRecordParam struct { // A valid mail server hostname. Content param.Field[string] `json:"content,required" format:"hostname"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Required for MX, SRV and URI records; unused by other record types. Records with // lower priorities are preferred. Priority param.Field[float64] `json:"priority,required"` // Record type. Type param.Field[MXRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (MXRecordParam) MarshalJSON ¶
func (r MXRecordParam) MarshalJSON() (data []byte, err error)
type MXRecordType ¶
type MXRecordType string
Record type.
const (
MXRecordTypeMX MXRecordType = "MX"
)
func (MXRecordType) IsKnown ¶
func (r MXRecordType) IsKnown() bool
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRole ¶ added in v2.1.0
type MemberRole = shared.MemberRole
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissions ¶ added in v2.1.0
type MemberRolesPermissions = shared.MemberRolesPermissions
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberUser ¶ added in v2.1.0
type MemberUser = shared.MemberUser
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
This is an alias to an internal type.
type NAPTRRecord ¶
type NAPTRRecord struct { // Components of a NAPTR record. Data NAPTRRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type NAPTRRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON naptrRecordJSON `json:"-"` }
func (*NAPTRRecord) UnmarshalJSON ¶
func (r *NAPTRRecord) UnmarshalJSON(data []byte) (err error)
type NAPTRRecordData ¶
type NAPTRRecordData 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 naptrRecordDataJSON `json:"-"` }
Components of a NAPTR record.
func (*NAPTRRecordData) UnmarshalJSON ¶
func (r *NAPTRRecordData) UnmarshalJSON(data []byte) (err error)
type NAPTRRecordDataParam ¶
type NAPTRRecordDataParam struct { // Flags. Flags param.Field[string] `json:"flags"` // Order. Order param.Field[float64] `json:"order"` // Preference. Preference param.Field[float64] `json:"preference"` // Regex. Regex param.Field[string] `json:"regex"` // Replacement. Replacement param.Field[string] `json:"replacement"` // Service. Service param.Field[string] `json:"service"` }
Components of a NAPTR record.
func (NAPTRRecordDataParam) MarshalJSON ¶
func (r NAPTRRecordDataParam) MarshalJSON() (data []byte, err error)
type NAPTRRecordParam ¶
type NAPTRRecordParam struct { // Components of a NAPTR record. Data param.Field[NAPTRRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[NAPTRRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (NAPTRRecordParam) MarshalJSON ¶
func (r NAPTRRecordParam) MarshalJSON() (data []byte, err error)
type NAPTRRecordType ¶
type NAPTRRecordType string
Record type.
const (
NAPTRRecordTypeNAPTR NAPTRRecordType = "NAPTR"
)
func (NAPTRRecordType) IsKnown ¶
func (r NAPTRRecordType) IsKnown() bool
type NSRecord ¶
type NSRecord struct { // A valid name server host name. Content string `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type NSRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON nsRecordJSON `json:"-"` }
func (*NSRecord) UnmarshalJSON ¶
type NSRecordParam ¶
type NSRecordParam struct { // A valid name server host name. Content param.Field[string] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[NSRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (NSRecordParam) MarshalJSON ¶
func (r NSRecordParam) MarshalJSON() (data []byte, err error)
type NSRecordType ¶
type NSRecordType string
Record type.
const (
NSRecordTypeNS NSRecordType = "NS"
)
func (NSRecordType) IsKnown ¶
func (r NSRecordType) IsKnown() bool
type PTRRecord ¶
type PTRRecord 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 PTRRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON ptrRecordJSON `json:"-"` }
func (*PTRRecord) UnmarshalJSON ¶
type PTRRecordParam ¶
type PTRRecordParam struct { // Domain name pointing to the address. Content param.Field[string] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[PTRRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (PTRRecordParam) MarshalJSON ¶
func (r PTRRecordParam) MarshalJSON() (data []byte, err error)
type PTRRecordType ¶
type PTRRecordType string
Record type.
const (
PTRRecordTypePTR PTRRecordType = "PTR"
)
func (PTRRecordType) IsKnown ¶
func (r PTRRecordType) IsKnown() bool
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type Record ¶
type Record struct { Content interface{} `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied bool `json:"proxied"` // Record type. Type RecordType `json:"type,required"` // 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"` // Identifier ID string `json:"id"` // 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 RecordMetadata `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"` Tags interface{} `json:"tags,required"` // 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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` Data interface{} `json:"data,required"` // Required for MX, SRV and URI records; unused by other record types. Records with // lower priorities are preferred. Priority float64 `json:"priority"` JSON recordJSON `json:"-"` // contains filtered or unexported fields }
func (Record) AsUnion ¶
func (r Record) AsUnion() RecordUnion
func (*Record) UnmarshalJSON ¶
type RecordDeleteParams ¶
type RecordDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Body interface{} `json:"body,required"` }
func (RecordDeleteParams) MarshalJSON ¶
func (r RecordDeleteParams) MarshalJSON() (data []byte, err error)
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"` Record RecordUnionParam `json:"record,required"` }
func (RecordEditParams) MarshalJSON ¶
func (r RecordEditParams) MarshalJSON() (data []byte, err error)
type RecordEditResponseEnvelope ¶
type RecordEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RecordEditResponseEnvelopeSuccess `json:"success,required"` Result Record `json:"result"` JSON recordEditResponseEnvelopeJSON `json:"-"` }
func (*RecordEditResponseEnvelope) UnmarshalJSON ¶
func (r *RecordEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RecordEditResponseEnvelopeSuccess ¶
type RecordEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RecordEditResponseEnvelopeSuccessTrue RecordEditResponseEnvelopeSuccess = true
)
func (RecordEditResponseEnvelopeSuccess) IsKnown ¶
func (r RecordEditResponseEnvelopeSuccess) IsKnown() bool
type RecordExportParams ¶
type RecordGetParams ¶
type RecordGetResponseEnvelope ¶
type RecordGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RecordGetResponseEnvelopeSuccess `json:"success,required"` Result Record `json:"result"` JSON recordGetResponseEnvelopeJSON `json:"-"` }
func (*RecordGetResponseEnvelope) UnmarshalJSON ¶
func (r *RecordGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RecordGetResponseEnvelopeSuccess ¶
type RecordGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RecordGetResponseEnvelopeSuccessTrue RecordGetResponseEnvelopeSuccess = true
)
func (RecordGetResponseEnvelopeSuccess) IsKnown ¶
func (r RecordGetResponseEnvelopeSuccess) IsKnown() bool
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 []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RecordImportResponseEnvelopeSuccess `json:"success,required"` Result RecordImportResponse `json:"result"` Timing RecordProcessTiming `json:"timing"` JSON recordImportResponseEnvelopeJSON `json:"-"` }
func (*RecordImportResponseEnvelope) UnmarshalJSON ¶
func (r *RecordImportResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RecordImportResponseEnvelopeSuccess ¶
type RecordImportResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RecordImportResponseEnvelopeSuccessTrue RecordImportResponseEnvelopeSuccess = true
)
func (RecordImportResponseEnvelopeSuccess) IsKnown ¶
func (r RecordImportResponseEnvelopeSuccess) IsKnown() bool
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 RecordMetadata ¶
type RecordMetadata 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 recordMetadataJSON `json:"-"` }
Extra Cloudflare-specific information about the record.
func (*RecordMetadata) UnmarshalJSON ¶
func (r *RecordMetadata) UnmarshalJSON(data []byte) (err error)
type RecordMetadataParam ¶
type RecordMetadataParam 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"` }
Extra Cloudflare-specific information about the record.
func (RecordMetadataParam) MarshalJSON ¶
func (r RecordMetadataParam) MarshalJSON() (data []byte, err error)
type RecordNewParams ¶
type RecordNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Record RecordUnionParam `json:"record,required"` }
func (RecordNewParams) MarshalJSON ¶
func (r RecordNewParams) MarshalJSON() (data []byte, err error)
type RecordNewResponseEnvelope ¶
type RecordNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RecordNewResponseEnvelopeSuccess `json:"success,required"` Result Record `json:"result"` JSON recordNewResponseEnvelopeJSON `json:"-"` }
func (*RecordNewResponseEnvelope) UnmarshalJSON ¶
func (r *RecordNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RecordNewResponseEnvelopeSuccess ¶
type RecordNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RecordNewResponseEnvelopeSuccessTrue RecordNewResponseEnvelopeSuccess = true
)
func (RecordNewResponseEnvelopeSuccess) IsKnown ¶
func (r RecordNewResponseEnvelopeSuccess) IsKnown() bool
type RecordParam ¶
type RecordParam struct { Content param.Field[interface{}] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied param.Field[bool] `json:"proxied"` // Record type. Type param.Field[RecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` Tags param.Field[interface{}] `json:"tags,required"` // 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[TTLUnionParam] `json:"ttl"` Data param.Field[interface{}] `json:"data,required"` // Required for MX, SRV and URI records; unused by other record types. Records with // lower priorities are preferred. Priority param.Field[float64] `json:"priority"` }
func (RecordParam) MarshalJSON ¶
func (r RecordParam) MarshalJSON() (data []byte, err error)
type RecordProcessTiming ¶
type RecordProcessTiming 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 recordProcessTimingJSON `json:"-"` }
func (*RecordProcessTiming) UnmarshalJSON ¶
func (r *RecordProcessTiming) UnmarshalJSON(data []byte) (err error)
type RecordScanParams ¶
type RecordScanParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Body interface{} `json:"body,required"` }
func (RecordScanParams) MarshalJSON ¶
func (r RecordScanParams) MarshalJSON() (data []byte, err error)
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 []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RecordScanResponseEnvelopeSuccess `json:"success,required"` Result RecordScanResponse `json:"result"` Timing RecordProcessTiming `json:"timing"` JSON recordScanResponseEnvelopeJSON `json:"-"` }
func (*RecordScanResponseEnvelope) UnmarshalJSON ¶
func (r *RecordScanResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RecordScanResponseEnvelopeSuccess ¶
type RecordScanResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RecordScanResponseEnvelopeSuccessTrue RecordScanResponseEnvelopeSuccess = true
)
func (RecordScanResponseEnvelopeSuccess) IsKnown ¶
func (r RecordScanResponseEnvelopeSuccess) IsKnown() bool
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, params 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 *Record, 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 *Record, 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 ¶
func (r *RecordService) List(ctx context.Context, params RecordListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Record], err error)
List, search, sort, and filter a zones' DNS records.
func (*RecordService) ListAutoPaging ¶
func (r *RecordService) ListAutoPaging(ctx context.Context, params RecordListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Record]
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 *Record, 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 ¶
func (r *RecordService) Scan(ctx context.Context, params RecordScanParams, opts ...option.RequestOption) (res *RecordScanResponse, err error)
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 *Record, 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 RecordTags ¶
type RecordTags = string
type RecordTagsParam ¶
type RecordTagsParam = string
type RecordType ¶
type RecordType string
Record type.
const ( RecordTypeA RecordType = "A" RecordTypeAAAA RecordType = "AAAA" RecordTypeCAA RecordType = "CAA" RecordTypeCERT RecordType = "CERT" RecordTypeCNAME RecordType = "CNAME" RecordTypeDNSKEY RecordType = "DNSKEY" RecordTypeDS RecordType = "DS" RecordTypeHTTPS RecordType = "HTTPS" RecordTypeLOC RecordType = "LOC" RecordTypeMX RecordType = "MX" RecordTypeNAPTR RecordType = "NAPTR" RecordTypeNS RecordType = "NS" RecordTypePTR RecordType = "PTR" RecordTypeSMIMEA RecordType = "SMIMEA" RecordTypeSRV RecordType = "SRV" RecordTypeSSHFP RecordType = "SSHFP" RecordTypeSVCB RecordType = "SVCB" RecordTypeTLSA RecordType = "TLSA" RecordTypeTXT RecordType = "TXT" RecordTypeURI RecordType = "URI" )
func (RecordType) IsKnown ¶
func (r RecordType) IsKnown() bool
type RecordUnion ¶
type RecordUnion interface {
// contains filtered or unexported methods
}
Union satisfied by dns.ARecord, dns.AAAARecord, dns.CAARecord, dns.CERTRecord, dns.CNAMERecord, dns.DNSKEYRecord, dns.DSRecord, dns.HTTPSRecord, dns.LOCRecord, dns.MXRecord, dns.NAPTRRecord, dns.NSRecord, dns.PTRRecord, dns.SMIMEARecord, dns.SRVRecord, dns.SSHFPRecord, dns.SVCBRecord, dns.TLSARecord, dns.TXTRecord or dns.URIRecord.
type RecordUnionParam ¶
type RecordUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by dns.ARecordParam, dns.AAAARecordParam, dns.CAARecordParam, dns.CERTRecordParam, dns.CNAMERecordParam, dns.DNSKEYRecordParam, dns.DSRecordParam, dns.HTTPSRecordParam, dns.LOCRecordParam, dns.MXRecordParam, dns.NAPTRRecordParam, dns.NSRecordParam, dns.PTRRecordParam, dns.SMIMEARecordParam, dns.SRVRecordParam, dns.SSHFPRecordParam, dns.SVCBRecordParam, dns.TLSARecordParam, dns.TXTRecordParam, dns.URIRecordParam, RecordParam.
type RecordUpdateParams ¶
type RecordUpdateParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Record RecordUnionParam `json:"record,required"` }
func (RecordUpdateParams) MarshalJSON ¶
func (r RecordUpdateParams) MarshalJSON() (data []byte, err error)
type RecordUpdateResponseEnvelope ¶
type RecordUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success RecordUpdateResponseEnvelopeSuccess `json:"success,required"` Result Record `json:"result"` JSON recordUpdateResponseEnvelopeJSON `json:"-"` }
func (*RecordUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *RecordUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RecordUpdateResponseEnvelopeSuccess ¶
type RecordUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RecordUpdateResponseEnvelopeSuccessTrue RecordUpdateResponseEnvelopeSuccess = true
)
func (RecordUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r RecordUpdateResponseEnvelopeSuccess) IsKnown() bool
type Report ¶
type Report struct { // Array with one row per combination of dimension values. Data []ReportData `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 ReportQuery `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 reportJSON `json:"-"` }
func (*Report) UnmarshalJSON ¶
type ReportData ¶
type ReportData 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 reportDataJSON `json:"-"` }
func (*ReportData) UnmarshalJSON ¶
func (r *ReportData) UnmarshalJSON(data []byte) (err error)
type ReportQuery ¶
type ReportQuery 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 reportQueryJSON `json:"-"` }
func (*ReportQuery) UnmarshalJSON ¶
func (r *ReportQuery) UnmarshalJSON(data []byte) (err error)
type SMIMEARecord ¶
type SMIMEARecord struct { // Components of a SMIMEA record. Data SMIMEARecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type SMIMEARecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON smimeaRecordJSON `json:"-"` }
func (*SMIMEARecord) UnmarshalJSON ¶
func (r *SMIMEARecord) UnmarshalJSON(data []byte) (err error)
type SMIMEARecordData ¶
type SMIMEARecordData struct { // Certificate. Certificate string `json:"certificate"` // Matching Type. MatchingType float64 `json:"matching_type"` // Selector. Selector float64 `json:"selector"` // Usage. Usage float64 `json:"usage"` JSON smimeaRecordDataJSON `json:"-"` }
Components of a SMIMEA record.
func (*SMIMEARecordData) UnmarshalJSON ¶
func (r *SMIMEARecordData) UnmarshalJSON(data []byte) (err error)
type SMIMEARecordDataParam ¶
type SMIMEARecordDataParam struct { // Certificate. Certificate param.Field[string] `json:"certificate"` // Matching Type. MatchingType param.Field[float64] `json:"matching_type"` // Selector. Selector param.Field[float64] `json:"selector"` // Usage. Usage param.Field[float64] `json:"usage"` }
Components of a SMIMEA record.
func (SMIMEARecordDataParam) MarshalJSON ¶
func (r SMIMEARecordDataParam) MarshalJSON() (data []byte, err error)
type SMIMEARecordParam ¶
type SMIMEARecordParam struct { // Components of a SMIMEA record. Data param.Field[SMIMEARecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[SMIMEARecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (SMIMEARecordParam) MarshalJSON ¶
func (r SMIMEARecordParam) MarshalJSON() (data []byte, err error)
type SMIMEARecordType ¶
type SMIMEARecordType string
Record type.
const (
SMIMEARecordTypeSMIMEA SMIMEARecordType = "SMIMEA"
)
func (SMIMEARecordType) IsKnown ¶
func (r SMIMEARecordType) IsKnown() bool
type SRVRecord ¶
type SRVRecord struct { // Components of a SRV record. Data SRVRecordData `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 SRVRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON srvRecordJSON `json:"-"` }
func (*SRVRecord) UnmarshalJSON ¶
type SRVRecordData ¶
type SRVRecordData 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 srvRecordDataJSON `json:"-"` }
Components of a SRV record.
func (*SRVRecordData) UnmarshalJSON ¶
func (r *SRVRecordData) UnmarshalJSON(data []byte) (err error)
type SRVRecordDataParam ¶
type SRVRecordDataParam 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 param.Field[string] `json:"name" format:"hostname"` // The port of the service. Port param.Field[float64] `json:"port"` // Required for MX, SRV and URI records; unused by other record types. Records with // lower priorities are preferred. 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"` // 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"` // A valid hostname. Target param.Field[string] `json:"target" format:"hostname"` // The record weight. Weight param.Field[float64] `json:"weight"` }
Components of a SRV record.
func (SRVRecordDataParam) MarshalJSON ¶
func (r SRVRecordDataParam) MarshalJSON() (data []byte, err error)
type SRVRecordParam ¶
type SRVRecordParam struct { // Components of a SRV record. Data param.Field[SRVRecordDataParam] `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 param.Field[string] `json:"name,required"` // Record type. Type param.Field[SRVRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (SRVRecordParam) MarshalJSON ¶
func (r SRVRecordParam) MarshalJSON() (data []byte, err error)
type SRVRecordType ¶
type SRVRecordType string
Record type.
const (
SRVRecordTypeSRV SRVRecordType = "SRV"
)
func (SRVRecordType) IsKnown ¶
func (r SRVRecordType) IsKnown() bool
type SSHFPRecord ¶
type SSHFPRecord struct { // Components of a SSHFP record. Data SSHFPRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type SSHFPRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON sshfpRecordJSON `json:"-"` }
func (*SSHFPRecord) UnmarshalJSON ¶
func (r *SSHFPRecord) UnmarshalJSON(data []byte) (err error)
type SSHFPRecordData ¶
type SSHFPRecordData struct { // algorithm. Algorithm float64 `json:"algorithm"` // fingerprint. Fingerprint string `json:"fingerprint"` // type. Type float64 `json:"type"` JSON sshfpRecordDataJSON `json:"-"` }
Components of a SSHFP record.
func (*SSHFPRecordData) UnmarshalJSON ¶
func (r *SSHFPRecordData) UnmarshalJSON(data []byte) (err error)
type SSHFPRecordDataParam ¶
type SSHFPRecordDataParam struct { // algorithm. Algorithm param.Field[float64] `json:"algorithm"` // fingerprint. Fingerprint param.Field[string] `json:"fingerprint"` // type. Type param.Field[float64] `json:"type"` }
Components of a SSHFP record.
func (SSHFPRecordDataParam) MarshalJSON ¶
func (r SSHFPRecordDataParam) MarshalJSON() (data []byte, err error)
type SSHFPRecordParam ¶
type SSHFPRecordParam struct { // Components of a SSHFP record. Data param.Field[SSHFPRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[SSHFPRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (SSHFPRecordParam) MarshalJSON ¶
func (r SSHFPRecordParam) MarshalJSON() (data []byte, err error)
type SSHFPRecordType ¶
type SSHFPRecordType string
Record type.
const (
SSHFPRecordTypeSSHFP SSHFPRecordType = "SSHFP"
)
func (SSHFPRecordType) IsKnown ¶
func (r SSHFPRecordType) IsKnown() bool
type SVCBRecord ¶
type SVCBRecord struct { // Components of a SVCB record. Data SVCBRecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type SVCBRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON svcbRecordJSON `json:"-"` }
func (*SVCBRecord) UnmarshalJSON ¶
func (r *SVCBRecord) UnmarshalJSON(data []byte) (err error)
type SVCBRecordData ¶
type SVCBRecordData struct { // priority. Priority float64 `json:"priority"` // target. Target string `json:"target"` // value. Value string `json:"value"` JSON svcbRecordDataJSON `json:"-"` }
Components of a SVCB record.
func (*SVCBRecordData) UnmarshalJSON ¶
func (r *SVCBRecordData) UnmarshalJSON(data []byte) (err error)
type SVCBRecordDataParam ¶
type SVCBRecordDataParam struct { // priority. Priority param.Field[float64] `json:"priority"` // target. Target param.Field[string] `json:"target"` // value. Value param.Field[string] `json:"value"` }
Components of a SVCB record.
func (SVCBRecordDataParam) MarshalJSON ¶
func (r SVCBRecordDataParam) MarshalJSON() (data []byte, err error)
type SVCBRecordParam ¶
type SVCBRecordParam struct { // Components of a SVCB record. Data param.Field[SVCBRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[SVCBRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (SVCBRecordParam) MarshalJSON ¶
func (r SVCBRecordParam) MarshalJSON() (data []byte, err error)
type SVCBRecordType ¶
type SVCBRecordType string
Record type.
const (
SVCBRecordTypeSVCB SVCBRecordType = "SVCB"
)
func (SVCBRecordType) IsKnown ¶
func (r SVCBRecordType) IsKnown() bool
type TLSARecord ¶
type TLSARecord struct { // Components of a TLSA record. Data TLSARecordData `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Record type. Type TLSARecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON tlsaRecordJSON `json:"-"` }
func (*TLSARecord) UnmarshalJSON ¶
func (r *TLSARecord) UnmarshalJSON(data []byte) (err error)
type TLSARecordData ¶
type TLSARecordData struct { // certificate. Certificate string `json:"certificate"` // Matching Type. MatchingType float64 `json:"matching_type"` // Selector. Selector float64 `json:"selector"` // Usage. Usage float64 `json:"usage"` JSON tlsaRecordDataJSON `json:"-"` }
Components of a TLSA record.
func (*TLSARecordData) UnmarshalJSON ¶
func (r *TLSARecordData) UnmarshalJSON(data []byte) (err error)
type TLSARecordDataParam ¶
type TLSARecordDataParam struct { // certificate. Certificate param.Field[string] `json:"certificate"` // Matching Type. MatchingType param.Field[float64] `json:"matching_type"` // Selector. Selector param.Field[float64] `json:"selector"` // Usage. Usage param.Field[float64] `json:"usage"` }
Components of a TLSA record.
func (TLSARecordDataParam) MarshalJSON ¶
func (r TLSARecordDataParam) MarshalJSON() (data []byte, err error)
type TLSARecordParam ¶
type TLSARecordParam struct { // Components of a TLSA record. Data param.Field[TLSARecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[TLSARecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (TLSARecordParam) MarshalJSON ¶
func (r TLSARecordParam) MarshalJSON() (data []byte, err error)
type TLSARecordType ¶
type TLSARecordType string
Record type.
const (
TLSARecordTypeTLSA TLSARecordType = "TLSA"
)
func (TLSARecordType) IsKnown ¶
func (r TLSARecordType) IsKnown() bool
type TTLUnion ¶
type TTLUnion interface {
ImplementsDNSTTLUnion()
}
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.TTLNumber.
type TTLUnionParam ¶
type TTLUnionParam interface {
ImplementsDNSTTLUnionParam()
}
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.TTLNumber.
type TXTRecord ¶
type TXTRecord 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 TXTRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON txtRecordJSON `json:"-"` }
func (*TXTRecord) UnmarshalJSON ¶
type TXTRecordParam ¶
type TXTRecordParam struct { // Text content for the record. Content param.Field[string] `json:"content,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Record type. Type param.Field[TXTRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (TXTRecordParam) MarshalJSON ¶
func (r TXTRecordParam) MarshalJSON() (data []byte, err error)
type TXTRecordType ¶
type TXTRecordType string
Record type.
const (
TXTRecordTypeTXT TXTRecordType = "TXT"
)
func (TXTRecordType) IsKnown ¶
func (r TXTRecordType) IsKnown() bool
type URIRecord ¶
type URIRecord struct { // Components of a URI record. Data URIRecordData `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 URIRecordType `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 RecordMetadata `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 []RecordTags `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 TTLUnion `json:"ttl"` // Identifier ZoneID string `json:"zone_id"` // The domain of the record. ZoneName string `json:"zone_name" format:"hostname"` JSON uriRecordJSON `json:"-"` }
func (*URIRecord) UnmarshalJSON ¶
type URIRecordData ¶
type URIRecordData struct { // The record content. Content string `json:"content"` // The record weight. Weight float64 `json:"weight"` JSON uriRecordDataJSON `json:"-"` }
Components of a URI record.
func (*URIRecordData) UnmarshalJSON ¶
func (r *URIRecordData) UnmarshalJSON(data []byte) (err error)
type URIRecordDataParam ¶
type URIRecordDataParam struct { // The record content. Content param.Field[string] `json:"content"` // The record weight. Weight param.Field[float64] `json:"weight"` }
Components of a URI record.
func (URIRecordDataParam) MarshalJSON ¶
func (r URIRecordDataParam) MarshalJSON() (data []byte, err error)
type URIRecordParam ¶
type URIRecordParam struct { // Components of a URI record. Data param.Field[URIRecordDataParam] `json:"data,required"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name,required"` // Required for MX, SRV and URI records; unused by other record types. Records with // lower priorities are preferred. Priority param.Field[float64] `json:"priority,required"` // Record type. Type param.Field[URIRecordType] `json:"type,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags param.Field[[]RecordTagsParam] `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[TTLUnionParam] `json:"ttl"` }
func (URIRecordParam) MarshalJSON ¶
func (r URIRecordParam) MarshalJSON() (data []byte, err error)
type URIRecordType ¶
type URIRecordType string
Record type.
const (
URIRecordTypeURI URIRecordType = "URI"
)
func (URIRecordType) IsKnown ¶
func (r URIRecordType) IsKnown() bool
type UpstreamIPsUnion ¶
type UpstreamIPsUnion interface {
ImplementsDNSUpstreamIPsUnion()
}
Upstream DNS Server IPv4 Address.
Union satisfied by shared.UnionString or shared.UnionString.
type UpstreamIPsUnionParam ¶
type UpstreamIPsUnionParam interface {
ImplementsDNSUpstreamIPsUnionParam()
}
Upstream DNS Server IPv4 Address.
Satisfied by shared.UnionString, shared.UnionString.