cloudflare

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DNSRecordPayloadType = "cloudflare.dnsRecord"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Token string

	BaseURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CreateDNSRecord added in v0.6.0

func (c *Client) CreateDNSRecord(zoneID string, req CreateDNSRecordRequest) (*DNSRecord, error)

func (*Client) CreateKVNamespace added in v0.20.0

func (c *Client) CreateKVNamespace(accountID string, req CreateKVNamespaceRequest) (*KVNamespace, error)

CreateKVNamespace creates a new Workers KV namespace under a Cloudflare account

func (*Client) CreateOriginRule added in v0.20.0

func (c *Client) CreateOriginRule(zoneID, rulesetID string, req OriginRule) (*OriginRule, error)

func (*Client) CreateOriginRuleset added in v0.20.0

func (c *Client) CreateOriginRuleset(zoneID string, req CreateOriginRulesetRequest) (*OriginRuleset, error)

func (*Client) CreatePool added in v0.20.0

func (c *Client) CreatePool(accountID string, req CreatePoolRequest) (*Pool, error)

CreatePool creates a new origin pool under a Cloudflare account

func (*Client) CreateRedirectRule

func (c *Client) CreateRedirectRule(zoneID, rulesetID string, req CreateRedirectRuleRequest) (*RedirectRule, error)

CreateRedirectRule creates a new redirect rule in a zone's ruleset

func (*Client) DeleteDNSRecord added in v0.6.0

func (c *Client) DeleteDNSRecord(zoneID, recordID string) (*DNSRecord, error)

DeleteDNSRecord deletes a DNS record by its ID within a zone. It returns the deleted DNS record (Cloudflare API returns it in result).

func (*Client) DeleteKVNamespace added in v0.20.0

func (c *Client) DeleteKVNamespace(accountID, namespaceID string) error

DeleteKVNamespace deletes a Workers KV namespace

func (*Client) DeleteKVValue added in v0.20.0

func (c *Client) DeleteKVValue(accountID, namespaceID, key string) error

DeleteKVValue deletes a key-value pair from a Workers KV namespace

func (*Client) DeleteOriginRule added in v0.20.0

func (c *Client) DeleteOriginRule(zoneID, rulesetID, ruleID string) (*OriginRule, error)

func (*Client) DeletePool added in v0.20.0

func (c *Client) DeletePool(accountID, poolID string) error

DeletePool deletes an origin pool by ID for a given account

func (*Client) GetDNSRecord added in v0.6.0

func (c *Client) GetDNSRecord(zoneID, recordID string) (*DNSRecord, error)

GetDNSRecord retrieves a DNS record by ID from a zone

func (*Client) GetKVNamespace added in v0.20.0

func (c *Client) GetKVNamespace(accountID, namespaceID string) (*KVNamespace, error)

GetKVNamespace retrieves a single Workers KV namespace by ID

func (*Client) GetKVValue added in v0.20.0

func (c *Client) GetKVValue(accountID, namespaceID, key string) (string, error)

GetKVValue retrieves the value for a key from a Workers KV namespace. The Cloudflare API returns the raw value as the response body (not a JSON envelope).

func (*Client) GetOriginRulesetForPhase added in v0.20.0

func (c *Client) GetOriginRulesetForPhase(zoneID string) (*OriginRuleset, error)

func (*Client) GetPool added in v0.20.0

func (c *Client) GetPool(accountID, poolID string) (*Pool, error)

GetPool retrieves an origin pool by ID for a given account

func (*Client) GetRulesetForPhase

func (c *Client) GetRulesetForPhase(zoneID, phase string) (*Ruleset, error)

GetRulesetForPhase gets the ruleset ID for a specific phase in a zone

func (*Client) ListDNSRecords added in v0.6.0

func (c *Client) ListDNSRecords(zoneID string) ([]DNSRecord, error)

ListDNSRecords retrieves all DNS records for a zone

func (*Client) ListKVKeys added in v0.20.0

func (c *Client) ListKVKeys(accountID, namespaceID string) ([]KVKey, error)

ListKVKeys returns all keys in a Workers KV namespace

func (*Client) ListKVNamespaces added in v0.20.0

func (c *Client) ListKVNamespaces(accountID string) ([]KVNamespace, error)

ListKVNamespaces returns all Workers KV namespaces for an account

func (*Client) ListMonitors added in v0.20.0

func (c *Client) ListMonitors(accountID string) ([]PoolMonitor, error)

ListMonitors lists all health monitors for a Cloudflare account

func (*Client) ListOriginRules added in v0.20.0

func (c *Client) ListOriginRules(zoneID string) ([]OriginRule, error)

func (*Client) ListPools added in v0.20.0

func (c *Client) ListPools(accountID string) ([]Pool, error)

ListPools lists all origin pools for a Cloudflare account

func (*Client) ListRedirectRules

func (c *Client) ListRedirectRules(zoneID string) ([]RedirectRule, error)

ListRedirectRules retrieves all redirect rules for a zone

func (*Client) ListZones

func (c *Client) ListZones() ([]Zone, error)

ListZones retrieves all zones accessible with the API token

func (*Client) PutKVValue added in v0.20.0

func (c *Client) PutKVValue(accountID, namespaceID, key, value string, expirationTTL *int) error

PutKVValue writes a key-value pair to a Workers KV namespace using multipart/form-data

func (*Client) UpdateDNSRecord added in v0.6.0

func (c *Client) UpdateDNSRecord(zoneID, recordID string, req UpdateDNSRecordRequest) (*DNSRecord, error)

UpdateDNSRecord updates an existing DNS record in a zone.

func (*Client) UpdateOriginRule added in v0.20.0

func (c *Client) UpdateOriginRule(zoneID, rulesetID, ruleID string, req OriginRule) (*OriginRule, error)

func (*Client) UpdatePool added in v0.20.0

func (c *Client) UpdatePool(accountID, poolID string, req UpdatePoolRequest) (*Pool, error)

UpdatePool updates an existing origin pool under a Cloudflare account

func (*Client) UpdateRedirectRule

func (c *Client) UpdateRedirectRule(zoneID, rulesetID, ruleID string, req UpdateRedirectRuleRequest) (*RedirectRule, error)

UpdateRedirectRule updates a specific redirect rule in a zone's ruleset

type Cloudflare

type Cloudflare struct{}

func (*Cloudflare) Actions added in v0.6.0

func (c *Cloudflare) Actions() []core.Action

func (*Cloudflare) Cleanup added in v0.6.0

func (*Cloudflare) Configuration

func (c *Cloudflare) Configuration() []configuration.Field

func (*Cloudflare) Description

func (c *Cloudflare) Description() string

func (*Cloudflare) HandleHook added in v0.18.0

func (c *Cloudflare) HandleHook(ctx core.IntegrationHookContext) error

func (*Cloudflare) HandleRequest

func (c *Cloudflare) HandleRequest(ctx core.HTTPRequestContext)

func (*Cloudflare) Hooks added in v0.18.0

func (c *Cloudflare) Hooks() []core.Hook

func (*Cloudflare) Icon

func (c *Cloudflare) Icon() string

func (*Cloudflare) Instructions

func (c *Cloudflare) Instructions() string

func (*Cloudflare) Label

