cloudflare

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package cloudflare provides the Cloudflare integration definition for integrations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAPITokenMissing indicates the Cloudflare API token is missing from the credential
	ErrAPITokenMissing = errors.New("cloudflare: api token missing")
	// ErrCredentialInvalid indicates credential metadata could not be decoded
	ErrCredentialInvalid = errors.New("cloudflare: credential invalid")
	// ErrTokenVerificationFailed indicates the Cloudflare token verification failed
	ErrTokenVerificationFailed = errors.New("cloudflare: token verification failed")
	// ErrTokenNotActive indicates the Cloudflare token is not in an active state
	ErrTokenNotActive = errors.New("cloudflare: token is not active")
	// ErrClientType indicates the provided client is not a Cloudflare client
	ErrClientType = errors.New("cloudflare: unexpected client type")
	// ErrResultEncode indicates an operation result could not be serialized
	ErrResultEncode = errors.New("cloudflare: result encode failed")
	// ErrMembersFetchFailed indicates the account members list request failed
	ErrMembersFetchFailed = errors.New("cloudflare: members fetch failed")
	// ErrPayloadEncode indicates a collected Cloudflare payload could not be serialized for ingest
	ErrPayloadEncode = errors.New("cloudflare: ingest payload encode failed")
	// ErrAccountIDMissing indicates the account ID is missing from user input
	ErrAccountIDMissing = errors.New("cloudflare: account id missing")
)

Functions

func Builder

func Builder() registry.Builder

Builder returns the Cloudflare definition builder

Types

type Client

type Client struct{}

Client builds Cloudflare API clients for one installation

func (Client) Build

Build constructs the Cloudflare API client for one installation

type CredentialSchema

type CredentialSchema struct {
	// APIToken is the Cloudflare API token with permissions to read account and zone metadata
	APIToken string `json:"apiToken"          jsonschema:"required,title=API Token"`
}

CredentialSchema holds the Cloudflare API credentials for one installation

type DirectorySync

type DirectorySync struct{}

DirectorySync collects Cloudflare account members for directory account ingest

func (DirectorySync) IngestHandle

func (d DirectorySync) IngestHandle() types.IngestHandler

IngestHandle adapts directory sync to the ingest operation registration boundary

func (DirectorySync) Run

Run collects Cloudflare account members and emits directory account ingest payloads

type HealthCheck

type HealthCheck struct {
	// Status is the token verification status returned by Cloudflare
	Status string `json:"status,omitempty"`
	// ExpiresOn is the token expiry time if set
	ExpiresOn string `json:"expiresOn,omitempty"`
}

HealthCheck holds the result of a Cloudflare health check

func (HealthCheck) Handle

func (h HealthCheck) Handle() types.OperationHandler

Handle adapts the health check to the generic operation registration boundary

func (HealthCheck) Run

Run executes the Cloudflare token verification

type InstallationMetadata

type InstallationMetadata struct {
	// AccountID is the Cloudflare account identifier used for account-scoped collection
	AccountID string `json:"accountId,omitempty" jsonschema:"title=Account ID"`
}

InstallationMetadata holds the stable Cloudflare account identity for one installation

func (InstallationMetadata) InstallationIdentity

InstallationIdentity implements types.InstallationIdentifiable

type UserInput

type UserInput struct {
	// AccountID is the Cloudflare account identifier used for account-scoped API calls
	AccountID string `` /* 137-byte string literal not displayed */
	// FilterExpr limits imported records to envelopes matching the CEL expression
	FilterExpr string `` /* 173-byte string literal not displayed */
}

UserInput holds installation-specific configuration collected from the user

Jump to

Keyboard shortcuts

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