Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type DatasetFieldGetParams
- type DatasetFieldGetParamsDatasetID
- type DatasetFieldGetResponse
- type DatasetFieldGetResponseEnvelope
- type DatasetFieldGetResponseEnvelopeErrors
- type DatasetFieldGetResponseEnvelopeErrorsSource
- type DatasetFieldGetResponseEnvelopeMessages
- type DatasetFieldGetResponseEnvelopeMessagesSource
- type DatasetFieldGetResponseEnvelopeSuccess
- type DatasetFieldService
- type DatasetJobGetParams
- type DatasetJobGetParamsDatasetID
- type DatasetJobService
- func (r *DatasetJobService) Get(ctx context.Context, datasetID DatasetJobGetParamsDatasetID, ...) (res *pagination.SinglePage[LogpushJob], err error)
- func (r *DatasetJobService) GetAutoPaging(ctx context.Context, datasetID DatasetJobGetParamsDatasetID, ...) *pagination.SinglePageAutoPager[LogpushJob]
- type DatasetService
- type EdgeGetParams
- type EdgeNewParams
- type EdgeNewResponseEnvelope
- type EdgeNewResponseEnvelopeErrors
- type EdgeNewResponseEnvelopeErrorsSource
- type EdgeNewResponseEnvelopeMessages
- type EdgeNewResponseEnvelopeMessagesSource
- type EdgeNewResponseEnvelopeSuccess
- type EdgeService
- func (r *EdgeService) Get(ctx context.Context, query EdgeGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[InstantLogpushJob], err error)
- func (r *EdgeService) GetAutoPaging(ctx context.Context, query EdgeGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InstantLogpushJob]
- func (r *EdgeService) New(ctx context.Context, params EdgeNewParams, opts ...option.RequestOption) (res *InstantLogpushJob, err error)
- type Error
- type ErrorData
- type ErrorDataSource
- type InstantLogpushJob
- type JobDeleteParams
- type JobDeleteResponse
- type JobDeleteResponseEnvelope
- type JobDeleteResponseEnvelopeErrors
- type JobDeleteResponseEnvelopeErrorsSource
- type JobDeleteResponseEnvelopeMessages
- type JobDeleteResponseEnvelopeMessagesSource
- type JobDeleteResponseEnvelopeSuccess
- type JobGetParams
- type JobGetResponseEnvelope
- type JobGetResponseEnvelopeErrors
- type JobGetResponseEnvelopeErrorsSource
- type JobGetResponseEnvelopeMessages
- type JobGetResponseEnvelopeMessagesSource
- type JobGetResponseEnvelopeSuccess
- type JobListParams
- type JobNewParams
- type JobNewParamsDataset
- type JobNewParamsFrequency
- type JobNewParamsKind
- type JobNewParamsMaxUploadBytes
- type JobNewParamsMaxUploadIntervalSeconds
- type JobNewParamsMaxUploadRecords
- type JobNewResponseEnvelope
- type JobNewResponseEnvelopeErrors
- type JobNewResponseEnvelopeErrorsSource
- type JobNewResponseEnvelopeMessages
- type JobNewResponseEnvelopeMessagesSource
- type JobNewResponseEnvelopeSuccess
- type JobService
- func (r *JobService) Delete(ctx context.Context, jobID int64, body JobDeleteParams, ...) (res *JobDeleteResponse, err error)
- func (r *JobService) Get(ctx context.Context, jobID int64, query JobGetParams, ...) (res *LogpushJob, err error)
- func (r *JobService) List(ctx context.Context, query JobListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LogpushJob], err error)
- func (r *JobService) ListAutoPaging(ctx context.Context, query JobListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LogpushJob]
- func (r *JobService) New(ctx context.Context, params JobNewParams, opts ...option.RequestOption) (res *LogpushJob, err error)
- func (r *JobService) Update(ctx context.Context, jobID int64, params JobUpdateParams, ...) (res *LogpushJob, err error)
- type JobUpdateParams
- type JobUpdateParamsFrequency
- type JobUpdateParamsKind
- type JobUpdateParamsMaxUploadBytes
- type JobUpdateParamsMaxUploadIntervalSeconds
- type JobUpdateParamsMaxUploadRecords
- type JobUpdateResponseEnvelope
- type JobUpdateResponseEnvelopeErrors
- type JobUpdateResponseEnvelopeErrorsSource
- type JobUpdateResponseEnvelopeMessages
- type JobUpdateResponseEnvelopeMessagesSource
- type JobUpdateResponseEnvelopeSuccess
- type LogpushJob
- type LogpushJobDataset
- type LogpushJobFrequency
- type LogpushJobKind
- type LogpushJobMaxUploadBytes
- type LogpushJobMaxUploadIntervalSeconds
- type LogpushJobMaxUploadRecords
- type LogpushService
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type OutputOptions
- type OutputOptionsOutputType
- type OutputOptionsParam
- type OutputOptionsTimestampFormat
- type OwnershipNewParams
- type OwnershipNewResponse
- type OwnershipNewResponseEnvelope
- type OwnershipNewResponseEnvelopeErrors
- type OwnershipNewResponseEnvelopeErrorsSource
- type OwnershipNewResponseEnvelopeMessages
- type OwnershipNewResponseEnvelopeMessagesSource
- type OwnershipNewResponseEnvelopeSuccess
- type OwnershipService
- type OwnershipValidateParams
- type OwnershipValidateResponseEnvelope
- type OwnershipValidateResponseEnvelopeErrors
- type OwnershipValidateResponseEnvelopeErrorsSource
- type OwnershipValidateResponseEnvelopeMessages
- type OwnershipValidateResponseEnvelopeMessagesSource
- type OwnershipValidateResponseEnvelopeSuccess
- type OwnershipValidation
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesIAMResourcesTypeObjectNested
- type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
- type TokenPolicyResourcesIAMResourcesTypeObjectString
- type TokenPolicyResourcesIAMResourcesTypeObjectStringParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
- type TransformerContentGetParams
- type TransformerContentGetResponse
- type TransformerContentGetResponseEnvelope
- type TransformerContentGetResponseEnvelopeErrors
- type TransformerContentGetResponseEnvelopeErrorsSource
- type TransformerContentGetResponseEnvelopeMessages
- type TransformerContentGetResponseEnvelopeMessagesSource
- type TransformerContentGetResponseEnvelopeSuccess
- type TransformerContentService
- type TransformerDeleteParams
- type TransformerDeleteResponse
- type TransformerDeleteResponseEnvelope
- type TransformerDeleteResponseEnvelopeErrors
- type TransformerDeleteResponseEnvelopeErrorsSource
- type TransformerDeleteResponseEnvelopeMessages
- type TransformerDeleteResponseEnvelopeMessagesSource
- type TransformerDeleteResponseEnvelopeSuccess
- type TransformerGetParams
- type TransformerGetResponse
- type TransformerGetResponseAssociatedJob
- type TransformerGetResponseAssociatedJobsObjectType
- type TransformerGetResponseEnvelope
- type TransformerGetResponseEnvelopeErrors
- type TransformerGetResponseEnvelopeErrorsSource
- type TransformerGetResponseEnvelopeMessages
- type TransformerGetResponseEnvelopeMessagesSource
- type TransformerGetResponseEnvelopeSuccess
- type TransformerListParams
- type TransformerListResponse
- type TransformerListResponseAssociatedJob
- type TransformerListResponseAssociatedJobsObjectType
- type TransformerNewParams
- type TransformerNewResponse
- type TransformerNewResponseAssociatedJob
- type TransformerNewResponseAssociatedJobsObjectType
- type TransformerNewResponseEnvelope
- type TransformerNewResponseEnvelopeErrors
- type TransformerNewResponseEnvelopeErrorsSource
- type TransformerNewResponseEnvelopeMessages
- type TransformerNewResponseEnvelopeMessagesSource
- type TransformerNewResponseEnvelopeSuccess
- type TransformerPreviewParams
- type TransformerPreviewResponse
- type TransformerService
- func (r *TransformerService) Delete(ctx context.Context, transformerID int64, body TransformerDeleteParams, ...) (res *TransformerDeleteResponse, err error)
- func (r *TransformerService) Get(ctx context.Context, transformerID int64, query TransformerGetParams, ...) (res *TransformerGetResponse, err error)
- func (r *TransformerService) List(ctx context.Context, query TransformerListParams, opts ...option.RequestOption) (res *pagination.SinglePage[TransformerListResponse], err error)
- func (r *TransformerService) ListAutoPaging(ctx context.Context, query TransformerListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TransformerListResponse]
- func (r *TransformerService) New(ctx context.Context, params TransformerNewParams, opts ...option.RequestOption) (res *TransformerNewResponse, err error)
- func (r *TransformerService) Preview(ctx context.Context, params TransformerPreviewParams, ...) (res *pagination.SinglePage[TransformerPreviewResponse], err error)
- func (r *TransformerService) PreviewAutoPaging(ctx context.Context, params TransformerPreviewParams, ...) *pagination.SinglePageAutoPager[TransformerPreviewResponse]
- func (r *TransformerService) Update(ctx context.Context, transformerID int64, params TransformerUpdateParams, ...) (res *TransformerUpdateResponse, err error)
- type TransformerUpdateParams
- type TransformerUpdateResponse
- type TransformerUpdateResponseAssociatedJob
- type TransformerUpdateResponseAssociatedJobsObjectType
- type TransformerUpdateResponseEnvelope
- type TransformerUpdateResponseEnvelopeErrors
- type TransformerUpdateResponseEnvelopeErrorsSource
- type TransformerUpdateResponseEnvelopeMessages
- type TransformerUpdateResponseEnvelopeMessagesSource
- type TransformerUpdateResponseEnvelopeSuccess
- type TransformerVersionListParams
- type TransformerVersionListResponse
- type TransformerVersionService
- func (r *TransformerVersionService) List(ctx context.Context, transformerID int64, params TransformerVersionListParams, ...) (res *pagination.SinglePage[TransformerVersionListResponse], err error)
- func (r *TransformerVersionService) ListAutoPaging(ctx context.Context, transformerID int64, params TransformerVersionListParams, ...) *pagination.SinglePageAutoPager[TransformerVersionListResponse]
- type ValidateDestinationExistsParams
- type ValidateDestinationExistsResponse
- type ValidateDestinationExistsResponseEnvelope
- type ValidateDestinationExistsResponseEnvelopeErrors
- type ValidateDestinationExistsResponseEnvelopeErrorsSource
- type ValidateDestinationExistsResponseEnvelopeMessages
- type ValidateDestinationExistsResponseEnvelopeMessagesSource
- type ValidateDestinationExistsResponseEnvelopeSuccess
- type ValidateDestinationParams
- type ValidateDestinationResponse
- type ValidateDestinationResponseEnvelope
- type ValidateDestinationResponseEnvelopeErrors
- type ValidateDestinationResponseEnvelopeErrorsSource
- type ValidateDestinationResponseEnvelopeMessages
- type ValidateDestinationResponseEnvelopeMessagesSource
- type ValidateDestinationResponseEnvelopeSuccess
- type ValidateOriginParams
- type ValidateOriginResponse
- type ValidateOriginResponseEnvelope
- type ValidateOriginResponseEnvelopeErrors
- type ValidateOriginResponseEnvelopeErrorsSource
- type ValidateOriginResponseEnvelopeMessages
- type ValidateOriginResponseEnvelopeMessagesSource
- type ValidateOriginResponseEnvelopeSuccess
- type ValidateService
- func (r *ValidateService) Destination(ctx context.Context, params ValidateDestinationParams, ...) (res *ValidateDestinationResponse, err error)
- func (r *ValidateService) DestinationExists(ctx context.Context, params ValidateDestinationExistsParams, ...) (res *ValidateDestinationExistsResponse, err error)
- func (r *ValidateService) Origin(ctx context.Context, params ValidateOriginParams, opts ...option.RequestOption) (res *ValidateOriginResponse, err error)
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 CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare
This is an alias to an internal value.
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal
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 CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
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 RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
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.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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 CloudflareTunnelConfigSrc ¶
type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc
Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.
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 DatasetFieldGetParams ¶
type DatasetFieldGetParamsDatasetID ¶
type DatasetFieldGetParamsDatasetID string
Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).
const ( DatasetFieldGetParamsDatasetIDAccessRequests DatasetFieldGetParamsDatasetID = "access_requests" DatasetFieldGetParamsDatasetIDAccountAbuseProtectionEvents DatasetFieldGetParamsDatasetID = "account_abuse_protection_events" DatasetFieldGetParamsDatasetIDAuditLogs DatasetFieldGetParamsDatasetID = "audit_logs" DatasetFieldGetParamsDatasetIDAuditLogsV2 DatasetFieldGetParamsDatasetID = "audit_logs_v2" DatasetFieldGetParamsDatasetIDBISOUserActions DatasetFieldGetParamsDatasetID = "biso_user_actions" DatasetFieldGetParamsDatasetIDCasbFindings DatasetFieldGetParamsDatasetID = "casb_findings" DatasetFieldGetParamsDatasetIDDevicePostureResults DatasetFieldGetParamsDatasetID = "device_posture_results" DatasetFieldGetParamsDatasetIDDEXApplicationTests DatasetFieldGetParamsDatasetID = "dex_application_tests" DatasetFieldGetParamsDatasetIDDEXDeviceStateEvents DatasetFieldGetParamsDatasetID = "dex_device_state_events" DatasetFieldGetParamsDatasetIDDLPForensicCopies DatasetFieldGetParamsDatasetID = "dlp_forensic_copies" DatasetFieldGetParamsDatasetIDDNSFirewallLogs DatasetFieldGetParamsDatasetID = "dns_firewall_logs" DatasetFieldGetParamsDatasetIDDNSLogs DatasetFieldGetParamsDatasetID = "dns_logs" DatasetFieldGetParamsDatasetIDEmailSecurityAlerts DatasetFieldGetParamsDatasetID = "email_security_alerts" DatasetFieldGetParamsDatasetIDEmailSecurityPostDeliveryEvents DatasetFieldGetParamsDatasetID = "email_security_post_delivery_events" DatasetFieldGetParamsDatasetIDFirewallEvents DatasetFieldGetParamsDatasetID = "firewall_events" DatasetFieldGetParamsDatasetIDGatewayDNS DatasetFieldGetParamsDatasetID = "gateway_dns" DatasetFieldGetParamsDatasetIDGatewayHTTP DatasetFieldGetParamsDatasetID = "gateway_http" DatasetFieldGetParamsDatasetIDGatewayNetwork DatasetFieldGetParamsDatasetID = "gateway_network" DatasetFieldGetParamsDatasetIDHTTPRequests DatasetFieldGetParamsDatasetID = "http_requests" DatasetFieldGetParamsDatasetIDIPSECLogs DatasetFieldGetParamsDatasetID = "ipsec_logs" DatasetFieldGetParamsDatasetIDMagicBGPLogs DatasetFieldGetParamsDatasetID = "magic_bgp_logs" DatasetFieldGetParamsDatasetIDMagicIDsDetections DatasetFieldGetParamsDatasetID = "magic_ids_detections" DatasetFieldGetParamsDatasetIDMcpPortalLogs DatasetFieldGetParamsDatasetID = "mcp_portal_logs" DatasetFieldGetParamsDatasetIDMNMFlowLogs DatasetFieldGetParamsDatasetID = "mnm_flow_logs" DatasetFieldGetParamsDatasetIDNELReports DatasetFieldGetParamsDatasetID = "nel_reports" DatasetFieldGetParamsDatasetIDNetworkAnalyticsLogs DatasetFieldGetParamsDatasetID = "network_analytics_logs" DatasetFieldGetParamsDatasetIDPageShieldEvents DatasetFieldGetParamsDatasetID = "page_shield_events" DatasetFieldGetParamsDatasetIDSinkholeHTTPLogs DatasetFieldGetParamsDatasetID = "sinkhole_http_logs" DatasetFieldGetParamsDatasetIDSpectrumEvents DatasetFieldGetParamsDatasetID = "spectrum_events" DatasetFieldGetParamsDatasetIDSSHLogs DatasetFieldGetParamsDatasetID = "ssh_logs" DatasetFieldGetParamsDatasetIDTurnstileEvents DatasetFieldGetParamsDatasetID = "turnstile_events" DatasetFieldGetParamsDatasetIDWARPConfigChanges DatasetFieldGetParamsDatasetID = "warp_config_changes" DatasetFieldGetParamsDatasetIDWARPToggleChanges DatasetFieldGetParamsDatasetID = "warp_toggle_changes" DatasetFieldGetParamsDatasetIDWebsocketAnalytics DatasetFieldGetParamsDatasetID = "websocket_analytics" DatasetFieldGetParamsDatasetIDWorkersTraceEvents DatasetFieldGetParamsDatasetID = "workers_trace_events" DatasetFieldGetParamsDatasetIDZarazEvents DatasetFieldGetParamsDatasetID = "zaraz_events" DatasetFieldGetParamsDatasetIDZeroTrustNetworkSessions DatasetFieldGetParamsDatasetID = "zero_trust_network_sessions" )
func (DatasetFieldGetParamsDatasetID) IsKnown ¶
func (r DatasetFieldGetParamsDatasetID) IsKnown() bool
type DatasetFieldGetResponse ¶
type DatasetFieldGetResponseEnvelope ¶
type DatasetFieldGetResponseEnvelope struct {
Errors []DatasetFieldGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []DatasetFieldGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success DatasetFieldGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result DatasetFieldGetResponse `json:"result"`
JSON datasetFieldGetResponseEnvelopeJSON `json:"-"`
}
func (*DatasetFieldGetResponseEnvelope) UnmarshalJSON ¶
func (r *DatasetFieldGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DatasetFieldGetResponseEnvelopeErrors ¶
type DatasetFieldGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source DatasetFieldGetResponseEnvelopeErrorsSource `json:"source"`
JSON datasetFieldGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*DatasetFieldGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *DatasetFieldGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type DatasetFieldGetResponseEnvelopeErrorsSource ¶
type DatasetFieldGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON datasetFieldGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*DatasetFieldGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *DatasetFieldGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type DatasetFieldGetResponseEnvelopeMessages ¶
type DatasetFieldGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source DatasetFieldGetResponseEnvelopeMessagesSource `json:"source"`
JSON datasetFieldGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*DatasetFieldGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *DatasetFieldGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type DatasetFieldGetResponseEnvelopeMessagesSource ¶
type DatasetFieldGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON datasetFieldGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*DatasetFieldGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *DatasetFieldGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type DatasetFieldGetResponseEnvelopeSuccess ¶
type DatasetFieldGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
DatasetFieldGetResponseEnvelopeSuccessTrue DatasetFieldGetResponseEnvelopeSuccess = true
)
func (DatasetFieldGetResponseEnvelopeSuccess) IsKnown ¶
func (r DatasetFieldGetResponseEnvelopeSuccess) IsKnown() bool
type DatasetFieldService ¶
type DatasetFieldService struct {
Options []option.RequestOption
}
DatasetFieldService 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 NewDatasetFieldService method instead.
func NewDatasetFieldService ¶
func NewDatasetFieldService(opts ...option.RequestOption) (r *DatasetFieldService)
NewDatasetFieldService 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 (*DatasetFieldService) Get ¶
func (r *DatasetFieldService) Get(ctx context.Context, datasetID DatasetFieldGetParamsDatasetID, query DatasetFieldGetParams, opts ...option.RequestOption) (res *DatasetFieldGetResponse, err error)
Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.
type DatasetJobGetParams ¶
type DatasetJobGetParamsDatasetID ¶
type DatasetJobGetParamsDatasetID string
Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).
const ( DatasetJobGetParamsDatasetIDAccessRequests DatasetJobGetParamsDatasetID = "access_requests" DatasetJobGetParamsDatasetIDAccountAbuseProtectionEvents DatasetJobGetParamsDatasetID = "account_abuse_protection_events" DatasetJobGetParamsDatasetIDAuditLogs DatasetJobGetParamsDatasetID = "audit_logs" DatasetJobGetParamsDatasetIDAuditLogsV2 DatasetJobGetParamsDatasetID = "audit_logs_v2" DatasetJobGetParamsDatasetIDBISOUserActions DatasetJobGetParamsDatasetID = "biso_user_actions" DatasetJobGetParamsDatasetIDCasbFindings DatasetJobGetParamsDatasetID = "casb_findings" DatasetJobGetParamsDatasetIDDevicePostureResults DatasetJobGetParamsDatasetID = "device_posture_results" DatasetJobGetParamsDatasetIDDEXApplicationTests DatasetJobGetParamsDatasetID = "dex_application_tests" DatasetJobGetParamsDatasetIDDEXDeviceStateEvents DatasetJobGetParamsDatasetID = "dex_device_state_events" DatasetJobGetParamsDatasetIDDLPForensicCopies DatasetJobGetParamsDatasetID = "dlp_forensic_copies" DatasetJobGetParamsDatasetIDDNSFirewallLogs DatasetJobGetParamsDatasetID = "dns_firewall_logs" DatasetJobGetParamsDatasetIDDNSLogs DatasetJobGetParamsDatasetID = "dns_logs" DatasetJobGetParamsDatasetIDEmailSecurityAlerts DatasetJobGetParamsDatasetID = "email_security_alerts" DatasetJobGetParamsDatasetIDEmailSecurityPostDeliveryEvents DatasetJobGetParamsDatasetID = "email_security_post_delivery_events" DatasetJobGetParamsDatasetIDFirewallEvents DatasetJobGetParamsDatasetID = "firewall_events" DatasetJobGetParamsDatasetIDGatewayDNS DatasetJobGetParamsDatasetID = "gateway_dns" DatasetJobGetParamsDatasetIDGatewayHTTP DatasetJobGetParamsDatasetID = "gateway_http" DatasetJobGetParamsDatasetIDGatewayNetwork DatasetJobGetParamsDatasetID = "gateway_network" DatasetJobGetParamsDatasetIDHTTPRequests DatasetJobGetParamsDatasetID = "http_requests" DatasetJobGetParamsDatasetIDIPSECLogs DatasetJobGetParamsDatasetID = "ipsec_logs" DatasetJobGetParamsDatasetIDMagicBGPLogs DatasetJobGetParamsDatasetID = "magic_bgp_logs" DatasetJobGetParamsDatasetIDMagicIDsDetections DatasetJobGetParamsDatasetID = "magic_ids_detections" DatasetJobGetParamsDatasetIDMcpPortalLogs DatasetJobGetParamsDatasetID = "mcp_portal_logs" DatasetJobGetParamsDatasetIDMNMFlowLogs DatasetJobGetParamsDatasetID = "mnm_flow_logs" DatasetJobGetParamsDatasetIDNELReports DatasetJobGetParamsDatasetID = "nel_reports" DatasetJobGetParamsDatasetIDNetworkAnalyticsLogs DatasetJobGetParamsDatasetID = "network_analytics_logs" DatasetJobGetParamsDatasetIDPageShieldEvents DatasetJobGetParamsDatasetID = "page_shield_events" DatasetJobGetParamsDatasetIDSinkholeHTTPLogs DatasetJobGetParamsDatasetID = "sinkhole_http_logs" DatasetJobGetParamsDatasetIDSpectrumEvents DatasetJobGetParamsDatasetID = "spectrum_events" DatasetJobGetParamsDatasetIDSSHLogs DatasetJobGetParamsDatasetID = "ssh_logs" DatasetJobGetParamsDatasetIDTurnstileEvents DatasetJobGetParamsDatasetID = "turnstile_events" DatasetJobGetParamsDatasetIDWARPConfigChanges DatasetJobGetParamsDatasetID = "warp_config_changes" DatasetJobGetParamsDatasetIDWARPToggleChanges DatasetJobGetParamsDatasetID = "warp_toggle_changes" DatasetJobGetParamsDatasetIDWebsocketAnalytics DatasetJobGetParamsDatasetID = "websocket_analytics" DatasetJobGetParamsDatasetIDWorkersTraceEvents DatasetJobGetParamsDatasetID = "workers_trace_events" DatasetJobGetParamsDatasetIDZarazEvents DatasetJobGetParamsDatasetID = "zaraz_events" DatasetJobGetParamsDatasetIDZeroTrustNetworkSessions DatasetJobGetParamsDatasetID = "zero_trust_network_sessions" )
func (DatasetJobGetParamsDatasetID) IsKnown ¶
func (r DatasetJobGetParamsDatasetID) IsKnown() bool
type DatasetJobService ¶
type DatasetJobService struct {
Options []option.RequestOption
}
DatasetJobService 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 NewDatasetJobService method instead.
func NewDatasetJobService ¶
func NewDatasetJobService(opts ...option.RequestOption) (r *DatasetJobService)
NewDatasetJobService 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 (*DatasetJobService) Get ¶
func (r *DatasetJobService) Get(ctx context.Context, datasetID DatasetJobGetParamsDatasetID, query DatasetJobGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[LogpushJob], err error)
Lists Logpush jobs for an account or zone for a dataset.
func (*DatasetJobService) GetAutoPaging ¶
func (r *DatasetJobService) GetAutoPaging(ctx context.Context, datasetID DatasetJobGetParamsDatasetID, query DatasetJobGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LogpushJob]
Lists Logpush jobs for an account or zone for a dataset.
type DatasetService ¶
type DatasetService struct {
Options []option.RequestOption
Fields *DatasetFieldService
Jobs *DatasetJobService
}
DatasetService 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 NewDatasetService method instead.
func NewDatasetService ¶
func NewDatasetService(opts ...option.RequestOption) (r *DatasetService)
NewDatasetService 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 EdgeGetParams ¶
type EdgeNewParams ¶
type EdgeNewParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id" api:"required"`
// Comma-separated list of fields.
Fields param.Field[string] `json:"fields"`
// Filters to drill down into specific events.
Filter param.Field[string] `json:"filter"`
// The sample parameter is the sample rate of the records set by the client:
// "sample": 1 is 100% of records "sample": 10 is 10% and so on.
Sample param.Field[int64] `json:"sample"`
}
func (EdgeNewParams) MarshalJSON ¶
func (r EdgeNewParams) MarshalJSON() (data []byte, err error)
type EdgeNewResponseEnvelope ¶
type EdgeNewResponseEnvelope struct {
Errors []EdgeNewResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []EdgeNewResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success EdgeNewResponseEnvelopeSuccess `json:"success" api:"required"`
Result InstantLogpushJob `json:"result" api:"nullable"`
JSON edgeNewResponseEnvelopeJSON `json:"-"`
}
func (*EdgeNewResponseEnvelope) UnmarshalJSON ¶
func (r *EdgeNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type EdgeNewResponseEnvelopeErrors ¶
type EdgeNewResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source EdgeNewResponseEnvelopeErrorsSource `json:"source"`
JSON edgeNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*EdgeNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *EdgeNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type EdgeNewResponseEnvelopeErrorsSource ¶
type EdgeNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON edgeNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*EdgeNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *EdgeNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type EdgeNewResponseEnvelopeMessages ¶
type EdgeNewResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source EdgeNewResponseEnvelopeMessagesSource `json:"source"`
JSON edgeNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*EdgeNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *EdgeNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type EdgeNewResponseEnvelopeMessagesSource ¶
type EdgeNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON edgeNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*EdgeNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *EdgeNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type EdgeNewResponseEnvelopeSuccess ¶
type EdgeNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
EdgeNewResponseEnvelopeSuccessTrue EdgeNewResponseEnvelopeSuccess = true
)
func (EdgeNewResponseEnvelopeSuccess) IsKnown ¶
func (r EdgeNewResponseEnvelopeSuccess) IsKnown() bool
type EdgeService ¶
type EdgeService struct {
Options []option.RequestOption
}
EdgeService 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 NewEdgeService method instead.
func NewEdgeService ¶
func NewEdgeService(opts ...option.RequestOption) (r *EdgeService)
NewEdgeService 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 (*EdgeService) Get ¶
func (r *EdgeService) Get(ctx context.Context, query EdgeGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[InstantLogpushJob], err error)
Lists Instant Logs jobs for a zone.
func (*EdgeService) GetAutoPaging ¶
func (r *EdgeService) GetAutoPaging(ctx context.Context, query EdgeGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InstantLogpushJob]
Lists Instant Logs jobs for a zone.
func (*EdgeService) New ¶
func (r *EdgeService) New(ctx context.Context, params EdgeNewParams, opts ...option.RequestOption) (res *InstantLogpushJob, err error)
Creates a new Instant Logs job for a zone.
type ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type InstantLogpushJob ¶
type InstantLogpushJob struct {
// Unique WebSocket address that will receive messages from Cloudflare’s edge.
DestinationConf string `json:"destination_conf" format:"uri"`
// Comma-separated list of fields.
Fields string `json:"fields"`
// Filters to drill down into specific events.
Filter string `json:"filter"`
// The sample parameter is the sample rate of the records set by the client:
// "sample": 1 is 100% of records "sample": 10 is 10% and so on.
Sample int64 `json:"sample"`
// Unique session id of the job.
SessionID string `json:"session_id"`
JSON instantLogpushJobJSON `json:"-"`
}
func (*InstantLogpushJob) UnmarshalJSON ¶
func (r *InstantLogpushJob) UnmarshalJSON(data []byte) (err error)
type JobDeleteParams ¶
type JobDeleteResponse ¶
type JobDeleteResponse struct {
// Unique id of the job.
ID int64 `json:"id"`
JSON jobDeleteResponseJSON `json:"-"`
}
func (*JobDeleteResponse) UnmarshalJSON ¶
func (r *JobDeleteResponse) UnmarshalJSON(data []byte) (err error)
type JobDeleteResponseEnvelope ¶
type JobDeleteResponseEnvelope struct {
Errors []JobDeleteResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []JobDeleteResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success JobDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
Result JobDeleteResponse `json:"result"`
JSON jobDeleteResponseEnvelopeJSON `json:"-"`
}
func (*JobDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *JobDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobDeleteResponseEnvelopeErrors ¶
type JobDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON jobDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*JobDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *JobDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type JobDeleteResponseEnvelopeErrorsSource ¶
type JobDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON jobDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*JobDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *JobDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type JobDeleteResponseEnvelopeMessages ¶
type JobDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON jobDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*JobDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *JobDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type JobDeleteResponseEnvelopeMessagesSource ¶
type JobDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON jobDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*JobDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *JobDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type JobDeleteResponseEnvelopeSuccess ¶
type JobDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
JobDeleteResponseEnvelopeSuccessTrue JobDeleteResponseEnvelopeSuccess = true
)
func (JobDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r JobDeleteResponseEnvelopeSuccess) IsKnown() bool
type JobGetParams ¶
type JobGetResponseEnvelope ¶
type JobGetResponseEnvelope struct {
Errors []JobGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []JobGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success JobGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result LogpushJob `json:"result" api:"nullable"`
JSON jobGetResponseEnvelopeJSON `json:"-"`
}
func (*JobGetResponseEnvelope) UnmarshalJSON ¶
func (r *JobGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobGetResponseEnvelopeErrors ¶
type JobGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobGetResponseEnvelopeErrorsSource `json:"source"`
JSON jobGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*JobGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *JobGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type JobGetResponseEnvelopeErrorsSource ¶
type JobGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON jobGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*JobGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *JobGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type JobGetResponseEnvelopeMessages ¶
type JobGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobGetResponseEnvelopeMessagesSource `json:"source"`
JSON jobGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*JobGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *JobGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type JobGetResponseEnvelopeMessagesSource ¶
type JobGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON jobGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*JobGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *JobGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type JobGetResponseEnvelopeSuccess ¶
type JobGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
JobGetResponseEnvelopeSuccessTrue JobGetResponseEnvelopeSuccess = true
)
func (JobGetResponseEnvelopeSuccess) IsKnown ¶
func (r JobGetResponseEnvelopeSuccess) IsKnown() bool
type JobListParams ¶
type JobNewParams ¶
type JobNewParams struct {
// Uniquely identifies a resource (such as an s3 bucket) where data. will be
// pushed. Additional configuration parameters supported by the destination may be
// included.
DestinationConf param.Field[string] `json:"destination_conf" api:"required" format:"uri"`
// 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"`
// Name of the dataset. A list of supported datasets can be found on the
// [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).
Dataset param.Field[JobNewParamsDataset] `json:"dataset"`
// Flag that indicates if the job is enabled.
Enabled param.Field[bool] `json:"enabled"`
// The filters to select the events to include and/or remove from your logs. For
// more information, refer to
// [Filters](https://developers.cloudflare.com/logs/reference/filters/).
Filter param.Field[string] `json:"filter"`
// This field is deprecated. Please use `max_upload_*` parameters instead. . The
// frequency at which Cloudflare sends batches of logs to your destination. Setting
// frequency to high sends your logs in larger quantities of smaller files. Setting
// frequency to low sends logs in smaller quantities of larger files.
Frequency param.Field[JobNewParamsFrequency] `json:"frequency"`
// The kind parameter (optional) is used to differentiate between Logpush and Edge
// Log Delivery jobs (when supported by the dataset).
Kind param.Field[JobNewParamsKind] `json:"kind"`
// This field is deprecated. Use `output_options` instead. Configuration string. It
// specifies things like requested fields and timestamp formats. If migrating from
// the logpull api, copy the url (full url or just the query string) of your call
// here, and logpush will keep on making this call for you, setting start and end
// times appropriately.
LogpullOptions param.Field[string] `json:"logpull_options" format:"uri-reference"`
// The maximum uncompressed file size of a batch of logs. This setting value must
// be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
// minimum file size; this means that log files may be much smaller than this batch
// size.
MaxUploadBytes param.Field[JobNewParamsMaxUploadBytes] `json:"max_upload_bytes"`
// The maximum interval in seconds for log batches. This setting must be between 30
// and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
// a minimum interval for log batches; this means that log files may be sent in
// shorter intervals than this.
MaxUploadIntervalSeconds param.Field[JobNewParamsMaxUploadIntervalSeconds] `json:"max_upload_interval_seconds"`
// The maximum number of log lines per batch. This setting must be between 1000 and
// 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
// number of log lines per batch; this means that log files may contain many fewer
// lines than this.
MaxUploadRecords param.Field[JobNewParamsMaxUploadRecords] `json:"max_upload_records"`
// Optional human readable job name. Not unique. Cloudflare suggests. that you set
// this to a meaningful string, like the domain name, to make it easier to identify
// your job.
Name param.Field[string] `json:"name"`
// The structured replacement for `logpull_options`. When including this field, the
// `logpull_option` field will be ignored.
OutputOptions param.Field[OutputOptionsParam] `json:"output_options"`
// Ownership challenge token to prove destination ownership.
OwnershipChallenge param.Field[string] `json:"ownership_challenge"`
}
func (JobNewParams) MarshalJSON ¶
func (r JobNewParams) MarshalJSON() (data []byte, err error)
type JobNewParamsDataset ¶
type JobNewParamsDataset string
Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).
const ( JobNewParamsDatasetAccessRequests JobNewParamsDataset = "access_requests" JobNewParamsDatasetAccountAbuseProtectionEvents JobNewParamsDataset = "account_abuse_protection_events" JobNewParamsDatasetAuditLogs JobNewParamsDataset = "audit_logs" JobNewParamsDatasetAuditLogsV2 JobNewParamsDataset = "audit_logs_v2" JobNewParamsDatasetBISOUserActions JobNewParamsDataset = "biso_user_actions" JobNewParamsDatasetCasbFindings JobNewParamsDataset = "casb_findings" JobNewParamsDatasetDevicePostureResults JobNewParamsDataset = "device_posture_results" JobNewParamsDatasetDEXApplicationTests JobNewParamsDataset = "dex_application_tests" JobNewParamsDatasetDEXDeviceStateEvents JobNewParamsDataset = "dex_device_state_events" JobNewParamsDatasetDLPForensicCopies JobNewParamsDataset = "dlp_forensic_copies" JobNewParamsDatasetDNSFirewallLogs JobNewParamsDataset = "dns_firewall_logs" JobNewParamsDatasetDNSLogs JobNewParamsDataset = "dns_logs" JobNewParamsDatasetEmailSecurityAlerts JobNewParamsDataset = "email_security_alerts" JobNewParamsDatasetEmailSecurityPostDeliveryEvents JobNewParamsDataset = "email_security_post_delivery_events" JobNewParamsDatasetFirewallEvents JobNewParamsDataset = "firewall_events" JobNewParamsDatasetGatewayDNS JobNewParamsDataset = "gateway_dns" JobNewParamsDatasetGatewayHTTP JobNewParamsDataset = "gateway_http" JobNewParamsDatasetGatewayNetwork JobNewParamsDataset = "gateway_network" JobNewParamsDatasetHTTPRequests JobNewParamsDataset = "http_requests" JobNewParamsDatasetIPSECLogs JobNewParamsDataset = "ipsec_logs" JobNewParamsDatasetMagicBGPLogs JobNewParamsDataset = "magic_bgp_logs" JobNewParamsDatasetMagicIDsDetections JobNewParamsDataset = "magic_ids_detections" JobNewParamsDatasetMcpPortalLogs JobNewParamsDataset = "mcp_portal_logs" JobNewParamsDatasetMNMFlowLogs JobNewParamsDataset = "mnm_flow_logs" JobNewParamsDatasetNELReports JobNewParamsDataset = "nel_reports" JobNewParamsDatasetNetworkAnalyticsLogs JobNewParamsDataset = "network_analytics_logs" JobNewParamsDatasetPageShieldEvents JobNewParamsDataset = "page_shield_events" JobNewParamsDatasetSinkholeHTTPLogs JobNewParamsDataset = "sinkhole_http_logs" JobNewParamsDatasetSpectrumEvents JobNewParamsDataset = "spectrum_events" JobNewParamsDatasetSSHLogs JobNewParamsDataset = "ssh_logs" JobNewParamsDatasetTurnstileEvents JobNewParamsDataset = "turnstile_events" JobNewParamsDatasetWARPConfigChanges JobNewParamsDataset = "warp_config_changes" JobNewParamsDatasetWARPToggleChanges JobNewParamsDataset = "warp_toggle_changes" JobNewParamsDatasetWebsocketAnalytics JobNewParamsDataset = "websocket_analytics" JobNewParamsDatasetWorkersTraceEvents JobNewParamsDataset = "workers_trace_events" JobNewParamsDatasetZarazEvents JobNewParamsDataset = "zaraz_events" JobNewParamsDatasetZeroTrustNetworkSessions JobNewParamsDataset = "zero_trust_network_sessions" )
func (JobNewParamsDataset) IsKnown ¶
func (r JobNewParamsDataset) IsKnown() bool
type JobNewParamsFrequency ¶
type JobNewParamsFrequency string
This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.
const ( JobNewParamsFrequencyHigh JobNewParamsFrequency = "high" JobNewParamsFrequencyLow JobNewParamsFrequency = "low" )
func (JobNewParamsFrequency) IsKnown ¶
func (r JobNewParamsFrequency) IsKnown() bool
type JobNewParamsKind ¶
type JobNewParamsKind string
The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).
const ( JobNewParamsKindEmpty JobNewParamsKind = "" JobNewParamsKindEdge JobNewParamsKind = "edge" )
func (JobNewParamsKind) IsKnown ¶
func (r JobNewParamsKind) IsKnown() bool
type JobNewParamsMaxUploadBytes ¶
type JobNewParamsMaxUploadBytes int64
The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.
const (
JobNewParamsMaxUploadBytes0 JobNewParamsMaxUploadBytes = 0
)
func (JobNewParamsMaxUploadBytes) IsKnown ¶
func (r JobNewParamsMaxUploadBytes) IsKnown() bool
type JobNewParamsMaxUploadIntervalSeconds ¶
type JobNewParamsMaxUploadIntervalSeconds int64
The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.
const (
JobNewParamsMaxUploadIntervalSeconds0 JobNewParamsMaxUploadIntervalSeconds = 0
)
func (JobNewParamsMaxUploadIntervalSeconds) IsKnown ¶
func (r JobNewParamsMaxUploadIntervalSeconds) IsKnown() bool
type JobNewParamsMaxUploadRecords ¶
type JobNewParamsMaxUploadRecords int64
The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.
const (
JobNewParamsMaxUploadRecords0 JobNewParamsMaxUploadRecords = 0
)
func (JobNewParamsMaxUploadRecords) IsKnown ¶
func (r JobNewParamsMaxUploadRecords) IsKnown() bool
type JobNewResponseEnvelope ¶
type JobNewResponseEnvelope struct {
Errors []JobNewResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []JobNewResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success JobNewResponseEnvelopeSuccess `json:"success" api:"required"`
Result LogpushJob `json:"result" api:"nullable"`
JSON jobNewResponseEnvelopeJSON `json:"-"`
}
func (*JobNewResponseEnvelope) UnmarshalJSON ¶
func (r *JobNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobNewResponseEnvelopeErrors ¶
type JobNewResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobNewResponseEnvelopeErrorsSource `json:"source"`
JSON jobNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*JobNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *JobNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type JobNewResponseEnvelopeErrorsSource ¶
type JobNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON jobNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*JobNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *JobNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type JobNewResponseEnvelopeMessages ¶
type JobNewResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobNewResponseEnvelopeMessagesSource `json:"source"`
JSON jobNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*JobNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *JobNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type JobNewResponseEnvelopeMessagesSource ¶
type JobNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON jobNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*JobNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *JobNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type JobNewResponseEnvelopeSuccess ¶
type JobNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
JobNewResponseEnvelopeSuccessTrue JobNewResponseEnvelopeSuccess = true
)
func (JobNewResponseEnvelopeSuccess) IsKnown ¶
func (r JobNewResponseEnvelopeSuccess) IsKnown() bool
type JobService ¶
type JobService struct {
Options []option.RequestOption
}
JobService 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 NewJobService method instead.
func NewJobService ¶
func NewJobService(opts ...option.RequestOption) (r *JobService)
NewJobService 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 (*JobService) Delete ¶
func (r *JobService) Delete(ctx context.Context, jobID int64, body JobDeleteParams, opts ...option.RequestOption) (res *JobDeleteResponse, err error)
Deletes a Logpush job.
func (*JobService) Get ¶
func (r *JobService) Get(ctx context.Context, jobID int64, query JobGetParams, opts ...option.RequestOption) (res *LogpushJob, err error)
Gets the details of a Logpush job.
func (*JobService) List ¶
func (r *JobService) List(ctx context.Context, query JobListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LogpushJob], err error)
Lists Logpush jobs for an account or zone.
func (*JobService) ListAutoPaging ¶
func (r *JobService) ListAutoPaging(ctx context.Context, query JobListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LogpushJob]
Lists Logpush jobs for an account or zone.
func (*JobService) New ¶
func (r *JobService) New(ctx context.Context, params JobNewParams, opts ...option.RequestOption) (res *LogpushJob, err error)
Creates a new Logpush job for an account or zone.
func (*JobService) Update ¶
func (r *JobService) Update(ctx context.Context, jobID int64, params JobUpdateParams, opts ...option.RequestOption) (res *LogpushJob, err error)
Updates a Logpush job.
type JobUpdateParams ¶
type JobUpdateParams 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"`
// Uniquely identifies a resource (such as an s3 bucket) where data. will be
// pushed. Additional configuration parameters supported by the destination may be
// included.
DestinationConf param.Field[string] `json:"destination_conf" format:"uri"`
// Flag that indicates if the job is enabled.
Enabled param.Field[bool] `json:"enabled"`
// The filters to select the events to include and/or remove from your logs. For
// more information, refer to
// [Filters](https://developers.cloudflare.com/logs/reference/filters/).
Filter param.Field[string] `json:"filter"`
// This field is deprecated. Please use `max_upload_*` parameters instead. . The
// frequency at which Cloudflare sends batches of logs to your destination. Setting
// frequency to high sends your logs in larger quantities of smaller files. Setting
// frequency to low sends logs in smaller quantities of larger files.
Frequency param.Field[JobUpdateParamsFrequency] `json:"frequency"`
// The kind parameter (optional) is used to differentiate between Logpush and Edge
// Log Delivery jobs (when supported by the dataset).
Kind param.Field[JobUpdateParamsKind] `json:"kind"`
// This field is deprecated. Use `output_options` instead. Configuration string. It
// specifies things like requested fields and timestamp formats. If migrating from
// the logpull api, copy the url (full url or just the query string) of your call
// here, and logpush will keep on making this call for you, setting start and end
// times appropriately.
LogpullOptions param.Field[string] `json:"logpull_options" format:"uri-reference"`
// The maximum uncompressed file size of a batch of logs. This setting value must
// be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
// minimum file size; this means that log files may be much smaller than this batch
// size.
MaxUploadBytes param.Field[JobUpdateParamsMaxUploadBytes] `json:"max_upload_bytes"`
// The maximum interval in seconds for log batches. This setting must be between 30
// and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
// a minimum interval for log batches; this means that log files may be sent in
// shorter intervals than this.
MaxUploadIntervalSeconds param.Field[JobUpdateParamsMaxUploadIntervalSeconds] `json:"max_upload_interval_seconds"`
// The maximum number of log lines per batch. This setting must be between 1000 and
// 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
// number of log lines per batch; this means that log files may contain many fewer
// lines than this.
MaxUploadRecords param.Field[JobUpdateParamsMaxUploadRecords] `json:"max_upload_records"`
// Optional human readable job name. Not unique. Cloudflare suggests. that you set
// this to a meaningful string, like the domain name, to make it easier to identify
// your job.
Name param.Field[string] `json:"name"`
// The structured replacement for `logpull_options`. When including this field, the
// `logpull_option` field will be ignored.
OutputOptions param.Field[OutputOptionsParam] `json:"output_options"`
// Ownership challenge token to prove destination ownership.
OwnershipChallenge param.Field[string] `json:"ownership_challenge"`
}
func (JobUpdateParams) MarshalJSON ¶
func (r JobUpdateParams) MarshalJSON() (data []byte, err error)
type JobUpdateParamsFrequency ¶
type JobUpdateParamsFrequency string
This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.
const ( JobUpdateParamsFrequencyHigh JobUpdateParamsFrequency = "high" JobUpdateParamsFrequencyLow JobUpdateParamsFrequency = "low" )
func (JobUpdateParamsFrequency) IsKnown ¶
func (r JobUpdateParamsFrequency) IsKnown() bool
type JobUpdateParamsKind ¶
type JobUpdateParamsKind string
The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).
const ( JobUpdateParamsKindEmpty JobUpdateParamsKind = "" JobUpdateParamsKindEdge JobUpdateParamsKind = "edge" )
func (JobUpdateParamsKind) IsKnown ¶
func (r JobUpdateParamsKind) IsKnown() bool
type JobUpdateParamsMaxUploadBytes ¶
type JobUpdateParamsMaxUploadBytes int64
The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.
const (
JobUpdateParamsMaxUploadBytes0 JobUpdateParamsMaxUploadBytes = 0
)
func (JobUpdateParamsMaxUploadBytes) IsKnown ¶
func (r JobUpdateParamsMaxUploadBytes) IsKnown() bool
type JobUpdateParamsMaxUploadIntervalSeconds ¶
type JobUpdateParamsMaxUploadIntervalSeconds int64
The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.
const (
JobUpdateParamsMaxUploadIntervalSeconds0 JobUpdateParamsMaxUploadIntervalSeconds = 0
)
func (JobUpdateParamsMaxUploadIntervalSeconds) IsKnown ¶
func (r JobUpdateParamsMaxUploadIntervalSeconds) IsKnown() bool
type JobUpdateParamsMaxUploadRecords ¶
type JobUpdateParamsMaxUploadRecords int64
The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.
const (
JobUpdateParamsMaxUploadRecords0 JobUpdateParamsMaxUploadRecords = 0
)
func (JobUpdateParamsMaxUploadRecords) IsKnown ¶
func (r JobUpdateParamsMaxUploadRecords) IsKnown() bool
type JobUpdateResponseEnvelope ¶
type JobUpdateResponseEnvelope struct {
Errors []JobUpdateResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []JobUpdateResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success JobUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
Result LogpushJob `json:"result" api:"nullable"`
JSON jobUpdateResponseEnvelopeJSON `json:"-"`
}
func (*JobUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *JobUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobUpdateResponseEnvelopeErrors ¶
type JobUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON jobUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*JobUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *JobUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type JobUpdateResponseEnvelopeErrorsSource ¶
type JobUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON jobUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*JobUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *JobUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type JobUpdateResponseEnvelopeMessages ¶
type JobUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source JobUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON jobUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*JobUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *JobUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type JobUpdateResponseEnvelopeMessagesSource ¶
type JobUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON jobUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*JobUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *JobUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type JobUpdateResponseEnvelopeSuccess ¶
type JobUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
JobUpdateResponseEnvelopeSuccessTrue JobUpdateResponseEnvelopeSuccess = true
)
func (JobUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r JobUpdateResponseEnvelopeSuccess) IsKnown() bool
type LogpushJob ¶
type LogpushJob struct {
// Unique id of the job.
ID int64 `json:"id"`
// Name of the dataset. A list of supported datasets can be found on the
// [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).
Dataset LogpushJobDataset `json:"dataset" api:"nullable"`
// Uniquely identifies a resource (such as an s3 bucket) where data. will be
// pushed. Additional configuration parameters supported by the destination may be
// included.
DestinationConf string `json:"destination_conf" format:"uri"`
// Flag that indicates if the job is enabled.
Enabled bool `json:"enabled"`
// If not null, the job is currently failing. Failures are usually. repetitive
// (example: no permissions to write to destination bucket). Only the last failure
// is recorded. On successful execution of a job the error_message and last_error
// are set to null.
ErrorMessage string `json:"error_message" api:"nullable"`
// This field is deprecated. Please use `max_upload_*` parameters instead. . The
// frequency at which Cloudflare sends batches of logs to your destination. Setting
// frequency to high sends your logs in larger quantities of smaller files. Setting
// frequency to low sends logs in smaller quantities of larger files.
//
// Deprecated: deprecated
Frequency LogpushJobFrequency `json:"frequency" api:"nullable"`
// The kind parameter (optional) is used to differentiate between Logpush and Edge
// Log Delivery jobs (when supported by the dataset).
Kind LogpushJobKind `json:"kind"`
// Records the last time for which logs have been successfully pushed. If the last
// successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z
// then the value of this field will be 2018-07-23T10:01:00Z. If the job has never
// run or has just been enabled and hasn't run yet then the field will be empty.
LastComplete time.Time `json:"last_complete" api:"nullable" format:"date-time"`
// Records the last time the job failed. If not null, the job is currently.
// failing. If null, the job has either never failed or has run successfully at
// least once since last failure. See also the error_message field.
LastError time.Time `json:"last_error" api:"nullable" format:"date-time"`
// This field is deprecated. Use `output_options` instead. Configuration string. It
// specifies things like requested fields and timestamp formats. If migrating from
// the logpull api, copy the url (full url or just the query string) of your call
// here, and logpush will keep on making this call for you, setting start and end
// times appropriately.
//
// Deprecated: deprecated
LogpullOptions string `json:"logpull_options" api:"nullable" format:"uri-reference"`
// The maximum uncompressed file size of a batch of logs. This setting value must
// be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a
// minimum file size; this means that log files may be much smaller than this batch
// size.
MaxUploadBytes LogpushJobMaxUploadBytes `json:"max_upload_bytes" api:"nullable"`
// The maximum interval in seconds for log batches. This setting must be between 30
// and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify
// a minimum interval for log batches; this means that log files may be sent in
// shorter intervals than this.
MaxUploadIntervalSeconds LogpushJobMaxUploadIntervalSeconds `json:"max_upload_interval_seconds" api:"nullable"`
// The maximum number of log lines per batch. This setting must be between 1000 and
// 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum
// number of log lines per batch; this means that log files may contain many fewer
// lines than this.
MaxUploadRecords LogpushJobMaxUploadRecords `json:"max_upload_records" api:"nullable"`
// Optional human readable job name. Not unique. Cloudflare suggests. that you set
// this to a meaningful string, like the domain name, to make it easier to identify
// your job.
Name string `json:"name" api:"nullable"`
// The structured replacement for `logpull_options`. When including this field, the
// `logpull_option` field will be ignored.
OutputOptions OutputOptions `json:"output_options" api:"nullable"`
JSON logpushJobJSON `json:"-"`
}
func (*LogpushJob) UnmarshalJSON ¶
func (r *LogpushJob) UnmarshalJSON(data []byte) (err error)
type LogpushJobDataset ¶
type LogpushJobDataset string
Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).
const ( LogpushJobDatasetAccessRequests LogpushJobDataset = "access_requests" LogpushJobDatasetAccountAbuseProtectionEvents LogpushJobDataset = "account_abuse_protection_events" LogpushJobDatasetAuditLogs LogpushJobDataset = "audit_logs" LogpushJobDatasetAuditLogsV2 LogpushJobDataset = "audit_logs_v2" LogpushJobDatasetBISOUserActions LogpushJobDataset = "biso_user_actions" LogpushJobDatasetCasbFindings LogpushJobDataset = "casb_findings" LogpushJobDatasetDevicePostureResults LogpushJobDataset = "device_posture_results" LogpushJobDatasetDEXApplicationTests LogpushJobDataset = "dex_application_tests" LogpushJobDatasetDEXDeviceStateEvents LogpushJobDataset = "dex_device_state_events" LogpushJobDatasetDLPForensicCopies LogpushJobDataset = "dlp_forensic_copies" LogpushJobDatasetDNSFirewallLogs LogpushJobDataset = "dns_firewall_logs" LogpushJobDatasetDNSLogs LogpushJobDataset = "dns_logs" LogpushJobDatasetEmailSecurityAlerts LogpushJobDataset = "email_security_alerts" LogpushJobDatasetEmailSecurityPostDeliveryEvents LogpushJobDataset = "email_security_post_delivery_events" LogpushJobDatasetFirewallEvents LogpushJobDataset = "firewall_events" LogpushJobDatasetGatewayDNS LogpushJobDataset = "gateway_dns" LogpushJobDatasetGatewayHTTP LogpushJobDataset = "gateway_http" LogpushJobDatasetGatewayNetwork LogpushJobDataset = "gateway_network" LogpushJobDatasetHTTPRequests LogpushJobDataset = "http_requests" LogpushJobDatasetIPSECLogs LogpushJobDataset = "ipsec_logs" LogpushJobDatasetMagicBGPLogs LogpushJobDataset = "magic_bgp_logs" LogpushJobDatasetMagicIDsDetections LogpushJobDataset = "magic_ids_detections" LogpushJobDatasetMcpPortalLogs LogpushJobDataset = "mcp_portal_logs" LogpushJobDatasetMNMFlowLogs LogpushJobDataset = "mnm_flow_logs" LogpushJobDatasetNELReports LogpushJobDataset = "nel_reports" LogpushJobDatasetNetworkAnalyticsLogs LogpushJobDataset = "network_analytics_logs" LogpushJobDatasetPageShieldEvents LogpushJobDataset = "page_shield_events" LogpushJobDatasetSinkholeHTTPLogs LogpushJobDataset = "sinkhole_http_logs" LogpushJobDatasetSpectrumEvents LogpushJobDataset = "spectrum_events" LogpushJobDatasetSSHLogs LogpushJobDataset = "ssh_logs" LogpushJobDatasetTurnstileEvents LogpushJobDataset = "turnstile_events" LogpushJobDatasetWARPConfigChanges LogpushJobDataset = "warp_config_changes" LogpushJobDatasetWARPToggleChanges LogpushJobDataset = "warp_toggle_changes" LogpushJobDatasetWebsocketAnalytics LogpushJobDataset = "websocket_analytics" LogpushJobDatasetWorkersTraceEvents LogpushJobDataset = "workers_trace_events" LogpushJobDatasetZarazEvents LogpushJobDataset = "zaraz_events" LogpushJobDatasetZeroTrustNetworkSessions LogpushJobDataset = "zero_trust_network_sessions" )
func (LogpushJobDataset) IsKnown ¶
func (r LogpushJobDataset) IsKnown() bool
type LogpushJobFrequency ¶
type LogpushJobFrequency string
This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.
const ( LogpushJobFrequencyHigh LogpushJobFrequency = "high" LogpushJobFrequencyLow LogpushJobFrequency = "low" )
func (LogpushJobFrequency) IsKnown ¶
func (r LogpushJobFrequency) IsKnown() bool
type LogpushJobKind ¶
type LogpushJobKind string
The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).
const ( LogpushJobKindEmpty LogpushJobKind = "" LogpushJobKindEdge LogpushJobKind = "edge" )
func (LogpushJobKind) IsKnown ¶
func (r LogpushJobKind) IsKnown() bool
type LogpushJobMaxUploadBytes ¶
type LogpushJobMaxUploadBytes int64
The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size.
const (
LogpushJobMaxUploadBytes0 LogpushJobMaxUploadBytes = 0
)
func (LogpushJobMaxUploadBytes) IsKnown ¶
func (r LogpushJobMaxUploadBytes) IsKnown() bool
type LogpushJobMaxUploadIntervalSeconds ¶
type LogpushJobMaxUploadIntervalSeconds int64
The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this.
const (
LogpushJobMaxUploadIntervalSeconds0 LogpushJobMaxUploadIntervalSeconds = 0
)
func (LogpushJobMaxUploadIntervalSeconds) IsKnown ¶
func (r LogpushJobMaxUploadIntervalSeconds) IsKnown() bool
type LogpushJobMaxUploadRecords ¶
type LogpushJobMaxUploadRecords int64
The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this.
const (
LogpushJobMaxUploadRecords0 LogpushJobMaxUploadRecords = 0
)
func (LogpushJobMaxUploadRecords) IsKnown ¶
func (r LogpushJobMaxUploadRecords) IsKnown() bool
type LogpushService ¶
type LogpushService struct {
Options []option.RequestOption
Datasets *DatasetService
Edge *EdgeService
Jobs *JobService
Ownership *OwnershipService
Transformers *TransformerService
Validate *ValidateService
}
LogpushService 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 NewLogpushService method instead.
func NewLogpushService ¶
func NewLogpushService(opts ...option.RequestOption) (r *LogpushService)
NewLogpushService 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 MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
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 MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
This is an alias to an internal type.
type OutputOptions ¶
type OutputOptions struct {
// String to be prepended before each batch.
BatchPrefix string `json:"batch_prefix" api:"nullable"`
// String to be appended after each batch.
BatchSuffix string `json:"batch_suffix" api:"nullable"`
// If set to true, will cause all occurrences of `${` in the generated files to be
// replaced with `x{`.
Cve2021_44228 bool `json:"CVE-2021-44228" api:"nullable"`
// String to join fields. This field be ignored when `record_template` is set.
FieldDelimiter string `json:"field_delimiter" api:"nullable"`
// List of field names to be included in the Logpush output. For the moment, there
// is no option to add all fields at once, so you must specify all the fields names
// you are interested in.
FieldNames []string `json:"field_names"`
// If set to true, subrequests will be merged into the parent request. Only
// supported for the `http_requests` dataset.
MergeSubrequests bool `json:"merge_subrequests" api:"nullable"`
// Specifies the output type, such as `ndjson` or `csv`. This sets default values
// for the rest of the settings, depending on the chosen output type. Some
// formatting rules, like string quoting, are different between output types.
OutputType OutputOptionsOutputType `json:"output_type"`
// String to be inserted in-between the records as separator.
RecordDelimiter string `json:"record_delimiter" api:"nullable"`
// String to be prepended before each record.
RecordPrefix string `json:"record_prefix" api:"nullable"`
// String to be appended after each record.
RecordSuffix string `json:"record_suffix" api:"nullable"`
// String to use as template for each record instead of the default json key value
// mapping. All fields used in the template must be present in `field_names` as
// well, otherwise they will end up as null. Format as a Go `text/template` without
// any standard functions, like conditionals, loops, sub-templates, etc.
RecordTemplate string `json:"record_template" api:"nullable"`
// Floating number to specify sampling rate. Sampling is applied on top of
// filtering, and regardless of the current `sample_interval` of the data.
SampleRate float64 `json:"sample_rate" api:"nullable"`
// String to specify the format for timestamps, such as `unixnano`, `unix`,
// `rfc3339`, `rfc3339ms` or `rfc3339ns`.
TimestampFormat OutputOptionsTimestampFormat `json:"timestamp_format"`
JSON outputOptionsJSON `json:"-"`
}
The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored.
func (*OutputOptions) UnmarshalJSON ¶
func (r *OutputOptions) UnmarshalJSON(data []byte) (err error)
type OutputOptionsOutputType ¶
type OutputOptionsOutputType string
Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.
const ( OutputOptionsOutputTypeNdjson OutputOptionsOutputType = "ndjson" OutputOptionsOutputTypeCsv OutputOptionsOutputType = "csv" )
func (OutputOptionsOutputType) IsKnown ¶
func (r OutputOptionsOutputType) IsKnown() bool
type OutputOptionsParam ¶
type OutputOptionsParam struct {
// String to be prepended before each batch.
BatchPrefix param.Field[string] `json:"batch_prefix"`
// String to be appended after each batch.
BatchSuffix param.Field[string] `json:"batch_suffix"`
// If set to true, will cause all occurrences of `${` in the generated files to be
// replaced with `x{`.
Cve2021_44228 param.Field[bool] `json:"CVE-2021-44228"`
// String to join fields. This field be ignored when `record_template` is set.
FieldDelimiter param.Field[string] `json:"field_delimiter"`
// List of field names to be included in the Logpush output. For the moment, there
// is no option to add all fields at once, so you must specify all the fields names
// you are interested in.
FieldNames param.Field[[]string] `json:"field_names"`
// If set to true, subrequests will be merged into the parent request. Only
// supported for the `http_requests` dataset.
MergeSubrequests param.Field[bool] `json:"merge_subrequests"`
// Specifies the output type, such as `ndjson` or `csv`. This sets default values
// for the rest of the settings, depending on the chosen output type. Some
// formatting rules, like string quoting, are different between output types.
OutputType param.Field[OutputOptionsOutputType] `json:"output_type"`
// String to be inserted in-between the records as separator.
RecordDelimiter param.Field[string] `json:"record_delimiter"`
// String to be prepended before each record.
RecordPrefix param.Field[string] `json:"record_prefix"`
// String to be appended after each record.
RecordSuffix param.Field[string] `json:"record_suffix"`
// String to use as template for each record instead of the default json key value
// mapping. All fields used in the template must be present in `field_names` as
// well, otherwise they will end up as null. Format as a Go `text/template` without
// any standard functions, like conditionals, loops, sub-templates, etc.
RecordTemplate param.Field[string] `json:"record_template"`
// Floating number to specify sampling rate. Sampling is applied on top of
// filtering, and regardless of the current `sample_interval` of the data.
SampleRate param.Field[float64] `json:"sample_rate"`
// String to specify the format for timestamps, such as `unixnano`, `unix`,
// `rfc3339`, `rfc3339ms` or `rfc3339ns`.
TimestampFormat param.Field[OutputOptionsTimestampFormat] `json:"timestamp_format"`
}
The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored.
func (OutputOptionsParam) MarshalJSON ¶
func (r OutputOptionsParam) MarshalJSON() (data []byte, err error)
type OutputOptionsTimestampFormat ¶
type OutputOptionsTimestampFormat string
String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.
const ( OutputOptionsTimestampFormatUnixnano OutputOptionsTimestampFormat = "unixnano" OutputOptionsTimestampFormatUnix OutputOptionsTimestampFormat = "unix" OutputOptionsTimestampFormatRfc3339 OutputOptionsTimestampFormat = "rfc3339" OutputOptionsTimestampFormatRfc3339ms OutputOptionsTimestampFormat = "rfc3339ms" OutputOptionsTimestampFormatRfc3339ns OutputOptionsTimestampFormat = "rfc3339ns" )
func (OutputOptionsTimestampFormat) IsKnown ¶
func (r OutputOptionsTimestampFormat) IsKnown() bool
type OwnershipNewParams ¶
type OwnershipNewParams struct {
// Uniquely identifies a resource (such as an s3 bucket) where data. will be
// pushed. Additional configuration parameters supported by the destination may be
// included.
DestinationConf param.Field[string] `json:"destination_conf" api:"required" format:"uri"`
// 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"`
}
func (OwnershipNewParams) MarshalJSON ¶
func (r OwnershipNewParams) MarshalJSON() (data []byte, err error)
type OwnershipNewResponse ¶
type OwnershipNewResponse struct {
Filename string `json:"filename"`
Message string `json:"message"`
Valid bool `json:"valid"`
JSON ownershipNewResponseJSON `json:"-"`
}
func (*OwnershipNewResponse) UnmarshalJSON ¶
func (r *OwnershipNewResponse) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelope ¶
type OwnershipNewResponseEnvelope struct {
Errors []OwnershipNewResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []OwnershipNewResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success OwnershipNewResponseEnvelopeSuccess `json:"success" api:"required"`
Result OwnershipNewResponse `json:"result" api:"nullable"`
JSON ownershipNewResponseEnvelopeJSON `json:"-"`
}
func (*OwnershipNewResponseEnvelope) UnmarshalJSON ¶
func (r *OwnershipNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelopeErrors ¶
type OwnershipNewResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source OwnershipNewResponseEnvelopeErrorsSource `json:"source"`
JSON ownershipNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*OwnershipNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OwnershipNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelopeErrorsSource ¶
type OwnershipNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON ownershipNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*OwnershipNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *OwnershipNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelopeMessages ¶
type OwnershipNewResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source OwnershipNewResponseEnvelopeMessagesSource `json:"source"`
JSON ownershipNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*OwnershipNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OwnershipNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelopeMessagesSource ¶
type OwnershipNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON ownershipNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*OwnershipNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *OwnershipNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelopeSuccess ¶
type OwnershipNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
OwnershipNewResponseEnvelopeSuccessTrue OwnershipNewResponseEnvelopeSuccess = true
)
func (OwnershipNewResponseEnvelopeSuccess) IsKnown ¶
func (r OwnershipNewResponseEnvelopeSuccess) IsKnown() bool
type OwnershipService ¶
type OwnershipService struct {
Options []option.RequestOption
}
OwnershipService 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 NewOwnershipService method instead.
func NewOwnershipService ¶
func NewOwnershipService(opts ...option.RequestOption) (r *OwnershipService)
NewOwnershipService 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 (*OwnershipService) New ¶
func (r *OwnershipService) New(ctx context.Context, params OwnershipNewParams, opts ...option.RequestOption) (res *OwnershipNewResponse, err error)
Gets a new ownership challenge sent to your destination.
func (*OwnershipService) Validate ¶
func (r *OwnershipService) Validate(ctx context.Context, params OwnershipValidateParams, opts ...option.RequestOption) (res *OwnershipValidation, err error)
Validates ownership challenge of the destination.
type OwnershipValidateParams ¶
type OwnershipValidateParams struct {
// Uniquely identifies a resource (such as an s3 bucket) where data. will be
// pushed. Additional configuration parameters supported by the destination may be
// included.
DestinationConf param.Field[string] `json:"destination_conf" api:"required" format:"uri"`
// Ownership challenge token to prove destination ownership.
OwnershipChallenge param.Field[string] `json:"ownership_challenge" api:"required"`
// 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"`
}
func (OwnershipValidateParams) MarshalJSON ¶
func (r OwnershipValidateParams) MarshalJSON() (data []byte, err error)
type OwnershipValidateResponseEnvelope ¶
type OwnershipValidateResponseEnvelope struct {
Errors []OwnershipValidateResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []OwnershipValidateResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success OwnershipValidateResponseEnvelopeSuccess `json:"success" api:"required"`
Result OwnershipValidation `json:"result" api:"nullable"`
JSON ownershipValidateResponseEnvelopeJSON `json:"-"`
}
func (*OwnershipValidateResponseEnvelope) UnmarshalJSON ¶
func (r *OwnershipValidateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OwnershipValidateResponseEnvelopeErrors ¶
type OwnershipValidateResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source OwnershipValidateResponseEnvelopeErrorsSource `json:"source"`
JSON ownershipValidateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*OwnershipValidateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OwnershipValidateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OwnershipValidateResponseEnvelopeErrorsSource ¶
type OwnershipValidateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON ownershipValidateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*OwnershipValidateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *OwnershipValidateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type OwnershipValidateResponseEnvelopeMessages ¶
type OwnershipValidateResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source OwnershipValidateResponseEnvelopeMessagesSource `json:"source"`
JSON ownershipValidateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*OwnershipValidateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OwnershipValidateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OwnershipValidateResponseEnvelopeMessagesSource ¶
type OwnershipValidateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON ownershipValidateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*OwnershipValidateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *OwnershipValidateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type OwnershipValidateResponseEnvelopeSuccess ¶
type OwnershipValidateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
OwnershipValidateResponseEnvelopeSuccessTrue OwnershipValidateResponseEnvelopeSuccess = true
)
func (OwnershipValidateResponseEnvelopeSuccess) IsKnown ¶
func (r OwnershipValidateResponseEnvelopeSuccess) IsKnown() bool
type OwnershipValidation ¶
type OwnershipValidation struct {
Valid bool `json:"valid"`
JSON ownershipValidationJSON `json:"-"`
}
func (*OwnershipValidation) UnmarshalJSON ¶
func (r *OwnershipValidation) UnmarshalJSON(data []byte) (err error)
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 RatePlanID ¶
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
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 ResponseInfoSource ¶
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
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 TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectString ¶
type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.
type TransformerContentGetParams ¶ added in v7.10.0
type TransformerContentGetParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Specific version ID to retrieve. When omitted, the latest version is returned.
VersionID param.Field[int64] `query:"version_id"`
}
func (TransformerContentGetParams) URLQuery ¶ added in v7.10.0
func (r TransformerContentGetParams) URLQuery() (v url.Values)
URLQuery serializes TransformerContentGetParams's query parameters as `url.Values`.
type TransformerContentGetResponse ¶ added in v7.10.0
type TransformerContentGetResponse struct {
// The SQL query content.
Content string `json:"content"`
JSON transformerContentGetResponseJSON `json:"-"`
}
func (*TransformerContentGetResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerContentGetResponse) UnmarshalJSON(data []byte) (err error)
type TransformerContentGetResponseEnvelope ¶ added in v7.10.0
type TransformerContentGetResponseEnvelope struct {
Errors []TransformerContentGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []TransformerContentGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success TransformerContentGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result TransformerContentGetResponse `json:"result"`
JSON transformerContentGetResponseEnvelopeJSON `json:"-"`
}
func (*TransformerContentGetResponseEnvelope) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerContentGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TransformerContentGetResponseEnvelopeErrors ¶ added in v7.10.0
type TransformerContentGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerContentGetResponseEnvelopeErrorsSource `json:"source"`
JSON transformerContentGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TransformerContentGetResponseEnvelopeErrors) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerContentGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TransformerContentGetResponseEnvelopeErrorsSource ¶ added in v7.10.0
type TransformerContentGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON transformerContentGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TransformerContentGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerContentGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TransformerContentGetResponseEnvelopeMessages ¶ added in v7.10.0
type TransformerContentGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerContentGetResponseEnvelopeMessagesSource `json:"source"`
JSON transformerContentGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TransformerContentGetResponseEnvelopeMessages) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerContentGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TransformerContentGetResponseEnvelopeMessagesSource ¶ added in v7.10.0
type TransformerContentGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON transformerContentGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TransformerContentGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerContentGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type TransformerContentGetResponseEnvelopeSuccess ¶ added in v7.10.0
type TransformerContentGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
TransformerContentGetResponseEnvelopeSuccessTrue TransformerContentGetResponseEnvelopeSuccess = true
)
func (TransformerContentGetResponseEnvelopeSuccess) IsKnown ¶ added in v7.10.0
func (r TransformerContentGetResponseEnvelopeSuccess) IsKnown() bool
type TransformerContentService ¶ added in v7.10.0
type TransformerContentService struct {
Options []option.RequestOption
}
TransformerContentService 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 NewTransformerContentService method instead.
func NewTransformerContentService ¶ added in v7.10.0
func NewTransformerContentService(opts ...option.RequestOption) (r *TransformerContentService)
NewTransformerContentService 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 (*TransformerContentService) Get ¶ added in v7.10.0
func (r *TransformerContentService) Get(ctx context.Context, transformerID int64, params TransformerContentGetParams, opts ...option.RequestOption) (res *TransformerContentGetResponse, err error)
Returns the SQL query content for a transformer. Without query params, returns the latest version. With `version_id`, returns the specified version.
type TransformerDeleteParams ¶ added in v7.10.0
type TransformerDeleteResponse ¶ added in v7.10.0
type TransformerDeleteResponse struct {
// The deleted transformer's ID.
ID int64 `json:"id"`
JSON transformerDeleteResponseJSON `json:"-"`
}
func (*TransformerDeleteResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerDeleteResponse) UnmarshalJSON(data []byte) (err error)
type TransformerDeleteResponseEnvelope ¶ added in v7.10.0
type TransformerDeleteResponseEnvelope struct {
Errors []TransformerDeleteResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []TransformerDeleteResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success TransformerDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
Result TransformerDeleteResponse `json:"result"`
JSON transformerDeleteResponseEnvelopeJSON `json:"-"`
}
func (*TransformerDeleteResponseEnvelope) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TransformerDeleteResponseEnvelopeErrors ¶ added in v7.10.0
type TransformerDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON transformerDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TransformerDeleteResponseEnvelopeErrors) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TransformerDeleteResponseEnvelopeErrorsSource ¶ added in v7.10.0
type TransformerDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON transformerDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TransformerDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TransformerDeleteResponseEnvelopeMessages ¶ added in v7.10.0
type TransformerDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON transformerDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TransformerDeleteResponseEnvelopeMessages) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TransformerDeleteResponseEnvelopeMessagesSource ¶ added in v7.10.0
type TransformerDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON transformerDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TransformerDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type TransformerDeleteResponseEnvelopeSuccess ¶ added in v7.10.0
type TransformerDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
TransformerDeleteResponseEnvelopeSuccessTrue TransformerDeleteResponseEnvelopeSuccess = true
)
func (TransformerDeleteResponseEnvelopeSuccess) IsKnown ¶ added in v7.10.0
func (r TransformerDeleteResponseEnvelopeSuccess) IsKnown() bool
type TransformerGetParams ¶ added in v7.10.0
type TransformerGetResponse ¶ added in v7.10.0
type TransformerGetResponse struct {
// The transformer ID.
ID int64 `json:"id"`
// Logpush jobs that reference this transformer.
AssociatedJobs []TransformerGetResponseAssociatedJob `json:"associated_jobs"`
// When the transformer was created (RFC 3339).
CreatedAt time.Time `json:"created_at" format:"date-time"`
// The dataset this transformer operates on, derived from the SQL query's FROM
// clause. Informational only. May be absent if the dataset cannot be determined
// from the query.
Dataset string `json:"dataset" api:"nullable"`
// Optional customer-provided description.
Description string `json:"description"`
// Customer-provided name for identification.
Name string `json:"name"`
// When the transformer was last modified (RFC 3339).
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON transformerGetResponseJSON `json:"-"`
}
func (*TransformerGetResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerGetResponse) UnmarshalJSON(data []byte) (err error)
type TransformerGetResponseAssociatedJob ¶ added in v7.10.0
type TransformerGetResponseAssociatedJob struct {
// The logpush job ID.
ID int64 `json:"id"`
// The logpush job destination name.
Name string `json:"name"`
// The zone or account tag.
ObjectTag string `json:"object_tag"`
// Whether the job is zone-scoped or account-scoped.
ObjectType TransformerGetResponseAssociatedJobsObjectType `json:"object_type"`
JSON transformerGetResponseAssociatedJobJSON `json:"-"`
}
func (*TransformerGetResponseAssociatedJob) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerGetResponseAssociatedJob) UnmarshalJSON(data []byte) (err error)
type TransformerGetResponseAssociatedJobsObjectType ¶ added in v7.10.0
type TransformerGetResponseAssociatedJobsObjectType string
Whether the job is zone-scoped or account-scoped.
const ( TransformerGetResponseAssociatedJobsObjectTypeZone TransformerGetResponseAssociatedJobsObjectType = "zone" TransformerGetResponseAssociatedJobsObjectTypeAccount TransformerGetResponseAssociatedJobsObjectType = "account" )
func (TransformerGetResponseAssociatedJobsObjectType) IsKnown ¶ added in v7.10.0
func (r TransformerGetResponseAssociatedJobsObjectType) IsKnown() bool
type TransformerGetResponseEnvelope ¶ added in v7.10.0
type TransformerGetResponseEnvelope struct {
Errors []TransformerGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []TransformerGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success TransformerGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result TransformerGetResponse `json:"result"`
JSON transformerGetResponseEnvelopeJSON `json:"-"`
}
func (*TransformerGetResponseEnvelope) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TransformerGetResponseEnvelopeErrors ¶ added in v7.10.0
type TransformerGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerGetResponseEnvelopeErrorsSource `json:"source"`
JSON transformerGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TransformerGetResponseEnvelopeErrors) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TransformerGetResponseEnvelopeErrorsSource ¶ added in v7.10.0
type TransformerGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON transformerGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TransformerGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TransformerGetResponseEnvelopeMessages ¶ added in v7.10.0
type TransformerGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerGetResponseEnvelopeMessagesSource `json:"source"`
JSON transformerGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TransformerGetResponseEnvelopeMessages) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TransformerGetResponseEnvelopeMessagesSource ¶ added in v7.10.0
type TransformerGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON transformerGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TransformerGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type TransformerGetResponseEnvelopeSuccess ¶ added in v7.10.0
type TransformerGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
TransformerGetResponseEnvelopeSuccessTrue TransformerGetResponseEnvelopeSuccess = true
)
func (TransformerGetResponseEnvelopeSuccess) IsKnown ¶ added in v7.10.0
func (r TransformerGetResponseEnvelopeSuccess) IsKnown() bool
type TransformerListParams ¶ added in v7.10.0
type TransformerListResponse ¶ added in v7.10.0
type TransformerListResponse struct {
// The transformer ID.
ID int64 `json:"id"`
// Logpush jobs that reference this transformer.
AssociatedJobs []TransformerListResponseAssociatedJob `json:"associated_jobs"`
// When the transformer was created (RFC 3339).
CreatedAt time.Time `json:"created_at" format:"date-time"`
// The dataset this transformer operates on, derived from the SQL query's FROM
// clause. Informational only. May be absent if the dataset cannot be determined
// from the query.
Dataset string `json:"dataset" api:"nullable"`
// Optional customer-provided description.
Description string `json:"description"`
// Customer-provided name for identification.
Name string `json:"name"`
// When the transformer was last modified (RFC 3339).
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON transformerListResponseJSON `json:"-"`
}
func (*TransformerListResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerListResponse) UnmarshalJSON(data []byte) (err error)
type TransformerListResponseAssociatedJob ¶ added in v7.10.0
type TransformerListResponseAssociatedJob struct {
// The logpush job ID.
ID int64 `json:"id"`
// The logpush job destination name.
Name string `json:"name"`
// The zone or account tag.
ObjectTag string `json:"object_tag"`
// Whether the job is zone-scoped or account-scoped.
ObjectType TransformerListResponseAssociatedJobsObjectType `json:"object_type"`
JSON transformerListResponseAssociatedJobJSON `json:"-"`
}
func (*TransformerListResponseAssociatedJob) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerListResponseAssociatedJob) UnmarshalJSON(data []byte) (err error)
type TransformerListResponseAssociatedJobsObjectType ¶ added in v7.10.0
type TransformerListResponseAssociatedJobsObjectType string
Whether the job is zone-scoped or account-scoped.
const ( TransformerListResponseAssociatedJobsObjectTypeZone TransformerListResponseAssociatedJobsObjectType = "zone" TransformerListResponseAssociatedJobsObjectTypeAccount TransformerListResponseAssociatedJobsObjectType = "account" )
func (TransformerListResponseAssociatedJobsObjectType) IsKnown ¶ added in v7.10.0
func (r TransformerListResponseAssociatedJobsObjectType) IsKnown() bool
type TransformerNewParams ¶ added in v7.10.0
type TransformerNewParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
// The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause
// referencing a valid logpush dataset.
Code param.Field[string] `json:"code" api:"required"`
// Customer-provided name for identification.
Name param.Field[string] `json:"name" api:"required"`
// Optional customer-provided description.
Description param.Field[string] `json:"description"`
}
func (TransformerNewParams) MarshalJSON ¶ added in v7.10.0
func (r TransformerNewParams) MarshalJSON() (data []byte, err error)
type TransformerNewResponse ¶ added in v7.10.0
type TransformerNewResponse struct {
// The transformer ID.
ID int64 `json:"id"`
// Logpush jobs that reference this transformer.
AssociatedJobs []TransformerNewResponseAssociatedJob `json:"associated_jobs"`
// When the transformer was created (RFC 3339).
CreatedAt time.Time `json:"created_at" format:"date-time"`
// The dataset this transformer operates on, derived from the SQL query's FROM
// clause. Informational only. May be absent if the dataset cannot be determined
// from the query.
Dataset string `json:"dataset" api:"nullable"`
// Optional customer-provided description.
Description string `json:"description"`
// Customer-provided name for identification.
Name string `json:"name"`
// When the transformer was last modified (RFC 3339).
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON transformerNewResponseJSON `json:"-"`
}
func (*TransformerNewResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerNewResponse) UnmarshalJSON(data []byte) (err error)
type TransformerNewResponseAssociatedJob ¶ added in v7.10.0
type TransformerNewResponseAssociatedJob struct {
// The logpush job ID.
ID int64 `json:"id"`
// The logpush job destination name.
Name string `json:"name"`
// The zone or account tag.
ObjectTag string `json:"object_tag"`
// Whether the job is zone-scoped or account-scoped.
ObjectType TransformerNewResponseAssociatedJobsObjectType `json:"object_type"`
JSON transformerNewResponseAssociatedJobJSON `json:"-"`
}
func (*TransformerNewResponseAssociatedJob) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerNewResponseAssociatedJob) UnmarshalJSON(data []byte) (err error)
type TransformerNewResponseAssociatedJobsObjectType ¶ added in v7.10.0
type TransformerNewResponseAssociatedJobsObjectType string
Whether the job is zone-scoped or account-scoped.
const ( TransformerNewResponseAssociatedJobsObjectTypeZone TransformerNewResponseAssociatedJobsObjectType = "zone" TransformerNewResponseAssociatedJobsObjectTypeAccount TransformerNewResponseAssociatedJobsObjectType = "account" )
func (TransformerNewResponseAssociatedJobsObjectType) IsKnown ¶ added in v7.10.0
func (r TransformerNewResponseAssociatedJobsObjectType) IsKnown() bool
type TransformerNewResponseEnvelope ¶ added in v7.10.0
type TransformerNewResponseEnvelope struct {
Errors []TransformerNewResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []TransformerNewResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success TransformerNewResponseEnvelopeSuccess `json:"success" api:"required"`
Result TransformerNewResponse `json:"result"`
JSON transformerNewResponseEnvelopeJSON `json:"-"`
}
func (*TransformerNewResponseEnvelope) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TransformerNewResponseEnvelopeErrors ¶ added in v7.10.0
type TransformerNewResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerNewResponseEnvelopeErrorsSource `json:"source"`
JSON transformerNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TransformerNewResponseEnvelopeErrors) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TransformerNewResponseEnvelopeErrorsSource ¶ added in v7.10.0
type TransformerNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON transformerNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TransformerNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TransformerNewResponseEnvelopeMessages ¶ added in v7.10.0
type TransformerNewResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerNewResponseEnvelopeMessagesSource `json:"source"`
JSON transformerNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TransformerNewResponseEnvelopeMessages) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TransformerNewResponseEnvelopeMessagesSource ¶ added in v7.10.0
type TransformerNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON transformerNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TransformerNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type TransformerNewResponseEnvelopeSuccess ¶ added in v7.10.0
type TransformerNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
TransformerNewResponseEnvelopeSuccessTrue TransformerNewResponseEnvelopeSuccess = true
)
func (TransformerNewResponseEnvelopeSuccess) IsKnown ¶ added in v7.10.0
func (r TransformerNewResponseEnvelopeSuccess) IsKnown() bool
type TransformerPreviewParams ¶ added in v7.10.0
type TransformerPreviewParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
// A single log record to transform (JSON object).
Input param.Field[map[string]interface{}] `json:"input" api:"required"`
// The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause
// referencing a valid logpush dataset.
Sql param.Field[string] `json:"sql" api:"required"`
}
func (TransformerPreviewParams) MarshalJSON ¶ added in v7.10.0
func (r TransformerPreviewParams) MarshalJSON() (data []byte, err error)
type TransformerPreviewResponse ¶ added in v7.10.0
type TransformerPreviewResponse map[string]interface{}
type TransformerService ¶ added in v7.10.0
type TransformerService struct {
Options []option.RequestOption
Content *TransformerContentService
Versions *TransformerVersionService
}
TransformerService 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 NewTransformerService method instead.
func NewTransformerService ¶ added in v7.10.0
func NewTransformerService(opts ...option.RequestOption) (r *TransformerService)
NewTransformerService 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 (*TransformerService) Delete ¶ added in v7.10.0
func (r *TransformerService) Delete(ctx context.Context, transformerID int64, body TransformerDeleteParams, opts ...option.RequestOption) (res *TransformerDeleteResponse, err error)
Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.
func (*TransformerService) Get ¶ added in v7.10.0
func (r *TransformerService) Get(ctx context.Context, transformerID int64, query TransformerGetParams, opts ...option.RequestOption) (res *TransformerGetResponse, err error)
Gets a single custom log transformer by ID.
func (*TransformerService) List ¶ added in v7.10.0
func (r *TransformerService) List(ctx context.Context, query TransformerListParams, opts ...option.RequestOption) (res *pagination.SinglePage[TransformerListResponse], err error)
Lists all custom log transformers for an account.
func (*TransformerService) ListAutoPaging ¶ added in v7.10.0
func (r *TransformerService) ListAutoPaging(ctx context.Context, query TransformerListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TransformerListResponse]
Lists all custom log transformers for an account.
func (*TransformerService) New ¶ added in v7.10.0
func (r *TransformerService) New(ctx context.Context, params TransformerNewParams, opts ...option.RequestOption) (res *TransformerNewResponse, err error)
Creates a new custom log transformer for an account.
func (*TransformerService) Preview ¶ added in v7.10.0
func (r *TransformerService) Preview(ctx context.Context, params TransformerPreviewParams, opts ...option.RequestOption) (res *pagination.SinglePage[TransformerPreviewResponse], err error)
Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.
func (*TransformerService) PreviewAutoPaging ¶ added in v7.10.0
func (r *TransformerService) PreviewAutoPaging(ctx context.Context, params TransformerPreviewParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TransformerPreviewResponse]
Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.
func (*TransformerService) Update ¶ added in v7.10.0
func (r *TransformerService) Update(ctx context.Context, transformerID int64, params TransformerUpdateParams, opts ...option.RequestOption) (res *TransformerUpdateResponse, err error)
Updates an existing custom log transformer. When `code` is provided, the SQL query is validated and a new version is created. When `code` is omitted, only the name and description are updated. Omitting `description` clears the existing description.
type TransformerUpdateParams ¶ added in v7.10.0
type TransformerUpdateParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Customer-provided name for identification.
Name param.Field[string] `json:"name" api:"required"`
// The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause
// referencing a valid logpush dataset.
Code param.Field[string] `json:"code"`
// Optional customer-provided description.
Description param.Field[string] `json:"description"`
}
func (TransformerUpdateParams) MarshalJSON ¶ added in v7.10.0
func (r TransformerUpdateParams) MarshalJSON() (data []byte, err error)
type TransformerUpdateResponse ¶ added in v7.10.0
type TransformerUpdateResponse struct {
// The transformer ID.
ID int64 `json:"id"`
// Logpush jobs that reference this transformer.
AssociatedJobs []TransformerUpdateResponseAssociatedJob `json:"associated_jobs"`
// When the transformer was created (RFC 3339).
CreatedAt time.Time `json:"created_at" format:"date-time"`
// The dataset this transformer operates on, derived from the SQL query's FROM
// clause. Informational only. May be absent if the dataset cannot be determined
// from the query.
Dataset string `json:"dataset" api:"nullable"`
// Optional customer-provided description.
Description string `json:"description"`
// Customer-provided name for identification.
Name string `json:"name"`
// When the transformer was last modified (RFC 3339).
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON transformerUpdateResponseJSON `json:"-"`
}
func (*TransformerUpdateResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerUpdateResponse) UnmarshalJSON(data []byte) (err error)
type TransformerUpdateResponseAssociatedJob ¶ added in v7.10.0
type TransformerUpdateResponseAssociatedJob struct {
// The logpush job ID.
ID int64 `json:"id"`
// The logpush job destination name.
Name string `json:"name"`
// The zone or account tag.
ObjectTag string `json:"object_tag"`
// Whether the job is zone-scoped or account-scoped.
ObjectType TransformerUpdateResponseAssociatedJobsObjectType `json:"object_type"`
JSON transformerUpdateResponseAssociatedJobJSON `json:"-"`
}
func (*TransformerUpdateResponseAssociatedJob) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerUpdateResponseAssociatedJob) UnmarshalJSON(data []byte) (err error)
type TransformerUpdateResponseAssociatedJobsObjectType ¶ added in v7.10.0
type TransformerUpdateResponseAssociatedJobsObjectType string
Whether the job is zone-scoped or account-scoped.
const ( TransformerUpdateResponseAssociatedJobsObjectTypeZone TransformerUpdateResponseAssociatedJobsObjectType = "zone" TransformerUpdateResponseAssociatedJobsObjectTypeAccount TransformerUpdateResponseAssociatedJobsObjectType = "account" )
func (TransformerUpdateResponseAssociatedJobsObjectType) IsKnown ¶ added in v7.10.0
func (r TransformerUpdateResponseAssociatedJobsObjectType) IsKnown() bool
type TransformerUpdateResponseEnvelope ¶ added in v7.10.0
type TransformerUpdateResponseEnvelope struct {
Errors []TransformerUpdateResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []TransformerUpdateResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success TransformerUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
Result TransformerUpdateResponse `json:"result"`
JSON transformerUpdateResponseEnvelopeJSON `json:"-"`
}
func (*TransformerUpdateResponseEnvelope) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TransformerUpdateResponseEnvelopeErrors ¶ added in v7.10.0
type TransformerUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON transformerUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TransformerUpdateResponseEnvelopeErrors) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TransformerUpdateResponseEnvelopeErrorsSource ¶ added in v7.10.0
type TransformerUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON transformerUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TransformerUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TransformerUpdateResponseEnvelopeMessages ¶ added in v7.10.0
type TransformerUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source TransformerUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON transformerUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TransformerUpdateResponseEnvelopeMessages) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TransformerUpdateResponseEnvelopeMessagesSource ¶ added in v7.10.0
type TransformerUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON transformerUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TransformerUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type TransformerUpdateResponseEnvelopeSuccess ¶ added in v7.10.0
type TransformerUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
TransformerUpdateResponseEnvelopeSuccessTrue TransformerUpdateResponseEnvelopeSuccess = true
)
func (TransformerUpdateResponseEnvelopeSuccess) IsKnown ¶ added in v7.10.0
func (r TransformerUpdateResponseEnvelopeSuccess) IsKnown() bool
type TransformerVersionListParams ¶ added in v7.10.0
type TransformerVersionListParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Maximum number of versions to return.
Limit param.Field[int64] `query:"limit"`
}
func (TransformerVersionListParams) URLQuery ¶ added in v7.10.0
func (r TransformerVersionListParams) URLQuery() (v url.Values)
URLQuery serializes TransformerVersionListParams's query parameters as `url.Values`.
type TransformerVersionListResponse ¶ added in v7.10.0
type TransformerVersionListResponse struct {
// Unique identifier for this version.
ID int64 `json:"id"`
// When this version was created (RFC 3339).
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Sequential version number.
Version int64 `json:"version"`
JSON transformerVersionListResponseJSON `json:"-"`
}
func (*TransformerVersionListResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *TransformerVersionListResponse) UnmarshalJSON(data []byte) (err error)
type TransformerVersionService ¶ added in v7.10.0
type TransformerVersionService struct {
Options []option.RequestOption
}
TransformerVersionService 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 NewTransformerVersionService method instead.
func NewTransformerVersionService ¶ added in v7.10.0
func NewTransformerVersionService(opts ...option.RequestOption) (r *TransformerVersionService)
NewTransformerVersionService 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 (*TransformerVersionService) List ¶ added in v7.10.0
func (r *TransformerVersionService) List(ctx context.Context, transformerID int64, params TransformerVersionListParams, opts ...option.RequestOption) (res *pagination.SinglePage[TransformerVersionListResponse], err error)
Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.
func (*TransformerVersionService) ListAutoPaging ¶ added in v7.10.0
func (r *TransformerVersionService) ListAutoPaging(ctx context.Context, transformerID int64, params TransformerVersionListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TransformerVersionListResponse]
Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.
type ValidateDestinationExistsParams ¶
type ValidateDestinationExistsParams struct {
// Uniquely identifies a resource (such as an s3 bucket) where data. will be
// pushed. Additional configuration parameters supported by the destination may be
// included.
DestinationConf param.Field[string] `json:"destination_conf" api:"required" format:"uri"`
// 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"`
}
func (ValidateDestinationExistsParams) MarshalJSON ¶
func (r ValidateDestinationExistsParams) MarshalJSON() (data []byte, err error)
type ValidateDestinationExistsResponse ¶
type ValidateDestinationExistsResponse struct {
Exists bool `json:"exists"`
JSON validateDestinationExistsResponseJSON `json:"-"`
}
func (*ValidateDestinationExistsResponse) UnmarshalJSON ¶
func (r *ValidateDestinationExistsResponse) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationExistsResponseEnvelope ¶
type ValidateDestinationExistsResponseEnvelope struct {
Errors []ValidateDestinationExistsResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []ValidateDestinationExistsResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success ValidateDestinationExistsResponseEnvelopeSuccess `json:"success" api:"required"`
Result ValidateDestinationExistsResponse `json:"result" api:"nullable"`
JSON validateDestinationExistsResponseEnvelopeJSON `json:"-"`
}
func (*ValidateDestinationExistsResponseEnvelope) UnmarshalJSON ¶
func (r *ValidateDestinationExistsResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationExistsResponseEnvelopeErrors ¶
type ValidateDestinationExistsResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source ValidateDestinationExistsResponseEnvelopeErrorsSource `json:"source"`
JSON validateDestinationExistsResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ValidateDestinationExistsResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ValidateDestinationExistsResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationExistsResponseEnvelopeErrorsSource ¶
type ValidateDestinationExistsResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON validateDestinationExistsResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*ValidateDestinationExistsResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *ValidateDestinationExistsResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationExistsResponseEnvelopeMessages ¶
type ValidateDestinationExistsResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source ValidateDestinationExistsResponseEnvelopeMessagesSource `json:"source"`
JSON validateDestinationExistsResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ValidateDestinationExistsResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ValidateDestinationExistsResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationExistsResponseEnvelopeMessagesSource ¶
type ValidateDestinationExistsResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON validateDestinationExistsResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*ValidateDestinationExistsResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *ValidateDestinationExistsResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationExistsResponseEnvelopeSuccess ¶
type ValidateDestinationExistsResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
ValidateDestinationExistsResponseEnvelopeSuccessTrue ValidateDestinationExistsResponseEnvelopeSuccess = true
)
func (ValidateDestinationExistsResponseEnvelopeSuccess) IsKnown ¶
func (r ValidateDestinationExistsResponseEnvelopeSuccess) IsKnown() bool
type ValidateDestinationParams ¶
type ValidateDestinationParams struct {
// Uniquely identifies a resource (such as an s3 bucket) where data. will be
// pushed. Additional configuration parameters supported by the destination may be
// included.
DestinationConf param.Field[string] `json:"destination_conf" api:"required" format:"uri"`
// 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"`
}
func (ValidateDestinationParams) MarshalJSON ¶
func (r ValidateDestinationParams) MarshalJSON() (data []byte, err error)
type ValidateDestinationResponse ¶
type ValidateDestinationResponse struct {
Message string `json:"message"`
Valid bool `json:"valid"`
JSON validateDestinationResponseJSON `json:"-"`
}
func (*ValidateDestinationResponse) UnmarshalJSON ¶
func (r *ValidateDestinationResponse) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelope ¶
type ValidateDestinationResponseEnvelope struct {
Errors []ValidateDestinationResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []ValidateDestinationResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success ValidateDestinationResponseEnvelopeSuccess `json:"success" api:"required"`
Result ValidateDestinationResponse `json:"result" api:"nullable"`
JSON validateDestinationResponseEnvelopeJSON `json:"-"`
}
func (*ValidateDestinationResponseEnvelope) UnmarshalJSON ¶
func (r *ValidateDestinationResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelopeErrors ¶
type ValidateDestinationResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source ValidateDestinationResponseEnvelopeErrorsSource `json:"source"`
JSON validateDestinationResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ValidateDestinationResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ValidateDestinationResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelopeErrorsSource ¶
type ValidateDestinationResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON validateDestinationResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*ValidateDestinationResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *ValidateDestinationResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelopeMessages ¶
type ValidateDestinationResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source ValidateDestinationResponseEnvelopeMessagesSource `json:"source"`
JSON validateDestinationResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ValidateDestinationResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ValidateDestinationResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelopeMessagesSource ¶
type ValidateDestinationResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON validateDestinationResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*ValidateDestinationResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *ValidateDestinationResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelopeSuccess ¶
type ValidateDestinationResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
ValidateDestinationResponseEnvelopeSuccessTrue ValidateDestinationResponseEnvelopeSuccess = true
)
func (ValidateDestinationResponseEnvelopeSuccess) IsKnown ¶
func (r ValidateDestinationResponseEnvelopeSuccess) IsKnown() bool
type ValidateOriginParams ¶
type ValidateOriginParams struct {
// This field is deprecated. Use `output_options` instead. Configuration string. It
// specifies things like requested fields and timestamp formats. If migrating from
// the logpull api, copy the url (full url or just the query string) of your call
// here, and logpush will keep on making this call for you, setting start and end
// times appropriately.
LogpullOptions param.Field[string] `json:"logpull_options" api:"required" format:"uri-reference"`
// 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"`
}
func (ValidateOriginParams) MarshalJSON ¶
func (r ValidateOriginParams) MarshalJSON() (data []byte, err error)
type ValidateOriginResponse ¶
type ValidateOriginResponse struct {
Message string `json:"message"`
Valid bool `json:"valid"`
JSON validateOriginResponseJSON `json:"-"`
}
func (*ValidateOriginResponse) UnmarshalJSON ¶
func (r *ValidateOriginResponse) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelope ¶
type ValidateOriginResponseEnvelope struct {
Errors []ValidateOriginResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []ValidateOriginResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success ValidateOriginResponseEnvelopeSuccess `json:"success" api:"required"`
Result ValidateOriginResponse `json:"result" api:"nullable"`
JSON validateOriginResponseEnvelopeJSON `json:"-"`
}
func (*ValidateOriginResponseEnvelope) UnmarshalJSON ¶
func (r *ValidateOriginResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelopeErrors ¶
type ValidateOriginResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source ValidateOriginResponseEnvelopeErrorsSource `json:"source"`
JSON validateOriginResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ValidateOriginResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ValidateOriginResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelopeErrorsSource ¶
type ValidateOriginResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON validateOriginResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*ValidateOriginResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *ValidateOriginResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelopeMessages ¶
type ValidateOriginResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source ValidateOriginResponseEnvelopeMessagesSource `json:"source"`
JSON validateOriginResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ValidateOriginResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ValidateOriginResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelopeMessagesSource ¶
type ValidateOriginResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON validateOriginResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*ValidateOriginResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *ValidateOriginResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelopeSuccess ¶
type ValidateOriginResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
ValidateOriginResponseEnvelopeSuccessTrue ValidateOriginResponseEnvelopeSuccess = true
)
func (ValidateOriginResponseEnvelopeSuccess) IsKnown ¶
func (r ValidateOriginResponseEnvelopeSuccess) IsKnown() bool
type ValidateService ¶
type ValidateService struct {
Options []option.RequestOption
}
ValidateService 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 NewValidateService method instead.
func NewValidateService ¶
func NewValidateService(opts ...option.RequestOption) (r *ValidateService)
NewValidateService 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 (*ValidateService) Destination ¶
func (r *ValidateService) Destination(ctx context.Context, params ValidateDestinationParams, opts ...option.RequestOption) (res *ValidateDestinationResponse, err error)
Validates destination.
func (*ValidateService) DestinationExists ¶
func (r *ValidateService) DestinationExists(ctx context.Context, params ValidateDestinationExistsParams, opts ...option.RequestOption) (res *ValidateDestinationExistsResponse, err error)
Checks if there is an existing job with a destination.
func (*ValidateService) Origin ¶
func (r *ValidateService) Origin(ctx context.Context, params ValidateOriginParams, opts ...option.RequestOption) (res *ValidateOriginResponse, err error)
Validates logpull origin with logpull_options.