func (c *Cloudflare) Label() string

func (*Cloudflare) ListResources

func (c *Cloudflare) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Cloudflare) Name

func (c *Cloudflare) Name() string

func (*Cloudflare) Sync

func (c *Cloudflare) Sync(ctx core.SyncContext) error

func (*Cloudflare) Triggers

func (c *Cloudflare) Triggers() []core.Trigger

type CloudflareAPIError added in v0.6.0

type CloudflareAPIError struct {
	StatusCode int
	Errors     []CloudflareError
	Body       []byte
}

func (*CloudflareAPIError) Error added in v0.6.0

func (e *CloudflareAPIError) Error() string

type CloudflareError added in v0.6.0

type CloudflareError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Configuration

type Configuration struct {
	APIToken  string `json:"apiToken"`
	AccountID string `json:"accountId"`
}

type Coordinates added in v0.20.0

type Coordinates struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

Coordinates holds geographic coordinates used for proximity steering

type CoordinatesSpec added in v0.20.0

type CoordinatesSpec struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type CreateDNSRecord added in v0.6.0

type CreateDNSRecord struct{}

func (*CreateDNSRecord) Cancel added in v0.6.0

func (c *CreateDNSRecord) Cancel(ctx core.ExecutionContext) error

func (*CreateDNSRecord) Cleanup added in v0.7.0

func (c *CreateDNSRecord) Cleanup(ctx core.SetupContext) error

func (*CreateDNSRecord) Color added in v0.6.0

func (c *CreateDNSRecord) Color() string

func (*CreateDNSRecord) Configuration added in v0.6.0

func (c *CreateDNSRecord) Configuration() []configuration.Field

func (*CreateDNSRecord) Description added in v0.6.0

func (c *CreateDNSRecord) Description() string

func (*CreateDNSRecord) Documentation added in v0.6.0

func (c *CreateDNSRecord) Documentation() string

func (*CreateDNSRecord) ExampleOutput added in v0.6.0

func (c *CreateDNSRecord) ExampleOutput() map[string]any

func (*CreateDNSRecord) Execute added in v0.6.0

func (c *CreateDNSRecord) Execute(ctx core.ExecutionContext) error

func (*CreateDNSRecord) HandleHook added in v0.18.0

func (c *CreateDNSRecord) HandleHook(ctx core.ActionHookContext) error

func (*CreateDNSRecord) HandleWebhook added in v0.6.0

func (*CreateDNSRecord) Hooks added in v0.18.0

func (c *CreateDNSRecord) Hooks() []core.Hook

func (*CreateDNSRecord) Icon added in v0.6.0

func (c *CreateDNSRecord) Icon() string

func (*CreateDNSRecord) Label added in v0.6.0

func (c *CreateDNSRecord) Label() string

func (*CreateDNSRecord) Name added in v0.6.0

func (c *CreateDNSRecord) Name() string

func (*CreateDNSRecord) OutputChannels added in v0.6.0

func (c *CreateDNSRecord) OutputChannels(configuration any) []core.OutputChannel

func (*CreateDNSRecord) ProcessQueueItem added in v0.6.0

func (c *CreateDNSRecord) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateDNSRecord) Setup added in v0.6.0

func (c *CreateDNSRecord) Setup(ctx core.SetupContext) error

type CreateDNSRecordRequest added in v0.6.0

type CreateDNSRecordRequest struct {
	Type     string `json:"type"`
	Name     string `json:"name"`
	Content  string `json:"content"`
	TTL      *int   `json:"ttl,omitempty"`
	Proxied  *bool  `json:"proxied,omitempty"`
	Priority *int   `json:"priority,omitempty"`
}

type CreateDNSRecordSpec added in v0.6.0

