Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type Client
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type Client ¶
type Client struct {
Options []option.RequestOption
Accounts *accounts.AccountService
OriginCACertificates *origin_ca_certificates.OriginCACertificateService
IPs *ips.IPService
Memberships *memberships.MembershipService
User *user.UserService
Zones *zones.ZoneService
LoadBalancers *load_balancers.LoadBalancerService
Cache *cache.CacheService
SSL *ssl.SSLService
Subscriptions *subscriptions.SubscriptionService
ACM *acm.ACMService
Argo *argo.ArgoService
Plans *plans.PlanService
RatePlans *rate_plans.RatePlanService
CertificateAuthorities *certificate_authorities.CertificateAuthorityService
ClientCertificates *client_certificates.ClientCertificateService
CustomCertificates *custom_certificates.CustomCertificateService
CustomHostnames *custom_hostnames.CustomHostnameService
CustomNameservers *custom_nameservers.CustomNameserverService
DNS *dns.DNSService
DNSSEC *dnssec.DNSSECService
EmailRouting *email_routing.EmailRoutingService
Filters *filters.FilterService
Firewall *firewall.FirewallService
Healthchecks *healthchecks.HealthcheckService
KeylessCertificates *keyless_certificates.KeylessCertificateService
Logpush *logpush.LogpushService
Logs *logs.LogService
OriginTLSClientAuth *origin_tls_client_auth.OriginTLSClientAuthService
Pagerules *pagerules.PageruleService
RateLimits *rate_limits.RateLimitService
SecondaryDNS *secondary_dns.SecondaryDNSService
WaitingRooms *waiting_rooms.WaitingRoomService
Web3 *web3.Web3Service
Workers *workers.WorkerService
KV *kv.KVService
DurableObjects *durable_objects.DurableObjectService
Queues *queues.QueueService
ManagedHeaders *managed_headers.ManagedHeaderService
PageShield *page_shield.PageShieldService
Rulesets *rulesets.RulesetService
URLNormalization *url_normalization.URLNormalizationService
Spectrum *spectrum.SpectrumService
Addressing *addressing.AddressingService
AuditLogs *audit_logs.AuditLogService
Billing *billing.BillingService
BrandProtection *brand_protection.BrandProtectionService
Diagnostics *diagnostics.DiagnosticService
Images *images.ImageService
Intel *intel.IntelService
MagicTransit *magic_transit.MagicTransitService
MagicNetworkMonitoring *magic_network_monitoring.MagicNetworkMonitoringService
MTLSCertificates *mtls_certificates.MTLSCertificateService
Pages *pages.PageService
PCAPs *pcaps.PCAPService
Registrar *registrar.RegistrarService
RequestTracers *request_tracers.RequestTracerService
Rules *rules.RuleService
Storage *storage.StorageService
Stream *stream.StreamService
Alerting *alerting.AlertingService
D1 *d1.D1Service
R2 *r2.R2Service
WARPConnector *warp_connector.WARPConnectorService
WorkersForPlatforms *workers_for_platforms.WorkersForPlatformService
ZeroTrust *zero_trust.ZeroTrustService
Challenges *challenges.ChallengeService
Hyperdrive *hyperdrive.HyperdriveService
RUM *rum.RUMService
Vectorize *vectorize.VectorizeService
URLScanner *url_scanner.URLScannerService
Radar *radar.RadarService
BotManagement *bot_management.BotManagementService
OriginPostQuantumEncryption *origin_post_quantum_encryption.OriginPostQuantumEncryptionService
Speed *speed.SpeedService
DCVDelegation *dcv_delegation.DCVDelegationService
Hostnames *hostnames.HostnameService
Snippets *snippets.SnippetService
Calls *calls.CallService
CloudforceOne *cloudforce_one.CloudforceOneService
}
Client creates a struct with services and top level methods that help with interacting with the cloudflare API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (CLOUDFLARE_API_KEY, CLOUDFLARE_EMAIL, CLOUDFLARE_API_TOKEN, CLOUDFLARE_API_USER_SERVICE_KEY). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.