Documentation
¶
Overview ¶
Package cloudflare provides the Cloudflare integration definition for integrations
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
Types ¶
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
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 ¶
func (HealthCheck) Run(ctx context.Context, c *cf.Client) (json.RawMessage, error)
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 ¶
func (m InstallationMetadata) InstallationIdentity() types.IntegrationInstallationIdentity
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