Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AnalyticsReportBytimeGetParams
- 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 CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type DNSAnalyticsNominalMetric
- type DNSAnalyticsQuery
- type DNSService
- type DNSSetting
- type DNSSettingParam
- type DNSSettingSOA
- type DNSSettingSOAParam
- type DNSSettingZoneMode
- type Delta
- type Error
- type ErrorData
- type FirewallAnalyticsReportBytimeGetParams
- 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 FirewallEditResponse
- type FirewallEditResponseEnvelope
- type FirewallEditResponseEnvelopeSuccess
- type FirewallGetParams
- type FirewallGetResponse
- type FirewallGetResponseEnvelope
- type FirewallGetResponseEnvelopeSuccess
- type FirewallIPs
- type FirewallListParams
- type FirewallListResponse
- type FirewallNewParams
- type FirewallNewResponse
- type FirewallNewResponseEnvelope
- type FirewallNewResponseEnvelopeSuccess
- type FirewallReverseDNSEditParams
- type FirewallReverseDNSEditResponse
- type FirewallReverseDNSEditResponseEnvelope
- type FirewallReverseDNSEditResponseEnvelopeSuccess
- type FirewallReverseDNSGetParams
- type FirewallReverseDNSGetResponse
- type FirewallReverseDNSGetResponseEnvelope
- type FirewallReverseDNSGetResponseEnvelopeSuccess
- type FirewallReverseDNSService
- func (r *FirewallReverseDNSService) Edit(ctx context.Context, dnsFirewallID string, params FirewallReverseDNSEditParams, ...) (res *FirewallReverseDNSEditResponse, err error)
- func (r *FirewallReverseDNSService) Get(ctx context.Context, dnsFirewallID string, query FirewallReverseDNSGetParams, ...) (res *FirewallReverseDNSGetResponse, err error)
- type FirewallService
- func (r *FirewallService) Delete(ctx context.Context, dnsFirewallID string, body FirewallDeleteParams, ...) (res *FirewallDeleteResponse, err error)
- func (r *FirewallService) Edit(ctx context.Context, dnsFirewallID string, params FirewallEditParams, ...) (res *FirewallEditResponse, err error)
- func (r *FirewallService) Get(ctx context.Context, dnsFirewallID string, query FirewallGetParams, ...) (res *FirewallGetResponse, err error)
- func (r *FirewallService) List(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[FirewallListResponse], err error)
- func (r *FirewallService) ListAutoPaging(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[FirewallListResponse]
- func (r *FirewallService) New(ctx context.Context, params FirewallNewParams, opts ...option.RequestOption) (res *FirewallNewResponse, err error)
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Nameserver
- type NameserverParam
- type NameserverType
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanParam
- type RecordDeleteParams
- type RecordDeleteResponse
- type RecordDeleteResponseEnvelope
- type RecordEditParams
- type RecordEditResponse
- type RecordEditResponseEnvelope
- type RecordEditResponseEnvelopeSuccess
- type RecordExportParams
- type RecordGetParams
- type RecordGetResponse
- type RecordGetResponseEnvelope
- type RecordGetResponseEnvelopeSuccess
- type RecordImportParams
- type RecordImportResponse
- type RecordImportResponseEnvelope
- type RecordImportResponseEnvelopeSuccess
- type RecordListParams
- type RecordListParamsComment
- type RecordListParamsMatch
- type RecordListParamsOrder
- type RecordListParamsTag
- type RecordListParamsTagMatch
- type RecordListParamsType
- type RecordListResponse
- type RecordNewParams
- type RecordNewResponse
- 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, body RecordDeleteParams, ...) (res *RecordDeleteResponse, err error)
- func (r *RecordService) Edit(ctx context.Context, dnsRecordID string, params RecordEditParams, ...) (res *RecordEditResponse, 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 *RecordGetResponse, 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[RecordListResponse], err error)
- func (r *RecordService) ListAutoPaging(ctx context.Context, params RecordListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[RecordListResponse]
- func (r *RecordService) New(ctx context.Context, params RecordNewParams, opts ...option.RequestOption) (res *RecordNewResponse, 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 *RecordUpdateResponse, err error)
- type RecordTags
- type RecordTagsParam
- type RecordUpdateParams
- type RecordUpdateResponse
- type RecordUpdateResponseEnvelope
- type RecordUpdateResponseEnvelopeSuccess
- type Report
- type ReportData
- type ReportQuery
- type ResponseInfo
- type Role
- type SettingEditParams
- type SettingEditResponse
- type SettingEditResponseEnvelope
- type SettingEditResponseEnvelopeSuccess
- type SettingGetParams
- type SettingGetResponse
- type SettingGetResponseEnvelope
- type SettingGetResponseEnvelopeSuccess
- type SettingService
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type TTL
- type UpstreamIPs
- type UpstreamIPsParam
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 CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
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.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsReportBytimeGetParams ¶
type AnalyticsReportBytimeGetParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // A comma-separated list of dimensions to group results by. Dimensions param.Field[string] `query:"dimensions"` // Segmentation filter in 'attribute operator value' format. Filters param.Field[string] `query:"filters"` // Limit number of returned metrics. Limit param.Field[int64] `query:"limit"` // A comma-separated list of metrics to query. Metrics param.Field[string] `query:"metrics"` // Start date and time of requesting data period in ISO 8601 format. Since param.Field[time.Time] `query:"since" format:"date-time"` // A comma-separated list of dimensions to sort by, where each dimension may be // prefixed by - (descending) or + (ascending). Sort param.Field[string] `query:"sort"` // Unit of time to group data by. TimeDelta param.Field[Delta] `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 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, automatically mitigate random-prefix attacks to protect upstream // DNS servers 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, automatically mitigate random-prefix attacks to protect upstream // DNS servers 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 CertificateCA ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
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 CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
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 Delta `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 DNSService ¶
type DNSService struct { Options []option.RequestOption Records *RecordService Settings *SettingService 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 DNSSetting ¶
type DNSSetting struct { // Whether to flatten all CNAME records in the zone. Note that, due to DNS // limitations, a CNAME record at the zone apex will always be flattened. FlattenAllCNAMEs bool `json:"flatten_all_cnames"` // Whether to enable Foundation DNS Advanced Nameservers on the zone. FoundationDNS bool `json:"foundation_dns"` // Whether to enable multi-provider DNS, which causes Cloudflare to activate the // zone even when non-Cloudflare NS records exist, and to respect NS records at the // zone apex during outbound zone transfers. MultiProvider bool `json:"multi_provider"` // Settings determining the nameservers through which the zone should be available. Nameservers Nameserver `json:"nameservers"` // The time to live (TTL) of the zone's nameserver (NS) records. NSTTL float64 `json:"ns_ttl"` // Allows a Secondary DNS zone to use (proxied) override records and CNAME // flattening at the zone apex. SecondaryOverrides bool `json:"secondary_overrides"` // Components of the zone's SOA record. SOA DNSSettingSOA `json:"soa"` // Whether the zone mode is a regular or CDN/DNS only zone. ZoneMode DNSSettingZoneMode `json:"zone_mode"` JSON dnsSettingJSON `json:"-"` }
func (*DNSSetting) UnmarshalJSON ¶
func (r *DNSSetting) UnmarshalJSON(data []byte) (err error)
type DNSSettingParam ¶
type DNSSettingParam struct { // Whether to flatten all CNAME records in the zone. Note that, due to DNS // limitations, a CNAME record at the zone apex will always be flattened. FlattenAllCNAMEs param.Field[bool] `json:"flatten_all_cnames"` // Whether to enable Foundation DNS Advanced Nameservers on the zone. FoundationDNS param.Field[bool] `json:"foundation_dns"` // Whether to enable multi-provider DNS, which causes Cloudflare to activate the // zone even when non-Cloudflare NS records exist, and to respect NS records at the // zone apex during outbound zone transfers. MultiProvider param.Field[bool] `json:"multi_provider"` // Settings determining the nameservers through which the zone should be available. Nameservers param.Field[NameserverParam] `json:"nameservers"` // The time to live (TTL) of the zone's nameserver (NS) records. NSTTL param.Field[float64] `json:"ns_ttl"` // Allows a Secondary DNS zone to use (proxied) override records and CNAME // flattening at the zone apex. SecondaryOverrides param.Field[bool] `json:"secondary_overrides"` // Components of the zone's SOA record. SOA param.Field[DNSSettingSOAParam] `json:"soa"` // Whether the zone mode is a regular or CDN/DNS only zone. ZoneMode param.Field[DNSSettingZoneMode] `json:"zone_mode"` }
func (DNSSettingParam) MarshalJSON ¶
func (r DNSSettingParam) MarshalJSON() (data []byte, err error)
type DNSSettingSOA ¶
type DNSSettingSOA struct { // Time in seconds of being unable to query the primary server after which // secondary servers should stop serving the zone. Expire float64 `json:"expire,required"` // The time to live (TTL) for negative caching of records within the zone. MinTTL float64 `json:"min_ttl,required"` // The primary nameserver, which may be used for outbound zone transfers. MNAME string `json:"mname,required"` // Time in seconds after which secondary servers should re-check the SOA record to // see if the zone has been updated. Refresh float64 `json:"refresh,required"` // Time in seconds after which secondary servers should retry queries after the // primary server was unresponsive. Retry float64 `json:"retry,required"` // The email address of the zone administrator, with the first label representing // the local part of the email address. RNAME string `json:"rname,required"` // The time to live (TTL) of the SOA record itself. TTL float64 `json:"ttl,required"` JSON dnsSettingSOAJSON `json:"-"` }
Components of the zone's SOA record.
func (*DNSSettingSOA) UnmarshalJSON ¶
func (r *DNSSettingSOA) UnmarshalJSON(data []byte) (err error)
type DNSSettingSOAParam ¶
type DNSSettingSOAParam struct { // Time in seconds of being unable to query the primary server after which // secondary servers should stop serving the zone. Expire param.Field[float64] `json:"expire,required"` // The time to live (TTL) for negative caching of records within the zone. MinTTL param.Field[float64] `json:"min_ttl,required"` // The primary nameserver, which may be used for outbound zone transfers. MNAME param.Field[string] `json:"mname,required"` // Time in seconds after which secondary servers should re-check the SOA record to // see if the zone has been updated. Refresh param.Field[float64] `json:"refresh,required"` // Time in seconds after which secondary servers should retry queries after the // primary server was unresponsive. Retry param.Field[float64] `json:"retry,required"` // The email address of the zone administrator, with the first label representing // the local part of the email address. RNAME param.Field[string] `json:"rname,required"` // The time to live (TTL) of the SOA record itself. TTL param.Field[float64] `json:"ttl,required"` }
Components of the zone's SOA record.
func (DNSSettingSOAParam) MarshalJSON ¶
func (r DNSSettingSOAParam) MarshalJSON() (data []byte, err error)
type DNSSettingZoneMode ¶
type DNSSettingZoneMode string
Whether the zone mode is a regular or CDN/DNS only zone.
const ( DNSSettingZoneModeStandard DNSSettingZoneMode = "standard" DNSSettingZoneModeCDNOnly DNSSettingZoneMode = "cdn_only" DNSSettingZoneModeDNSOnly DNSSettingZoneMode = "dns_only" )
func (DNSSettingZoneMode) IsKnown ¶
func (r DNSSettingZoneMode) IsKnown() bool
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[Delta] `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 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 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"` // Whether the API call was successful Success FirewallDeleteResponseEnvelopeSuccess `json:"success,required"` Result FirewallDeleteResponse `json:"result"` 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"` // Attack mitigation settings AttackMitigation param.Field[AttackMitigationParam] `json:"attack_mitigation"` // Whether to refuse to answer queries for the ANY type DeprecateAnyRequests param.Field[bool] `json:"deprecate_any_requests"` // Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent ECSFallback param.Field[bool] `json:"ecs_fallback"` // Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Higher TTLs will be // decreased to the maximum defined here for caching purposes. MaximumCacheTTL param.Field[float64] `json:"maximum_cache_ttl"` // Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Lower TTLs will be // increased to the minimum defined here for caching purposes. MinimumCacheTTL param.Field[float64] `json:"minimum_cache_ttl"` // DNS Firewall cluster name Name param.Field[string] `json:"name"` // Negative DNS cache TTL This setting controls how long DNS Firewall should cache // negative responses (e.g., NXDOMAIN) from the upstream servers. 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"` UpstreamIPs param.Field[[]UpstreamIPsParam] `json:"upstream_ips" format:"ipv4"` }
func (FirewallEditParams) MarshalJSON ¶
func (r FirewallEditParams) MarshalJSON() (data []byte, err error)
type FirewallEditResponse ¶
type FirewallEditResponse struct { // Identifier ID string `json:"id,required"` // Whether to refuse to answer queries for the ANY type DeprecateAnyRequests bool `json:"deprecate_any_requests,required"` DNSFirewallIPs []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"` // Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent ECSFallback bool `json:"ecs_fallback,required"` // Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Higher TTLs will be // decreased to the maximum defined here for caching purposes. MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"` // Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Lower TTLs will be // increased to the minimum defined here for caching purposes. 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"` // Negative DNS cache TTL This setting controls how long DNS Firewall should cache // negative responses (e.g., NXDOMAIN) from the upstream servers. NegativeCacheTTL float64 `json:"negative_cache_ttl,required,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,required,nullable"` // Number of retries for fetching DNS responses from upstream nameservers (not // counting the initial attempt) Retries float64 `json:"retries,required"` UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings AttackMitigation AttackMitigation `json:"attack_mitigation,nullable"` JSON firewallEditResponseJSON `json:"-"` }
func (*FirewallEditResponse) UnmarshalJSON ¶
func (r *FirewallEditResponse) UnmarshalJSON(data []byte) (err error)
type FirewallEditResponseEnvelope ¶
type FirewallEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FirewallEditResponseEnvelopeSuccess `json:"success,required"` Result FirewallEditResponse `json:"result"` 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 FirewallGetResponse ¶
type FirewallGetResponse struct { // Identifier ID string `json:"id,required"` // Whether to refuse to answer queries for the ANY type DeprecateAnyRequests bool `json:"deprecate_any_requests,required"` DNSFirewallIPs []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"` // Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent ECSFallback bool `json:"ecs_fallback,required"` // Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Higher TTLs will be // decreased to the maximum defined here for caching purposes. MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"` // Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Lower TTLs will be // increased to the minimum defined here for caching purposes. 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"` // Negative DNS cache TTL This setting controls how long DNS Firewall should cache // negative responses (e.g., NXDOMAIN) from the upstream servers. NegativeCacheTTL float64 `json:"negative_cache_ttl,required,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,required,nullable"` // Number of retries for fetching DNS responses from upstream nameservers (not // counting the initial attempt) Retries float64 `json:"retries,required"` UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings AttackMitigation AttackMitigation `json:"attack_mitigation,nullable"` JSON firewallGetResponseJSON `json:"-"` }
func (*FirewallGetResponse) UnmarshalJSON ¶
func (r *FirewallGetResponse) UnmarshalJSON(data []byte) (err error)
type FirewallGetResponseEnvelope ¶
type FirewallGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FirewallGetResponseEnvelopeSuccess `json:"success,required"` Result FirewallGetResponse `json:"result"` 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 FirewallIPs ¶
type FirewallIPs = string
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 FirewallListResponse ¶
type FirewallListResponse struct { // Identifier ID string `json:"id,required"` // Whether to refuse to answer queries for the ANY type DeprecateAnyRequests bool `json:"deprecate_any_requests,required"` DNSFirewallIPs []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"` // Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent ECSFallback bool `json:"ecs_fallback,required"` // Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Higher TTLs will be // decreased to the maximum defined here for caching purposes. MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"` // Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Lower TTLs will be // increased to the minimum defined here for caching purposes. 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"` // Negative DNS cache TTL This setting controls how long DNS Firewall should cache // negative responses (e.g., NXDOMAIN) from the upstream servers. NegativeCacheTTL float64 `json:"negative_cache_ttl,required,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,required,nullable"` // Number of retries for fetching DNS responses from upstream nameservers (not // counting the initial attempt) Retries float64 `json:"retries,required"` UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings AttackMitigation AttackMitigation `json:"attack_mitigation,nullable"` JSON firewallListResponseJSON `json:"-"` }
func (*FirewallListResponse) UnmarshalJSON ¶
func (r *FirewallListResponse) UnmarshalJSON(data []byte) (err error)
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[[]UpstreamIPsParam] `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings AttackMitigation param.Field[AttackMitigationParam] `json:"attack_mitigation"` // Whether to refuse to answer queries for the ANY type DeprecateAnyRequests param.Field[bool] `json:"deprecate_any_requests"` // Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent ECSFallback param.Field[bool] `json:"ecs_fallback"` // Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Higher TTLs will be // decreased to the maximum defined here for caching purposes. MaximumCacheTTL param.Field[float64] `json:"maximum_cache_ttl"` // Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Lower TTLs will be // increased to the minimum defined here for caching purposes. MinimumCacheTTL param.Field[float64] `json:"minimum_cache_ttl"` // Negative DNS cache TTL This setting controls how long DNS Firewall should cache // negative responses (e.g., NXDOMAIN) from the upstream servers. 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 FirewallNewResponse ¶
type FirewallNewResponse struct { // Identifier ID string `json:"id,required"` // Whether to refuse to answer queries for the ANY type DeprecateAnyRequests bool `json:"deprecate_any_requests,required"` DNSFirewallIPs []FirewallIPs `json:"dns_firewall_ips,required" format:"ipv4"` // Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent ECSFallback bool `json:"ecs_fallback,required"` // Maximum DNS cache TTL This setting sets an upper bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Higher TTLs will be // decreased to the maximum defined here for caching purposes. MaximumCacheTTL float64 `json:"maximum_cache_ttl,required"` // Minimum DNS cache TTL This setting sets a lower bound on DNS TTLs for purposes // of caching between DNS Firewall and the upstream servers. Lower TTLs will be // increased to the minimum defined here for caching purposes. 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"` // Negative DNS cache TTL This setting controls how long DNS Firewall should cache // negative responses (e.g., NXDOMAIN) from the upstream servers. NegativeCacheTTL float64 `json:"negative_cache_ttl,required,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,required,nullable"` // Number of retries for fetching DNS responses from upstream nameservers (not // counting the initial attempt) Retries float64 `json:"retries,required"` UpstreamIPs []UpstreamIPs `json:"upstream_ips,required" format:"ipv4"` // Attack mitigation settings AttackMitigation AttackMitigation `json:"attack_mitigation,nullable"` JSON firewallNewResponseJSON `json:"-"` }
func (*FirewallNewResponse) UnmarshalJSON ¶
func (r *FirewallNewResponse) UnmarshalJSON(data []byte) (err error)
type FirewallNewResponseEnvelope ¶
type FirewallNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FirewallNewResponseEnvelopeSuccess `json:"success,required"` Result FirewallNewResponse `json:"result"` 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 FirewallReverseDNSEditParams ¶
type FirewallReverseDNSEditParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` // Map of cluster IP addresses to PTR record contents PTR param.Field[map[string]string] `json:"ptr"` }
func (FirewallReverseDNSEditParams) MarshalJSON ¶
func (r FirewallReverseDNSEditParams) MarshalJSON() (data []byte, err error)
type FirewallReverseDNSEditResponse ¶
type FirewallReverseDNSEditResponse struct { // Map of cluster IP addresses to PTR record contents PTR map[string]string `json:"ptr,required"` JSON firewallReverseDNSEditResponseJSON `json:"-"` }
func (*FirewallReverseDNSEditResponse) UnmarshalJSON ¶
func (r *FirewallReverseDNSEditResponse) UnmarshalJSON(data []byte) (err error)
type FirewallReverseDNSEditResponseEnvelope ¶
type FirewallReverseDNSEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FirewallReverseDNSEditResponseEnvelopeSuccess `json:"success,required"` Result FirewallReverseDNSEditResponse `json:"result"` JSON firewallReverseDNSEditResponseEnvelopeJSON `json:"-"` }
func (*FirewallReverseDNSEditResponseEnvelope) UnmarshalJSON ¶
func (r *FirewallReverseDNSEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FirewallReverseDNSEditResponseEnvelopeSuccess ¶
type FirewallReverseDNSEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallReverseDNSEditResponseEnvelopeSuccessTrue FirewallReverseDNSEditResponseEnvelopeSuccess = true
)
func (FirewallReverseDNSEditResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallReverseDNSEditResponseEnvelopeSuccess) IsKnown() bool
type FirewallReverseDNSGetResponse ¶
type FirewallReverseDNSGetResponse struct { // Map of cluster IP addresses to PTR record contents PTR map[string]string `json:"ptr,required"` JSON firewallReverseDNSGetResponseJSON `json:"-"` }
func (*FirewallReverseDNSGetResponse) UnmarshalJSON ¶
func (r *FirewallReverseDNSGetResponse) UnmarshalJSON(data []byte) (err error)
type FirewallReverseDNSGetResponseEnvelope ¶
type FirewallReverseDNSGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success FirewallReverseDNSGetResponseEnvelopeSuccess `json:"success,required"` Result FirewallReverseDNSGetResponse `json:"result"` JSON firewallReverseDNSGetResponseEnvelopeJSON `json:"-"` }
func (*FirewallReverseDNSGetResponseEnvelope) UnmarshalJSON ¶
func (r *FirewallReverseDNSGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FirewallReverseDNSGetResponseEnvelopeSuccess ¶
type FirewallReverseDNSGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallReverseDNSGetResponseEnvelopeSuccessTrue FirewallReverseDNSGetResponseEnvelopeSuccess = true
)
func (FirewallReverseDNSGetResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallReverseDNSGetResponseEnvelopeSuccess) IsKnown() bool
type FirewallReverseDNSService ¶
type FirewallReverseDNSService struct {
Options []option.RequestOption
}
FirewallReverseDNSService 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 NewFirewallReverseDNSService method instead.
func NewFirewallReverseDNSService ¶
func NewFirewallReverseDNSService(opts ...option.RequestOption) (r *FirewallReverseDNSService)
NewFirewallReverseDNSService 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 (*FirewallReverseDNSService) Edit ¶
func (r *FirewallReverseDNSService) Edit(ctx context.Context, dnsFirewallID string, params FirewallReverseDNSEditParams, opts ...option.RequestOption) (res *FirewallReverseDNSEditResponse, err error)
Update reverse DNS configuration (PTR records) for a DNS Firewall cluster
func (*FirewallReverseDNSService) Get ¶
func (r *FirewallReverseDNSService) Get(ctx context.Context, dnsFirewallID string, query FirewallReverseDNSGetParams, opts ...option.RequestOption) (res *FirewallReverseDNSGetResponse, err error)
Show reverse DNS configuration (PTR records) for a DNS Firewall cluster
type FirewallService ¶
type FirewallService struct { Options []option.RequestOption Analytics *FirewallAnalyticsService ReverseDNS *FirewallReverseDNSService }
FirewallService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFirewallService method instead.
func NewFirewallService ¶
func NewFirewallService(opts ...option.RequestOption) (r *FirewallService)
NewFirewallService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FirewallService) Delete ¶
func (r *FirewallService) Delete(ctx context.Context, dnsFirewallID string, body FirewallDeleteParams, opts ...option.RequestOption) (res *FirewallDeleteResponse, err error)
Delete a DNS Firewall cluster
func (*FirewallService) Edit ¶
func (r *FirewallService) Edit(ctx context.Context, dnsFirewallID string, params FirewallEditParams, opts ...option.RequestOption) (res *FirewallEditResponse, err error)
Modify the configuration of a DNS Firewall cluster
func (*FirewallService) Get ¶
func (r *FirewallService) Get(ctx context.Context, dnsFirewallID string, query FirewallGetParams, opts ...option.RequestOption) (res *FirewallGetResponse, err error)
Show a single DNS Firewall cluster for an account
func (*FirewallService) List ¶
func (r *FirewallService) List(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[FirewallListResponse], err error)
List DNS Firewall clusters for an account
func (*FirewallService) ListAutoPaging ¶
func (r *FirewallService) ListAutoPaging(ctx context.Context, params FirewallListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[FirewallListResponse]
List DNS Firewall clusters for an account
func (*FirewallService) New ¶
func (r *FirewallService) New(ctx context.Context, params FirewallNewParams, opts ...option.RequestOption) (res *FirewallNewResponse, err error)
Create a DNS Firewall cluster
type MemberRoleParam ¶
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type Nameserver ¶
type Nameserver struct { // Nameserver type Type NameserverType `json:"type,required"` JSON nameserverJSON `json:"-"` }
Settings determining the nameservers through which the zone should be available.
func (*Nameserver) UnmarshalJSON ¶
func (r *Nameserver) UnmarshalJSON(data []byte) (err error)
type NameserverParam ¶
type NameserverParam struct { // Nameserver type Type param.Field[NameserverType] `json:"type,required"` }
Settings determining the nameservers through which the zone should be available.
func (NameserverParam) MarshalJSON ¶
func (r NameserverParam) MarshalJSON() (data []byte, err error)
type NameserverType ¶
type NameserverType string
Nameserver type
const ( NameserverTypeCloudflareStandard NameserverType = "cloudflare.standard" NameserverTypeCloudflareStandardRandom NameserverType = "cloudflare.standard.random" NameserverTypeCustomAccount NameserverType = "custom.account" NameserverTypeCustomTenant NameserverType = "custom.tenant" NameserverTypeCustomZone NameserverType = "custom.zone" )
func (NameserverType) IsKnown ¶
func (r NameserverType) 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 RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type RecordDeleteParams ¶
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 RecordParam `json:"record,required"` }
func (RecordEditParams) MarshalJSON ¶
func (r RecordEditParams) MarshalJSON() (data []byte, err error)
type RecordEditResponse ¶
type RecordEditResponse struct { // Identifier ID string `json:"id,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment string `json:"comment,required"` // When the record was created. CreatedOn time.Time `json:"created_on,required" format:"date-time"` // Extra Cloudflare-specific information about the record. Meta interface{} `json:"meta,required"` // When the record was last modified. ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Whether the record can be proxied by Cloudflare or not. Proxiable bool `json:"proxiable,required"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied bool `json:"proxied,required"` // Settings for the DNS record. Settings interface{} `json:"settings,required"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags []RecordTags `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 TTL `json:"ttl,required"` // When the record comment was last modified. Omitted if there is no comment. CommentModifiedOn time.Time `json:"comment_modified_on" format:"date-time"` // When the record tags were last modified. Omitted if there are no tags. TagsModifiedOn time.Time `json:"tags_modified_on" format:"date-time"` JSON recordEditResponseJSON `json:"-"` }
func (*RecordEditResponse) UnmarshalJSON ¶
func (r *RecordEditResponse) UnmarshalJSON(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 RecordEditResponse `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 RecordGetResponse ¶
type RecordGetResponse struct { // Identifier ID string `json:"id,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment string `json:"comment,required"` // When the record was created. CreatedOn time.Time `json:"created_on,required" format:"date-time"` // Extra Cloudflare-specific information about the record. Meta interface{} `json:"meta,required"` // When the record was last modified. ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Whether the record can be proxied by Cloudflare or not. Proxiable bool `json:"proxiable,required"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied bool `json:"proxied,required"` // Settings for the DNS record. Settings interface{} `json:"settings,required"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags []RecordTags `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 TTL `json:"ttl,required"` // When the record comment was last modified. Omitted if there is no comment. CommentModifiedOn time.Time `json:"comment_modified_on" format:"date-time"` // When the record tags were last modified. Omitted if there are no tags. TagsModifiedOn time.Time `json:"tags_modified_on" format:"date-time"` JSON recordGetResponseJSON `json:"-"` }
func (*RecordGetResponse) UnmarshalJSON ¶
func (r *RecordGetResponse) UnmarshalJSON(data []byte) (err error)
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 RecordGetResponse `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) MarshalMultipart ¶
func (r RecordImportParams) MarshalMultipart() (data []byte, contentType string, 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[shared.SortDirection] `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 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" RecordListParamsTypeOpenpgpkey RecordListParamsType = "OPENPGPKEY" 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 RecordListResponse ¶
type RecordListResponse struct { // Identifier ID string `json:"id,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment string `json:"comment,required"` // When the record was created. CreatedOn time.Time `json:"created_on,required" format:"date-time"` // Extra Cloudflare-specific information about the record. Meta interface{} `json:"meta,required"` // When the record was last modified. ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Whether the record can be proxied by Cloudflare or not. Proxiable bool `json:"proxiable,required"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied bool `json:"proxied,required"` // Settings for the DNS record. Settings interface{} `json:"settings,required"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags []RecordTags `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 TTL `json:"ttl,required"` // When the record comment was last modified. Omitted if there is no comment. CommentModifiedOn time.Time `json:"comment_modified_on" format:"date-time"` // When the record tags were last modified. Omitted if there are no tags. TagsModifiedOn time.Time `json:"tags_modified_on" format:"date-time"` JSON recordListResponseJSON `json:"-"` }
func (*RecordListResponse) UnmarshalJSON ¶
func (r *RecordListResponse) UnmarshalJSON(data []byte) (err error)
type RecordNewParams ¶
type RecordNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Record RecordParam `json:"record,required"` }
func (RecordNewParams) MarshalJSON ¶
func (r RecordNewParams) MarshalJSON() (data []byte, err error)
type RecordNewResponse ¶
type RecordNewResponse struct { // Identifier ID string `json:"id,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment string `json:"comment,required"` // When the record was created. CreatedOn time.Time `json:"created_on,required" format:"date-time"` // Extra Cloudflare-specific information about the record. Meta interface{} `json:"meta,required"` // When the record was last modified. ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Whether the record can be proxied by Cloudflare or not. Proxiable bool `json:"proxiable,required"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied bool `json:"proxied,required"` // Settings for the DNS record. Settings interface{} `json:"settings,required"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags []RecordTags `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 TTL `json:"ttl,required"` // When the record comment was last modified. Omitted if there is no comment. CommentModifiedOn time.Time `json:"comment_modified_on" format:"date-time"` // When the record tags were last modified. Omitted if there are no tags. TagsModifiedOn time.Time `json:"tags_modified_on" format:"date-time"` JSON recordNewResponseJSON `json:"-"` }
func (*RecordNewResponse) UnmarshalJSON ¶
func (r *RecordNewResponse) UnmarshalJSON(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 RecordNewResponse `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 { // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment param.Field[string] `json:"comment"` // DNS record name (or @ for the zone apex) in Punycode. Name param.Field[string] `json:"name"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied param.Field[bool] `json:"proxied"` // Settings for the DNS record. Settings param.Field[interface{}] `json:"settings"` // 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[TTL] `json:"ttl"` }
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, body RecordDeleteParams, opts ...option.RequestOption) (res *RecordDeleteResponse, err error)
Delete DNS Record
func (*RecordService) Edit ¶
func (r *RecordService) Edit(ctx context.Context, dnsRecordID string, params RecordEditParams, opts ...option.RequestOption) (res *RecordEditResponse, 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 *RecordGetResponse, 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[RecordListResponse], 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[RecordListResponse]
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 *RecordNewResponse, 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 *RecordUpdateResponse, 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 RecordUpdateParams ¶
type RecordUpdateParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Record RecordParam `json:"record,required"` }
func (RecordUpdateParams) MarshalJSON ¶
func (r RecordUpdateParams) MarshalJSON() (data []byte, err error)
type RecordUpdateResponse ¶
type RecordUpdateResponse struct { // Identifier ID string `json:"id,required"` // Comments or notes about the DNS record. This field has no effect on DNS // responses. Comment string `json:"comment,required"` // When the record was created. CreatedOn time.Time `json:"created_on,required" format:"date-time"` // Extra Cloudflare-specific information about the record. Meta interface{} `json:"meta,required"` // When the record was last modified. ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // DNS record name (or @ for the zone apex) in Punycode. Name string `json:"name,required"` // Whether the record can be proxied by Cloudflare or not. Proxiable bool `json:"proxiable,required"` // Whether the record is receiving the performance and security benefits of // Cloudflare. Proxied bool `json:"proxied,required"` // Settings for the DNS record. Settings interface{} `json:"settings,required"` // Custom tags for the DNS record. This field has no effect on DNS responses. Tags []RecordTags `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 TTL `json:"ttl,required"` // When the record comment was last modified. Omitted if there is no comment. CommentModifiedOn time.Time `json:"comment_modified_on" format:"date-time"` // When the record tags were last modified. Omitted if there are no tags. TagsModifiedOn time.Time `json:"tags_modified_on" format:"date-time"` JSON recordUpdateResponseJSON `json:"-"` }
func (*RecordUpdateResponse) UnmarshalJSON ¶
func (r *RecordUpdateResponse) UnmarshalJSON(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 RecordUpdateResponse `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 SettingEditParams ¶
type SettingEditParams struct { // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` ZoneDefaults param.Field[DNSSettingParam] `json:"zone_defaults"` }
func (SettingEditParams) MarshalJSON ¶
func (r SettingEditParams) MarshalJSON() (data []byte, err error)
type SettingEditResponse ¶
type SettingEditResponse struct { ZoneDefaults DNSSetting `json:"zone_defaults"` JSON settingEditResponseJSON `json:"-"` }
func (*SettingEditResponse) UnmarshalJSON ¶
func (r *SettingEditResponse) UnmarshalJSON(data []byte) (err error)
type SettingEditResponseEnvelope ¶
type SettingEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success SettingEditResponseEnvelopeSuccess `json:"success,required"` Result SettingEditResponse `json:"result"` JSON settingEditResponseEnvelopeJSON `json:"-"` }
func (*SettingEditResponseEnvelope) UnmarshalJSON ¶
func (r *SettingEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SettingEditResponseEnvelopeSuccess ¶
type SettingEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SettingEditResponseEnvelopeSuccessTrue SettingEditResponseEnvelopeSuccess = true
)
func (SettingEditResponseEnvelopeSuccess) IsKnown ¶
func (r SettingEditResponseEnvelopeSuccess) IsKnown() bool
type SettingGetParams ¶
type SettingGetResponse ¶
type SettingGetResponse struct { ZoneDefaults DNSSetting `json:"zone_defaults"` JSON settingGetResponseJSON `json:"-"` }
func (*SettingGetResponse) UnmarshalJSON ¶
func (r *SettingGetResponse) UnmarshalJSON(data []byte) (err error)
type SettingGetResponseEnvelope ¶
type SettingGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success SettingGetResponseEnvelopeSuccess `json:"success,required"` Result SettingGetResponse `json:"result"` JSON settingGetResponseEnvelopeJSON `json:"-"` }
func (*SettingGetResponseEnvelope) UnmarshalJSON ¶
func (r *SettingGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SettingGetResponseEnvelopeSuccess ¶
type SettingGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SettingGetResponseEnvelopeSuccessTrue SettingGetResponseEnvelopeSuccess = true
)
func (SettingGetResponseEnvelopeSuccess) IsKnown ¶
func (r SettingGetResponseEnvelopeSuccess) IsKnown() bool
type SettingService ¶
type SettingService struct {
Options []option.RequestOption
}
SettingService 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 NewSettingService method instead.
func NewSettingService ¶
func NewSettingService(opts ...option.RequestOption) (r *SettingService)
NewSettingService 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 (*SettingService) Edit ¶
func (r *SettingService) Edit(ctx context.Context, params SettingEditParams, opts ...option.RequestOption) (res *SettingEditResponse, err error)
Update DNS settings for an account or zone
func (*SettingService) Get ¶
func (r *SettingService) Get(ctx context.Context, query SettingGetParams, opts ...option.RequestOption) (res *SettingGetResponse, err error)
Show DNS settings for an account or zone
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type UpstreamIPs ¶
type UpstreamIPs = string
type UpstreamIPsParam ¶
type UpstreamIPsParam = string