type CreateDNSRecordSpec struct {
	Zone     string `json:"zone"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Content  string `json:"content"`
	TTL      *int   `json:"ttl"`
	Proxied  *bool  `json:"proxied"`
	Priority *int   `json:"priority"`
}

type CreateKVNamespace added in v0.20.0

type CreateKVNamespace struct{}

func (*CreateKVNamespace) Cancel added in v0.20.0

func (*CreateKVNamespace) Cleanup added in v0.20.0

func (c *CreateKVNamespace) Cleanup(ctx core.SetupContext) error

func (*CreateKVNamespace) Color added in v0.20.0

func (c *CreateKVNamespace) Color() string

func (*CreateKVNamespace) Configuration added in v0.20.0

func (c *CreateKVNamespace) Configuration() []configuration.Field

func (*CreateKVNamespace) Description added in v0.20.0

func (c *CreateKVNamespace) Description() string

func (*CreateKVNamespace) Documentation added in v0.20.0

func (c *CreateKVNamespace) Documentation() string

func (*CreateKVNamespace) ExampleOutput added in v0.20.0

func (c *CreateKVNamespace) ExampleOutput() map[string]any

func (*CreateKVNamespace) Execute added in v0.20.0

func (c *CreateKVNamespace) Execute(ctx core.ExecutionContext) error

func (*CreateKVNamespace) HandleHook added in v0.20.0

func (c *CreateKVNamespace) HandleHook(ctx core.ActionHookContext) error

func (*CreateKVNamespace) HandleWebhook added in v0.20.0

func (*CreateKVNamespace) Hooks added in v0.20.0

func (c *CreateKVNamespace) Hooks() []core.Hook

func (*CreateKVNamespace) Icon added in v0.20.0

func (c *CreateKVNamespace) Icon() string

func (*CreateKVNamespace) Label added in v0.20.0

func (c *CreateKVNamespace) Label() string

func (*CreateKVNamespace) Name added in v0.20.0

func (c *CreateKVNamespace) Name() string

func (*CreateKVNamespace) OutputChannels added in v0.20.0

func (c *CreateKVNamespace) OutputChannels(configuration any) []core.OutputChannel

func (*CreateKVNamespace) ProcessQueueItem added in v0.20.0

func (c *CreateKVNamespace) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateKVNamespace) Setup added in v0.20.0

func (c *CreateKVNamespace) Setup(ctx core.SetupContext) error

type CreateKVNamespaceRequest added in v0.20.0

type CreateKVNamespaceRequest struct {
	Title string `json:"title"`
}

CreateKVNamespaceRequest is the payload for creating a KV namespace

type CreateKVNamespaceSpec added in v0.20.0

type CreateKVNamespaceSpec struct {
	AccountID string `json:"accountId"`
	Title     string `json:"title"`
}

type CreateOriginRule added in v0.20.0

type CreateOriginRule struct{}

func (*CreateOriginRule) Cancel added in v0.20.0

func (*CreateOriginRule) Cleanup added in v0.20.0

func (c *CreateOriginRule) Cleanup(ctx core.SetupContext) error

func (*CreateOriginRule) Color added in v0.20.0

func (c *CreateOriginRule) Color() string

func (*CreateOriginRule) Configuration added in v0.20.0

func (c *CreateOriginRule) Configuration() []configuration.Field

func (*CreateOriginRule) Description added in v0.20.0

func (c *CreateOriginRule) Description() string

func (*CreateOriginRule) Documentation added in v0.20.0

func (c *CreateOriginRule) Documentation() string

func (*CreateOriginRule) ExampleOutput added in v0.20.0

func (c *CreateOriginRule) ExampleOutput() map[string]any

func (*CreateOriginRule) Execute added in v0.20.0

func (c *CreateOriginRule) Execute(ctx core.ExecutionContext) error

func (*CreateOriginRule) HandleHook added in v0.20.0

func (c *CreateOriginRule) HandleHook(ctx core.ActionHookContext) error

func (*CreateOriginRule) HandleWebhook added in v0.20.0

func (*CreateOriginRule) Hooks added in v0.20.0

func (c *CreateOriginRule) Hooks() []core.Hook

func (*CreateOriginRule) Icon added in v0.20.0

func (c *CreateOriginRule) Icon() string

func (*CreateOriginRule) Label added in v0.20.0

func (c *CreateOriginRule) Label() string

func (*CreateOriginRule) Name added in v0.20.0

func (c *CreateOriginRule) Name() string

func (*CreateOriginRule) OutputChannels added in v0.20.0

func (c *CreateOriginRule) OutputChannels(configuration any) []core.OutputChannel

func (*CreateOriginRule) ProcessQueueItem added in v0.20.0

func (c *CreateOriginRule) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateOriginRule) Setup added in v0.20.0

func (c *CreateOriginRule) Setup(ctx core.SetupContext) error

type CreateOriginRuleSpec added in v0.20.0

type CreateOriginRuleSpec struct {
	Zone        string                `json:"zone" mapstructure:"zone"`
	Description string                `json:"description" mapstructure:"description"`
	MatchMode   string                `json:"matchMode" mapstructure:"matchMode"`
	MatchRules  []OriginRuleMatchRule `json:"matchRules" mapstructure:"matchRules"`
	Expression  string                `json:"expression" mapstructure:"expression"`
	OriginHost  *string               `json:"originHost" mapstructure:"originHost"`
	OriginPort  *int                  `json:"originPort" mapstructure:"originPort"`
	HostHeader  *string               `json:"hostHeader" mapstructure:"hostHeader"`
	SNI         *string               `json:"sni" mapstructure:"sni"`
	Enabled     *bool                 `json:"enabled" mapstructure:"enabled"`
}

type CreateOriginRulesetRequest added in v0.20.0

type CreateOriginRulesetRequest struct {
	Name        string       `json:"name"`
	Description string       `json:"description,omitempty"`
	Kind        string       `json:"kind"`
	Phase       string       `json:"phase"`
	Rules       []OriginRule `json:"rules,omitempty"`
}

type CreatePool added in v0.20.0

type CreatePool struct{}

func (*CreatePool) Cancel added in v0.20.0

func (c *CreatePool) Cancel(ctx core.ExecutionContext) error

func (*CreatePool) Cleanup added in v0.20.0

func (c *CreatePool) Cleanup(ctx core.SetupContext) error

func (*CreatePool) Color added in v0.20.0

func (c *CreatePool) Color() string

func (*CreatePool) Configuration added in v0.20.0

func (c *CreatePool) Configuration() []configuration.Field

func (*CreatePool) Description added in v0.20.0

func (c *CreatePool) Description() string

func (*CreatePool) Documentation added in v0.20.0

func (c *CreatePool) Documentation() string

func (*CreatePool) ExampleOutput added in v0.20.0

func (c *CreatePool) ExampleOutput() map[string]any

func (*CreatePool) Execute added in v0.20.0

func (c *CreatePool) Execute(ctx core.ExecutionContext) error

func (*CreatePool) HandleHook added in v0.20.0

func (c *CreatePool) HandleHook(ctx core.ActionHookContext) error

func (*CreatePool) HandleWebhook added in v0.20.0

func (*CreatePool) Hooks added in v0.20.0

func (c *CreatePool) Hooks() []core.Hook

func (*CreatePool) Icon added in v0.20.0

func (c *CreatePool) Icon() string

func (*CreatePool) Label added in v0.20.0

func (c *CreatePool) Label() string

func (*CreatePool) Name added in v0.20.0

func (c *CreatePool) Name() string

func (*CreatePool) OutputChannels added in v0.20.0

func (c *CreatePool) OutputChannels(configuration any) []core.OutputChannel

func (*CreatePool) ProcessQueueItem added in v0.20.0

func (c *CreatePool) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreatePool) Setup added in v0.20.0

func (c *CreatePool) Setup(ctx core.SetupContext) error

type CreatePoolRequest added in v0.20.0

type CreatePoolRequest struct {
	Name           string          `json:"name"`
	Description    string          `json:"description,omitempty"`
	Enabled        bool            `json:"enabled"`
	MinimumOrigins *int            `json:"minimum_origins,omitempty"`
	Monitor        string          `json:"monitor,omitempty"`
	Origins        []Origin        `json:"origins"`
	LoadShedding   *LoadShedding   `json:"load_shedding,omitempty"`
	OriginSteering *OriginSteering `json:"origin_steering,omitempty"`
}

CreatePoolRequest is the payload for creating a pool

type CreatePoolSpec added in v0.20.0

type CreatePoolSpec struct {
	AccountID            string            `json:"accountId"`
	Name                 string            `json:"name"`
	Description          string            `json:"description"`
	Enabled              *bool             `json:"enabled"`
	MinimumOrigins       *int              `json:"minimumOrigins"`
	Monitor              string            `json:"monitor"`
	Origins              []OriginSpec      `json:"origins"`
	OriginSteeringPolicy string            `json:"originSteeringPolicy"`
	LoadShedding         *LoadSheddingSpec `json:"loadShedding"`
}

type CreateRedirectRuleRequest

type CreateRedirectRuleRequest struct {
	Action      string              `json:"action"`
	Expression  string              `json:"expression"`
	Description string              `json:"description,omitempty"`
	Enabled     bool                `json:"enabled"`
	ActionParam *RedirectActionData `json:"action_parameters,omitempty"`
}

CreateRedirectRuleRequest is the payload for creating a new redirect rule

type DNSRecord added in v0.6.0

type DNSRecord struct {
	ID       string `json:"id"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Content  string `json:"content"`
	TTL      int    `json:"ttl"`
	Proxied  bool   `json:"proxied"`
	Priority *int   `json:"priority,omitempty"`
}

DNSRecord represents a Cloudflare DNS record

type DeleteDNSRecord added in v0.6.0

type DeleteDNSRecord struct{}

func (*DeleteDNSRecord) Cancel added in v0.6.0

func (c *DeleteDNSRecord) Cancel(ctx core.ExecutionContext) error

func (*DeleteDNSRecord) Cleanup added in v0.7.0

func (c *DeleteDNSRecord) Cleanup(ctx core.SetupContext) error

func (*DeleteDNSRecord) Color added in v0.6.0

func (c *DeleteDNSRecord) Color() string

func (*DeleteDNSRecord) Configuration added in v0.6.0

func (c *DeleteDNSRecord) Configuration() []configuration.Field

func (*DeleteDNSRecord) Description added in v0.6.0

func (c *DeleteDNSRecord) Description() string

func (*DeleteDNSRecord) Documentation added in v0.6.0

func (c *DeleteDNSRecord) Documentation() string

func (*DeleteDNSRecord) ExampleOutput added in v0.6.0

func (c *DeleteDNSRecord) ExampleOutput() map[string]any

func (*DeleteDNSRecord) Execute added in v0.6.0

func (c *DeleteDNSRecord) Execute(ctx core.ExecutionContext) error

func (*DeleteDNSRecord) HandleHook added in v0.18.0

func (c *DeleteDNSRecord) HandleHook(ctx core.ActionHookContext) error

func (*DeleteDNSRecord) HandleWebhook added in v0.6.0

func (*DeleteDNSRecord) Hooks added in v0.18.0

func (c *DeleteDNSRecord) Hooks() []core.Hook

func (*DeleteDNSRecord) Icon added in v0.6.0

func (c *DeleteDNSRecord) Icon() string

func (*DeleteDNSRecord) Label added in v0.6.0

func (c *DeleteDNSRecord) Label() string

func (*DeleteDNSRecord) Name added in v0.6.0

func (c *DeleteDNSRecord) Name() string

func (*DeleteDNSRecord) OutputChannels added in v0.6.0

func (c *DeleteDNSRecord) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteDNSRecord) ProcessQueueItem added in v0.6.0

func (c *DeleteDNSRecord) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteDNSRecord) Setup added in v0.6.0

func (c *DeleteDNSRecord) Setup(ctx core.SetupContext) error

type DeleteDNSRecordSpec added in v0.6.0

type DeleteDNSRecordSpec struct {
	Record string `json:"record"`
}

type DeleteKVNamespace added in v0.20.0

type DeleteKVNamespace struct{}

func (*DeleteKVNamespace) Cancel added in v0.20.0

func (*DeleteKVNamespace) Cleanup added in v0.20.0

func (c *DeleteKVNamespace) Cleanup(ctx core.SetupContext) error

func (*DeleteKVNamespace) Color added in v0.20.0

func (c *DeleteKVNamespace) Color() string

func (*DeleteKVNamespace) Configuration added in v0.20.0

func (c *DeleteKVNamespace) Configuration() []configuration.Field

func (*DeleteKVNamespace) Description added in v0.20.0

func (c *DeleteKVNamespace) Description() string

func (*DeleteKVNamespace) Documentation added in v0.20.0

func (c *DeleteKVNamespace) Documentation() string

func (*DeleteKVNamespace) ExampleOutput added in v0.20.0

func (c *DeleteKVNamespace) ExampleOutput() map[string]any

func (*DeleteKVNamespace) Execute added in v0.20.0

func (c *DeleteKVNamespace) Execute(ctx core.ExecutionContext) error

func (*DeleteKVNamespace) HandleHook added in v0.20.0

func (c *DeleteKVNamespace) HandleHook(ctx core.ActionHookContext) error

func (*DeleteKVNamespace) HandleWebhook added in v0.20.0

func (*DeleteKVNamespace) Hooks added in v0.20.0

func (c *DeleteKVNamespace) Hooks() []core.Hook

func (*DeleteKVNamespace) Icon added in v0.20.0

func (c *DeleteKVNamespace) Icon() string

func (*DeleteKVNamespace) Label added in v0.20.0

func (c *DeleteKVNamespace) Label() string

func (*DeleteKVNamespace) Name added in v0.20.0

func (c *DeleteKVNamespace) Name() string

func (*DeleteKVNamespace) OutputChannels added in v0.20.0

func (c *DeleteKVNamespace) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteKVNamespace) ProcessQueueItem added in v0.20.0

func (c *DeleteKVNamespace) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteKVNamespace) Setup added in v0.20.0

func (c *DeleteKVNamespace) Setup(ctx core.SetupContext) error

type DeleteKVNamespaceSpec added in v0.20.0

type DeleteKVNamespaceSpec struct {
	AccountID string `json:"accountId"`
	Namespace string `json:"namespace"`
}

type DeleteKVValue added in v0.20.0

type DeleteKVValue struct{}

func (*DeleteKVValue) Cancel added in v0.20.0

func (c *DeleteKVValue) Cancel(ctx core.ExecutionContext) error

func (*DeleteKVValue) Cleanup added in v0.20.0

func (c *DeleteKVValue) Cleanup(ctx core.SetupContext) error

func (*DeleteKVValue) Color added in v0.20.0

func (c *DeleteKVValue) Color() string

func (*DeleteKVValue) Configuration added in v0.20.0

func (c *DeleteKVValue) Configuration() []configuration.Field

func (*DeleteKVValue) Description added in v0.20.0

func (c *DeleteKVValue) Description() string

func (*DeleteKVValue) Documentation added in v0.20.0

func (c *DeleteKVValue) Documentation() string

func (*DeleteKVValue) ExampleOutput added in v0.20.0

func (c *DeleteKVValue) ExampleOutput() map[string]any

func (*DeleteKVValue) Execute added in v0.20.0

func (c *DeleteKVValue) Execute(ctx core.ExecutionContext) error

func (*DeleteKVValue) HandleHook added in v0.20.0

func (c *DeleteKVValue) HandleHook(ctx core.ActionHookContext) error

func (*DeleteKVValue) HandleWebhook added in v0.20.0

func (*DeleteKVValue) Hooks added in v0.20.0

func (c *DeleteKVValue) Hooks() []core.Hook

func (*DeleteKVValue) Icon added in v0.20.0

func (c *DeleteKVValue) Icon() string

func (*DeleteKVValue) Label added in v0.20.0

func (c *DeleteKVValue) Label() string

func (*DeleteKVValue) Name added in v0.20.0

func (c *DeleteKVValue) Name() string

func (*DeleteKVValue) OutputChannels added in v0.20.0

func (c *DeleteKVValue) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteKVValue) ProcessQueueItem added in v0.20.0

func (c *DeleteKVValue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteKVValue) Setup added in v0.20.0

func (c *DeleteKVValue) Setup(ctx core.SetupContext) error

type DeleteKVValueSpec added in v0.20.0

type DeleteKVValueSpec struct {
	AccountID string `json:"accountId"`
	Namespace string `json:"namespace"`
	KVKey     string `json:"kvKey"`
}

type DeleteOriginRule added in v0.20.0

type DeleteOriginRule struct{}

func (*DeleteOriginRule) Cancel added in v0.20.0

func (*DeleteOriginRule) Cleanup added in v0.20.0

func (c *DeleteOriginRule) Cleanup(ctx core.SetupContext) error

func (*DeleteOriginRule) Color added in v0.20.0

func (c *DeleteOriginRule) Color() string

func (*DeleteOriginRule) Configuration added in v0.20.0

func (c *DeleteOriginRule) Configuration() []configuration.Field

func (*DeleteOriginRule) Description added in v0.20.0

func (c *DeleteOriginRule) Description() string

func (*DeleteOriginRule) Documentation added in v0.20.0

func (c *DeleteOriginRule) Documentation() string

func (*DeleteOriginRule) ExampleOutput added in v0.20.0

func (c *DeleteOriginRule) ExampleOutput() map[string]any

func (*DeleteOriginRule) Execute added in v0.20.0

func (c *DeleteOriginRule) Execute(ctx core.ExecutionContext) error

func (*DeleteOriginRule) HandleHook added in v0.20.0

func (c *DeleteOriginRule) HandleHook(ctx core.ActionHookContext) error

func (*DeleteOriginRule) HandleWebhook added in v0.20.0

func (*DeleteOriginRule) Hooks added in v0.20.0

func (c *DeleteOriginRule) Hooks() []core.Hook

func (*DeleteOriginRule) Icon added in v0.20.0

func (c *DeleteOriginRule) Icon() string

func (*DeleteOriginRule) Label added in v0.20.0

func (c *DeleteOriginRule) Label() string

func (*DeleteOriginRule) Name added in v0.20.0

func (c *DeleteOriginRule) Name() string

func (*DeleteOriginRule) OutputChannels added in v0.20.0

func (c *DeleteOriginRule) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteOriginRule) ProcessQueueItem added in v0.20.0

func (c *DeleteOriginRule) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteOriginRule) Setup added in v0.20.0

func (c *DeleteOriginRule) Setup(ctx core.SetupContext) error

type DeleteOriginRuleSpec added in v0.20.0

type DeleteOriginRuleSpec struct {
	Rule string `json:"rule"`
}

type DeletePool added in v0.20.0

type DeletePool struct{}

func (*DeletePool) Cancel added in v0.20.0

func (c *DeletePool) Cancel(ctx core.ExecutionContext) error

func (*DeletePool) Cleanup added in v0.20.0

func (c *DeletePool) Cleanup(ctx core.SetupContext) error

func (*DeletePool) Color added in v0.20.0

func (c *DeletePool) Color() string

func (*DeletePool) Configuration added in v0.20.0

func (c *DeletePool) Configuration() []configuration.Field

func (*DeletePool) Description added in v0.20.0

func (c *DeletePool) Description() string

func (*DeletePool) Documentation added in v0.20.0

func (c *DeletePool) Documentation() string

func (*DeletePool) ExampleOutput added in v0.20.0

func (c *DeletePool) ExampleOutput() map[string]any

func (*DeletePool) Execute added in v0.20.0

func (c *DeletePool) Execute(ctx core.ExecutionContext) error

func (*DeletePool) HandleHook added in v0.20.0

func (c *DeletePool) HandleHook(ctx core.ActionHookContext) error

func (*DeletePool) HandleWebhook added in v0.20.0

func (*DeletePool) Hooks added in v0.20.0

func (c *DeletePool) Hooks() []core.Hook

func (*DeletePool) Icon added in v0.20.0

func (c *DeletePool) Icon() string

func (*DeletePool) Label added in v0.20.0

func (c *DeletePool) Label() string

func (*DeletePool) Name added in v0.20.0

func (c *DeletePool) Name() string

func (*DeletePool) OutputChannels added in v0.20.0

func (c *DeletePool) OutputChannels(configuration any) []core.OutputChannel

func (*DeletePool) ProcessQueueItem added in v0.20.0

func (c *DeletePool) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeletePool) Setup added in v0.20.0

func (c *DeletePool) Setup(ctx core.SetupContext) error

type DeletePoolSpec added in v0.20.0

type DeletePoolSpec struct {
	AccountID string `json:"accountId"`
	Pool      string `json:"pool"`
}

type GetKVValue added in v0.20.0

type GetKVValue struct{}

func (*GetKVValue) Cancel added in v0.20.0

func (c *GetKVValue) Cancel(ctx core.ExecutionContext) error

func (*GetKVValue) Cleanup added in v0.20.0

func (c *GetKVValue) Cleanup(ctx core.SetupContext) error

func (*GetKVValue) Color added in v0.20.0

func (c *GetKVValue) Color() string

func (*GetKVValue) Configuration added in v0.20.0

func (c *GetKVValue) Configuration() []configuration.Field

func (*GetKVValue) Description added in v0.20.0

func (c *GetKVValue) Description() string

func (*GetKVValue) Documentation added in v0.20.0

func (c *GetKVValue) Documentation() string

func (*GetKVValue) ExampleOutput added in v0.20.0

func (c *GetKVValue) ExampleOutput() map[string]any

func (*GetKVValue) Execute added in v0.20.0

func (c *GetKVValue) Execute(ctx core.ExecutionContext) error

func (*GetKVValue) HandleHook added in v0.20.0

func (c *GetKVValue) HandleHook(ctx core.ActionHookContext) error

func (*GetKVValue) HandleWebhook added in v0.20.0

func (*GetKVValue) Hooks added in v0.20.0

func (c *GetKVValue) Hooks() []core.Hook

func (*GetKVValue) Icon added in v0.20.0

func (c *GetKVValue) Icon() string

func (*GetKVValue) Label added in v0.20.0

func (c *GetKVValue) Label() string

func (*GetKVValue) Name added in v0.20.0

func (c *GetKVValue) Name() string

func (*GetKVValue) OutputChannels added in v0.20.0

func (c *GetKVValue) OutputChannels(configuration any) []core.OutputChannel

func (*GetKVValue) ProcessQueueItem added in v0.20.0

func (c *GetKVValue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetKVValue) Setup added in v0.20.0

func (c *GetKVValue) Setup(ctx core.SetupContext) error

type GetKVValueSpec added in v0.20.0

type GetKVValueSpec struct {
	AccountID string `json:"accountId"`
	Namespace string `json:"namespace"`
	KVKey     string `json:"kvKey"`
}

type GetPool added in v0.20.0

type GetPool struct{}

func (*GetPool) Cancel added in v0.20.0

func (c *GetPool) Cancel(ctx core.ExecutionContext) error

func (*GetPool) Cleanup added in v0.20.0

func (c *GetPool) Cleanup(ctx core.SetupContext) error

func (*GetPool) Color added in v0.20.0

func (c *GetPool) Color() string

func (*GetPool) Configuration added in v0.20.0

func (c *GetPool) Configuration() []configuration.Field

func (*GetPool) Description added in v0.20.0

func (c *GetPool) Description() string

func (*GetPool) Documentation added in v0.20.0

func (c *GetPool) Documentation() string

func (*GetPool) ExampleOutput added in v0.20.0

func (c *GetPool) ExampleOutput() map[string]any

func (*GetPool) Execute added in v0.20.0

func (c *GetPool) Execute(ctx core.ExecutionContext) error

func (*GetPool) HandleHook added in v0.20.0

func (c *GetPool) HandleHook(ctx core.ActionHookContext) error

func (*GetPool) HandleWebhook added in v0.20.0

func (c *GetPool) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)

func (*GetPool) Hooks added in v0.20.0

func (c *GetPool) Hooks() []core.Hook

func (*GetPool) Icon added in v0.20.0

func (c *GetPool) Icon() string

func (*GetPool) Label added in v0.20.0

func (c *GetPool) Label() string

func (*GetPool) Name added in v0.20.0

func (c *GetPool) Name() string

func (*GetPool) OutputChannels added in v0.20.0

func (c *GetPool) OutputChannels(configuration any) []core.OutputChannel

func (*GetPool) ProcessQueueItem added in v0.20.0

func (c *GetPool) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetPool) Setup added in v0.20.0

func (c *GetPool) Setup(ctx core.SetupContext) error

type GetPoolSpec added in v0.20.0

type GetPoolSpec struct {
	AccountID string `json:"accountId"`
	Pool      string `json:"pool"`
}

type KVKey added in v0.20.0

type KVKey struct {
	Name string `json:"name"`
}

KVKey represents a single key in a Workers KV namespace

type KVNamespace added in v0.20.0

type KVNamespace struct {
	ID                  string `json:"id"`
	Title               string `json:"title"`
	SupportsURLEncoding *bool  `json:"supports_url_encoding,omitempty"`
}

KVNamespace represents a Cloudflare Workers KV namespace

type KVNodeMetadata added in v0.20.0

type KVNodeMetadata struct {
	NamespaceName string `json:"namespaceName"`
	KeyName       string `json:"keyName"`
}

type LoadShedding added in v0.20.0

type LoadShedding struct {
	DefaultPercent float64 `json:"default_percent"`
	DefaultPolicy  string  `json:"default_policy"`
	SessionPercent float64 `json:"session_percent"`
	SessionPolicy  string  `json:"session_policy"`
}

LoadShedding configures load shedding behaviour for a pool

type LoadSheddingSpec added in v0.20.0

type LoadSheddingSpec struct {
	DefaultPercent float64 `json:"defaultPercent"`
	DefaultPolicy  string  `json:"defaultPolicy"`
	SessionPercent float64 `json:"sessionPercent"`
	SessionPolicy  string  `json:"sessionPolicy"`
}

type Metadata

type Metadata struct {
	Zones     []Zone `json:"zones"`
	AccountID string `json:"accountId"`
}

type Origin added in v0.20.0

type Origin struct {
	Name        string       `json:"name"`
	Address     string       `json:"address"`
	Enabled     bool         `json:"enabled"`
	Weight      float64      `json:"weight"`
	Port        int          `json:"port,omitempty"`
	Coordinates *Coordinates `json:"coordinates,omitempty"`
}

Origin represents a single origin server in a pool

type OriginActionParameters added in v0.20.0

type OriginActionParameters struct {
	HostHeader string         `json:"host_header,omitempty"`
	Origin     *RouteOrigin   `json:"origin,omitempty"`
	SNI        *RouteSNIValue `json:"sni,omitempty"`
}

type OriginRule added in v0.20.0

type OriginRule struct {
	ID          string                  `json:"id,omitempty"`
	Action      string                  `json:"action"`
	Expression  string                  `json:"expression"`
	Description string                  `json:"description,omitempty"`
	Enabled     bool                    `json:"enabled"`
	ActionParam *OriginActionParameters `json:"action_parameters,omitempty"`
}

OriginRule represents a single origin rule in a ruleset.

type OriginRuleMatchRule added in v0.20.0

type OriginRuleMatchRule struct {
	Field       string `json:"field" mapstructure:"field"`
	Operator    string `json:"operator" mapstructure:"operator"`
	Value       string `json:"value" mapstructure:"value"`
	Conjunction string `json:"conjunction" mapstructure:"conjunction"`
}

type OriginRuleNodeMetadata added in v0.20.0

type OriginRuleNodeMetadata struct {
	Zone        string   `json:"zone,omitempty"`
	ZoneName    string   `json:"zoneName,omitempty"`
	Rule        string   `json:"rule,omitempty"`
	Description string   `json:"description,omitempty"`
	MatchMode   string   `json:"matchMode,omitempty"`
	Expression  string   `json:"expression,omitempty"`
	OriginHost  string   `json:"originHost,omitempty"`
	OriginPort  *int     `json:"originPort,omitempty"`
	HostHeader  string   `json:"hostHeader,omitempty"`
	SNI         string   `json:"sni,omitempty"`
	Enabled     *bool    `json:"enabled,omitempty"`
	Rewrites    []string `json:"rewrites,omitempty"`
}

type OriginRuleset added in v0.20.0

type OriginRuleset struct {
	ID          string       `json:"id"`
	Name        string       `json:"name"`
	Description string       `json:"description"`
	Kind        string       `json:"kind"`
	Phase       string       `json:"phase"`
	Rules       []OriginRule `json:"rules"`
}

type OriginSpec added in v0.20.0

type OriginSpec struct {
	Name        string           `json:"name"`
	Address     string           `json:"address"`
	Enabled     *bool            `json:"enabled"`
	Weight      *float64         `json:"weight"`
	Port        int              `json:"port"`
	Coordinates *CoordinatesSpec `json:"coordinates"`
}

type OriginSteering added in v0.20.0

type OriginSteering struct {
	// Policy is one of: "random", "hash", "least_outstanding_requests", "least_connections"
	Policy string `json:"policy,omitempty"`
}

OriginSteering configures how origins within a pool are selected

type Pool added in v0.20.0

type Pool struct {
	ID             string          `json:"id"`
	Name           string          `json:"name"`
	Description    string          `json:"description"`
	Enabled        bool            `json:"enabled"`
	MinimumOrigins int             `json:"minimum_origins"`
	Monitor        string          `json:"monitor,omitempty"`
	Origins        []Origin        `json:"origins"`
	LoadShedding   *LoadShedding   `json:"load_shedding,omitempty"`
	OriginSteering *OriginSteering `json:"origin_steering,omitempty"`
}

Pool represents a Cloudflare Load Balancer origin pool

type PoolMonitor added in v0.20.0

type PoolMonitor struct {
	ID          string `json:"id"`
	Description string `json:"description"`
	Type        string `json:"type"`
}

PoolMonitor represents a Cloudflare health monitor

type PoolNodeMetadata added in v0.20.0

type PoolNodeMetadata struct {
	PoolName string `json:"poolName"`
}

type PutKVValue added in v0.20.0

type PutKVValue struct{}

func (*PutKVValue) Cancel added in v0.20.0

func (c *PutKVValue) Cancel(ctx core.ExecutionContext) error

func (*PutKVValue) Cleanup added in v0.20.0

func (c *PutKVValue) Cleanup(ctx core.SetupContext) error

func (*PutKVValue) Color added in v0.20.0

func (c *PutKVValue) Color() string

func (*PutKVValue) Configuration added in v0.20.0

func (c *PutKVValue) Configuration() []configuration.Field

func (*PutKVValue) Description added in v0.20.0

func (c *PutKVValue) Description() string

func (*PutKVValue) Documentation added in v0.20.0

func (c *PutKVValue) Documentation() string

func (*PutKVValue) ExampleOutput added in v0.20.0

func (c *PutKVValue) ExampleOutput() map[string]any

func (*PutKVValue) Execute added in v0.20.0

func (c *PutKVValue) Execute(ctx core.ExecutionContext) error

func (*PutKVValue) HandleHook added in v0.20.0

func (c *PutKVValue) HandleHook(ctx core.ActionHookContext) error

func (*PutKVValue) HandleWebhook added in v0.20.0

func (*PutKVValue) Hooks added in v0.20.0

func (c *PutKVValue) Hooks() []core.Hook

func (*PutKVValue) Icon added in v0.20.0

func (c *PutKVValue) Icon() string

func (*PutKVValue) Label added in v0.20.0

func (c *PutKVValue) Label() string

func (*PutKVValue) Name added in v0.20.0

func (c *PutKVValue) Name() string

func (*PutKVValue) OutputChannels added in v0.20.0

func (c *PutKVValue) OutputChannels(configuration any) []core.OutputChannel

func (*PutKVValue) ProcessQueueItem added in v0.20.0

func (c *PutKVValue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*PutKVValue) Setup added in v0.20.0

func (c *PutKVValue) Setup(ctx core.SetupContext) error

type PutKVValueSpec added in v0.20.0

type PutKVValueSpec struct {
	AccountID     string `json:"accountId"`
	Namespace     string `json:"namespace"`
	Key           string `json:"key"`
	Value         string `json:"value"`
	ExpirationTTL *int   `json:"expirationTtl"`
}

type RedirectActionData

type RedirectActionData struct {
	FromValue *RedirectFromValue `json:"from_value,omitempty"`
}

RedirectActionData contains the redirect configuration

type RedirectFromValue

type RedirectFromValue struct {
	StatusCode       int                `json:"status_code"`
	TargetURL        *RedirectTargetURL `json:"target_url,omitempty"`
	PreserveQueryStr bool               `json:"preserve_query_string,omitempty"`
}

RedirectFromValue defines the redirect target

type RedirectRule

type RedirectRule struct {
	ID          string              `json:"id,omitempty"`
	Action      string              `json:"action"`
	Expression  string              `json:"expression"`
	Description string              `json:"description,omitempty"`
	Enabled     bool                `json:"enabled"`
	ActionParam *RedirectActionData `json:"action_parameters,omitempty"`
}

RedirectRule represents a single redirect rule in a ruleset

type RedirectTargetURL

type RedirectTargetURL struct {
	Value      string `json:"value,omitempty"`
	Expression string `json:"expression,omitempty"`
}

RedirectTargetURL defines the target URL for redirect

type RouteOrigin added in v0.20.0

type RouteOrigin struct {
	Host string `json:"host,omitempty"`
	Port *int   `json:"port,omitempty"`
}

type RouteSNIValue added in v0.20.0

type RouteSNIValue struct {
	Value string `json:"value,omitempty"`
}

type Ruleset

type Ruleset struct {
	ID          string         `json:"id"`
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Kind        string         `json:"kind"`
	Phase       string         `json:"phase"`
	Rules       []RedirectRule `json:"rules"`
}

Ruleset represents a Cloudflare ruleset

type UpdateDNSRecord added in v0.6.0

type UpdateDNSRecord struct{}

func (*UpdateDNSRecord) Cancel added in v0.6.0

func (c *UpdateDNSRecord) Cancel(ctx core.ExecutionContext) error

func (*UpdateDNSRecord) Cleanup added in v0.7.0

func (c *UpdateDNSRecord) Cleanup(ctx core.SetupContext) error

func (*UpdateDNSRecord) Color added in v0.6.0

func (c *UpdateDNSRecord) Color() string

func (*UpdateDNSRecord) Configuration added in v0.6.0

func (c *UpdateDNSRecord) Configuration() []configuration.Field

func (*UpdateDNSRecord) Description added in v0.6.0

func (c *UpdateDNSRecord) Description() string

func (*UpdateDNSRecord) Documentation added in v0.6.0

func (c *UpdateDNSRecord) Documentation() string

func (*UpdateDNSRecord) ExampleOutput added in v0.6.0

func (c *UpdateDNSRecord) ExampleOutput() map[string]any

func (*UpdateDNSRecord) Execute added in v0.6.0

func (c *UpdateDNSRecord) Execute(ctx core.ExecutionContext) error

func (*UpdateDNSRecord) HandleHook added in v0.18.0

func (c *UpdateDNSRecord) HandleHook(ctx core.ActionHookContext) error

func (*UpdateDNSRecord) HandleWebhook added in v0.6.0

func (*UpdateDNSRecord) Hooks added in v0.18.0

func (c *UpdateDNSRecord) Hooks() []core.Hook

func (*UpdateDNSRecord) Icon added in v0.6.0

func (c *UpdateDNSRecord) Icon() string

func (*UpdateDNSRecord) Label added in v0.6.0

func (c *UpdateDNSRecord) Label() string

func (*UpdateDNSRecord) Name added in v0.6.0

func (c *UpdateDNSRecord) Name() string

func (*UpdateDNSRecord) OutputChannels added in v0.6.0

func (c *UpdateDNSRecord) OutputChannels(configuration any) []core.OutputChannel

func (*UpdateDNSRecord) ProcessQueueItem added in v0.6.0

func (c *UpdateDNSRecord) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdateDNSRecord) Setup added in v0.6.0

func (c *UpdateDNSRecord) Setup(ctx core.SetupContext) error

type UpdateDNSRecordRequest added in v0.6.0

type UpdateDNSRecordRequest struct {
	Type    string `json:"type"`
	Name    string `json:"name"`
	Content string `json:"content"`
	TTL     int    `json:"ttl"`
	Proxied bool   `json:"proxied"`
}

UpdateDNSRecordRequest is the payload for updating a DNS record. Cloudflare's Update DNS Record endpoint expects a full record object (type, name, content, ttl, proxied).

type UpdateDNSRecordSpec added in v0.6.0

type UpdateDNSRecordSpec struct {
	Record string `json:"record"`

	Content string `json:"content"`
	TTL     int    `json:"ttl"`
	Proxied bool   `json:"proxied"`
}

type UpdateOriginRule added in v0.20.0

type UpdateOriginRule struct{}

func (*UpdateOriginRule) Cancel added in v0.20.0

func (*UpdateOriginRule) Cleanup added in v0.20.0

func (c *UpdateOriginRule) Cleanup(ctx core.SetupContext) error

func (*UpdateOriginRule) Color added in v0.20.0

func (c *UpdateOriginRule) Color() string

func (*UpdateOriginRule) Configuration added in v0.20.0

func (c *UpdateOriginRule) Configuration() []configuration.Field

func (*UpdateOriginRule) Description added in v0.20.0

func (c *UpdateOriginRule) Description() string

func (*UpdateOriginRule) Documentation added in v0.20.0

func (c *UpdateOriginRule) Documentation() string

func (*UpdateOriginRule) ExampleOutput added in v0.20.0

func (c *UpdateOriginRule) ExampleOutput() map[string]any

func (*UpdateOriginRule) Execute added in v0.20.0

func (c *UpdateOriginRule) Execute(ctx core.ExecutionContext) error

func (*UpdateOriginRule) HandleHook added in v0.20.0

func (c *UpdateOriginRule) HandleHook(ctx core.ActionHookContext) error

func (*UpdateOriginRule) HandleWebhook added in v0.20.0

func (*UpdateOriginRule) Hooks added in v0.20.0

func (c *UpdateOriginRule) Hooks() []core.Hook

func (*UpdateOriginRule) Icon added in v0.20.0

func (c *UpdateOriginRule) Icon() string

func (*UpdateOriginRule) Label added in v0.20.0

func (c *UpdateOriginRule) Label() string

func (*UpdateOriginRule) Name added in v0.20.0

func (c *UpdateOriginRule) Name() string

func (*UpdateOriginRule) OutputChannels added in v0.20.0

func (c *UpdateOriginRule) OutputChannels(configuration any) []core.OutputChannel

func (*UpdateOriginRule) ProcessQueueItem added in v0.20.0

func (c *UpdateOriginRule) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdateOriginRule) Setup added in v0.20.0

func (c *UpdateOriginRule) Setup(ctx core.SetupContext) error

type UpdateOriginRuleSpec added in v0.20.0

type UpdateOriginRuleSpec struct {
	Rule        string                `json:"rule" mapstructure:"rule"`
	Description *string               `json:"description" mapstructure:"description"`
	MatchMode   string                `json:"matchMode" mapstructure:"matchMode"`
	MatchRules  []OriginRuleMatchRule `json:"matchRules" mapstructure:"matchRules"`
	Expression  string                `json:"expression" mapstructure:"expression"`
	OriginHost  *string               `json:"originHost" mapstructure:"originHost"`
	OriginPort  *int                  `json:"originPort" mapstructure:"originPort"`
	HostHeader  *string               `json:"hostHeader" mapstructure:"hostHeader"`
	SNI         *string               `json:"sni" mapstructure:"sni"`
	Enabled     *bool                 `json:"enabled" mapstructure:"enabled"`
}

type UpdatePool added in v0.20.0

type UpdatePool struct{}

func (*UpdatePool) Cancel added in v0.20.0

func (c *UpdatePool) Cancel(ctx core.ExecutionContext) error

func (*UpdatePool) Cleanup added in v0.20.0

func (c *UpdatePool) Cleanup(ctx core.SetupContext) error

func (*UpdatePool) Color added in v0.20.0

func (c *UpdatePool) Color() string

func (*UpdatePool) Configuration added in v0.20.0

func (c *UpdatePool) Configuration() []configuration.Field

func (*UpdatePool) Description added in v0.20.0

func (c *UpdatePool) Description() string

func (*UpdatePool) Documentation added in v0.20.0

func (c *UpdatePool) Documentation() string

func (*UpdatePool) ExampleOutput added in v0.20.0

func (c *UpdatePool) ExampleOutput() map[string]any

func (*UpdatePool) Execute added in v0.20.0

func (c *UpdatePool) Execute(ctx core.ExecutionContext) error

func (*UpdatePool) HandleHook added in v0.20.0

func (c *UpdatePool) HandleHook(ctx core.ActionHookContext) error

func (*UpdatePool) HandleWebhook added in v0.20.0

func (*UpdatePool) Hooks added in v0.20.0

func (c *UpdatePool) Hooks() []core.Hook

func (*UpdatePool) Icon added in v0.20.0

func (c *UpdatePool) Icon() string

func (*UpdatePool) Label added in v0.20.0

func (c *UpdatePool) Label() string

func (*UpdatePool) Name added in v0.20.0

func (c *UpdatePool) Name() string

func (*UpdatePool) OutputChannels added in v0.20.0

func (c *UpdatePool) OutputChannels(configuration any) []core.OutputChannel

func (*UpdatePool) ProcessQueueItem added in v0.20.0

func (c *UpdatePool) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdatePool) Setup added in v0.20.0

func (c *UpdatePool) Setup(ctx core.SetupContext) error

type UpdatePoolRequest added in v0.20.0

type UpdatePoolRequest struct {
	Name           string          `json:"name,omitempty"`
	Description    string          `json:"description,omitempty"`
	Enabled        *bool           `json:"enabled,omitempty"`
	MinimumOrigins *int            `json:"minimum_origins,omitempty"`
	Monitor        string          `json:"monitor,omitempty"`
	Origins        []Origin        `json:"origins,omitempty"`
	LoadShedding   *LoadShedding   `json:"load_shedding,omitempty"`
	OriginSteering *OriginSteering `json:"origin_steering,omitempty"`
}

UpdatePoolRequest is the payload for updating an origin pool

type UpdatePoolSpec added in v0.20.0

type UpdatePoolSpec struct {
	AccountID            string            `json:"accountId"`
	Pool                 string            `json:"pool"`
	Name                 string            `json:"name"`
	Description          string            `json:"description"`
	Enabled              *bool             `json:"enabled"`
	MinimumOrigins       *int              `json:"minimumOrigins"`
	Monitor              string            `json:"monitor"`
	Origins              []OriginSpec      `json:"origins"`
	OriginSteeringPolicy string            `json:"originSteeringPolicy"`
	LoadShedding         *LoadSheddingSpec `json:"loadShedding"`
}

type UpdateRedirectRule

type UpdateRedirectRule struct{}

func (*UpdateRedirectRule) Cancel

func (*UpdateRedirectRule) Cleanup added in v0.7.0

func (c *UpdateRedirectRule) Cleanup(ctx core.SetupContext) error

func (*UpdateRedirectRule) Color

func (c *UpdateRedirectRule) Color() string

func (*UpdateRedirectRule) Configuration

func (c *UpdateRedirectRule) Configuration() []configuration.Field

func (*UpdateRedirectRule) Description

func (c *UpdateRedirectRule) Description() string

func (*UpdateRedirectRule) Documentation

func (c *UpdateRedirectRule) Documentation() string

func (*UpdateRedirectRule) ExampleOutput

func (c *UpdateRedirectRule) ExampleOutput() map[string]any

func (*UpdateRedirectRule) Execute

func (*UpdateRedirectRule) HandleHook added in v0.18.0

func (c *UpdateRedirectRule) HandleHook(ctx core.ActionHookContext) error

func (*UpdateRedirectRule) HandleWebhook

func (*UpdateRedirectRule) Hooks added in v0.18.0

func (c *UpdateRedirectRule) Hooks() []core.Hook

func (*UpdateRedirectRule) Icon

func (c *UpdateRedirectRule) Icon() string

func (*UpdateRedirectRule) Label

func (c *UpdateRedirectRule) Label() string

func (*UpdateRedirectRule) Name

func (c *UpdateRedirectRule) Name() string

func (*UpdateRedirectRule) OutputChannels

func (c *UpdateRedirectRule) OutputChannels(configuration any) []core.OutputChannel

func (*UpdateRedirectRule) ProcessQueueItem

func (c *UpdateRedirectRule) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdateRedirectRule) Setup

func (c *UpdateRedirectRule) Setup(ctx core.SetupContext) error

type UpdateRedirectRuleMetadata

type UpdateRedirectRuleMetadata struct {
	Zone *Zone `json:"zone"`
}

type UpdateRedirectRuleRequest

type UpdateRedirectRuleRequest struct {
	Action      string              `json:"action"`
	Expression  string              `json:"expression"`
	Description string              `json:"description,omitempty"`
	Enabled     bool                `json:"enabled"`
	ActionParam *RedirectActionData `json:"action_parameters,omitempty"`
}

UpdateRedirectRuleRequest is the payload for updating a redirect rule

type UpdateRedirectRuleSpec

type UpdateRedirectRuleSpec struct {
	Zone             string `json:"zone"`
	RuleID           string `json:"ruleId"`
	Description      string `json:"description"`
	MatchType        string `json:"matchType"`
	SourceURLPattern string `json:"sourceUrlPattern"`
	Expression       string `json:"expression"`
	TargetURL        string `json:"targetUrl"`
	StatusCode       string `json:"statusCode"`
	PreserveQueryStr bool   `json:"preserveQueryString"`
	Enabled          bool   `json:"enabled"`
}

type Zone

type Zone struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

Zone represents a Cloudflare zone

Jump to

Keyboard shortcuts

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