digitalocean

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Email        string `json:"email"`
	UUID         string `json:"uuid"`
	Status       string `json:"status"`
	DropletLimit int    `json:"droplet_limit"`
}

Account represents a DigitalOcean account

type AlertPolicy added in v0.13.0

type AlertPolicy struct {
	UUID        string            `json:"uuid"`
	Type        string            `json:"type"`
	Description string            `json:"description"`
	Compare     string            `json:"compare"`
	Value       float64           `json:"value"`
	Window      string            `json:"window"`
	Entities    []string          `json:"entities"`
	Tags        []string          `json:"tags"`
	Alerts      AlertPolicyAlerts `json:"alerts"`
	Enabled     bool              `json:"enabled"`
}

AlertPolicy represents a DigitalOcean monitoring alert policy

type AlertPolicyAlerts added in v0.13.0

type AlertPolicyAlerts struct {
	Slack []AlertPolicySlackDetails `json:"slack,omitempty"`
	Email []string                  `json:"email,omitempty"`
}

AlertPolicyAlerts represents the notification channels configured on an alert policy

type AlertPolicyNodeMetadata added in v0.13.0

type AlertPolicyNodeMetadata struct {
	PolicyID       string                             `json:"policyUuid" mapstructure:"policyUuid"`
	PolicyDesc     string                             `json:"policyDesc" mapstructure:"policyDesc"`
	ScopedDroplets []AlertPolicyScopedDropletMetadata `json:"scopedDroplets,omitempty" mapstructure:"scopedDroplets"`
}

AlertPolicyNodeMetadata stores metadata about an alert policy for display in the UI

type AlertPolicyScopedDropletMetadata added in v0.13.0

type AlertPolicyScopedDropletMetadata struct {
	DropletID   string `json:"dropletId" mapstructure:"dropletId"`
	DropletName string `json:"dropletName" mapstructure:"dropletName"`
}

AlertPolicyScopedDropletMetadata stores the selected scope droplets for alert policy components.

type AlertPolicySlackDetails added in v0.13.0

type AlertPolicySlackDetails struct {
	URL     string `json:"url"`
	Channel string `json:"channel"`
}

AlertPolicySlackDetails represents a Slack notification channel for an alert policy

type AssignReservedIP added in v0.13.0

type AssignReservedIP struct{}

func (*AssignReservedIP) Actions added in v0.13.0

func (a *AssignReservedIP) Actions() []core.Action

func (*AssignReservedIP) Cancel added in v0.13.0

func (*AssignReservedIP) Cleanup added in v0.13.0

func (a *AssignReservedIP) Cleanup(ctx core.SetupContext) error

func (*AssignReservedIP) Color added in v0.13.0

func (a *AssignReservedIP) Color() string

func (*AssignReservedIP) Configuration added in v0.13.0

func (a *AssignReservedIP) Configuration() []configuration.Field

func (*AssignReservedIP) Description added in v0.13.0

func (a *AssignReservedIP) Description() string

func (*AssignReservedIP) Documentation added in v0.13.0

func (a *AssignReservedIP) Documentation() string

func (*AssignReservedIP) ExampleOutput added in v0.13.0

func (a *AssignReservedIP) ExampleOutput() map[string]any

func (*AssignReservedIP) Execute added in v0.13.0

func (a *AssignReservedIP) Execute(ctx core.ExecutionContext) error

func (*AssignReservedIP) HandleAction added in v0.13.0

func (a *AssignReservedIP) HandleAction(ctx core.ActionContext) error

func (*AssignReservedIP) HandleWebhook added in v0.13.0

func (*AssignReservedIP) Icon added in v0.13.0

func (a *AssignReservedIP) Icon() string

func (*AssignReservedIP) Label added in v0.13.0

func (a *AssignReservedIP) Label() string

func (*AssignReservedIP) Name added in v0.13.0

func (a *AssignReservedIP) Name() string

func (*AssignReservedIP) OutputChannels added in v0.13.0

func (a *AssignReservedIP) OutputChannels(configuration any) []core.OutputChannel

func (*AssignReservedIP) ProcessQueueItem added in v0.13.0

func (a *AssignReservedIP) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*AssignReservedIP) Setup added in v0.13.0

func (a *AssignReservedIP) Setup(ctx core.SetupContext) error

type AssignReservedIPSpec added in v0.13.0

type AssignReservedIPSpec struct {
	ReservedIP string `json:"reservedIP" mapstructure:"reservedIP"`
	Action     string `json:"action" mapstructure:"action"`
	Droplet    string `json:"droplet" mapstructure:"droplet"`
}

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) CreateAlertPolicy added in v0.13.0

func (c *Client) CreateAlertPolicy(req CreateAlertPolicyRequest) (*AlertPolicy, error)

CreateAlertPolicy creates a new monitoring alert policy

func (*Client) CreateDNSRecord added in v0.13.0

func (c *Client) CreateDNSRecord(domain string, req DNSRecordRequest) (*DNSRecord, error)

CreateDNSRecord creates a new DNS record for a domain

func (*Client) CreateDroplet

func (c *Client) CreateDroplet(req CreateDropletRequest) (*Droplet, error)

CreateDroplet creates a new droplet

func (*Client) CreateDropletSnapshot added in v0.12.0

func (c *Client) CreateDropletSnapshot(dropletID int, name string) (*DOAction, error)

CreateDropletSnapshot creates a snapshot of a droplet

func (*Client) CreateLoadBalancer added in v0.13.0

func (c *Client) CreateLoadBalancer(req CreateLoadBalancerRequest) (*LoadBalancer, error)

CreateLoadBalancer creates a new load balancer

func (*Client) DeleteAlertPolicy added in v0.13.0

func (c *Client) DeleteAlertPolicy(policyID string) error

DeleteAlertPolicy deletes a monitoring alert policy by its UUID

func (*Client) DeleteDNSRecord added in v0.13.0

func (c *Client) DeleteDNSRecord(domain string, recordID int) error

DeleteDNSRecord deletes a DNS record by its ID

func (*Client) DeleteDroplet added in v0.12.0

func (c *Client) DeleteDroplet(dropletID int) error

DeleteDroplet deletes a droplet by its ID

func (*Client) DeleteLoadBalancer added in v0.13.0

func (c *Client) DeleteLoadBalancer(lbID string) error

DeleteLoadBalancer deletes a load balancer by its ID

func (*Client) DeleteSnapshot added in v0.12.0

func (c *Client) DeleteSnapshot(snapshotID string) error

DeleteSnapshot deletes a snapshot by ID

func (*Client) GetAccount

func (c *Client) GetAccount() (*Account, error)

GetAccount validates the API token by fetching account info

func (*Client) GetAction added in v0.12.0

func (c *Client) GetAction(actionID int) (*DOAction, error)

GetAction retrieves an action by its ID

func (*Client) GetAlertPolicy added in v0.13.0

func (c *Client) GetAlertPolicy(policyID string) (*AlertPolicy, error)

GetAlertPolicy retrieves a monitoring alert policy by its UUID

func (*Client) GetDroplet

func (c *Client) GetDroplet(dropletID int) (*Droplet, error)

GetDroplet retrieves a droplet by its ID

func (*Client) GetDropletBandwidthMetrics added in v0.13.0

func (c *Client) GetDropletBandwidthMetrics(dropletID, iface, direction string, start, end int64) (*MetricsResponse, error)

GetDropletBandwidthMetrics fetches network bandwidth metrics for a droplet.

func (*Client) GetDropletCPUMetrics added in v0.13.0

func (c *Client) GetDropletCPUMetrics(dropletID string, start, end int64) (*MetricsResponse, error)

GetDropletCPUMetrics fetches CPU usage percentage metrics for a droplet

func (*Client) GetDropletMemoryAvailableMetrics added in v0.13.0

func (c *Client) GetDropletMemoryAvailableMetrics(dropletID string, start, end int64) (*MetricsResponse, error)

GetDropletMemoryAvailableMetrics fetches available memory metrics for a droplet. Available memory includes free memory and reclaimable cache, matching what DigitalOcean's dashboard reports as memory utilization.

func (*Client) GetDropletMemoryTotalMetrics added in v0.13.0

func (c *Client) GetDropletMemoryTotalMetrics(dropletID string, start, end int64) (*MetricsResponse, error)

GetDropletMemoryTotalMetrics fetches total memory metrics for a droplet

func (*Client) GetDropletSnapshots added in v0.12.0

func (c *Client) GetDropletSnapshots(dropletID int) ([]Snapshot, error)

GetDropletSnapshots lists snapshots for a given droplet

func (*Client) GetLoadBalancer added in v0.13.0

func (c *Client) GetLoadBalancer(lbID string) (*LoadBalancer, error)

GetLoadBalancer retrieves a load balancer by its ID

func (*Client) GetSnapshot added in v0.12.0

func (c *Client) GetSnapshot(snapshotID string) (*Snapshot, error)

GetSnapshot retrieves a single snapshot by ID

func (*Client) ListActions

func (c *Client) ListActions(resourceType string) ([]DOAction, error)

ListActions retrieves actions filtered by resource type. The DigitalOcean /v2/actions API does not support resource_type as a query parameter, so we fetch all recent actions and filter client-side.

func (*Client) ListAlertPolicies added in v0.13.0

func (c *Client) ListAlertPolicies() ([]AlertPolicy, error)

ListAlertPolicies retrieves all monitoring alert policies in the account

func (*Client) ListDNSRecords added in v0.13.0

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

ListDNSRecords retrieves all DNS records for a domain

func (*Client) ListDomains added in v0.13.0

func (c *Client) ListDomains() ([]Domain, error)

ListDomains retrieves all domains in the account

func (*Client) ListDroplets added in v0.12.0

func (c *Client) ListDroplets() ([]Droplet, error)

ListDroplets retrieves all droplets in the account

func (*Client) ListImages

func (c *Client) ListImages(imageType string) ([]Image, error)

ListImages retrieves images of a given type (e.g., "distribution")

func (*Client) ListLoadBalancers added in v0.13.0

func (c *Client) ListLoadBalancers() ([]LoadBalancer, error)

ListLoadBalancers retrieves all load balancers in the account

func (*Client) ListRegions

func (c *Client) ListRegions() ([]Region, error)

ListRegions retrieves all available regions

func (*Client) ListReservedIPs added in v0.13.0

func (c *Client) ListReservedIPs() ([]ReservedIP, error)

ListReservedIPs retrieves all reserved IPs in the account

func (*Client) ListSSHKeys added in v0.13.0

func (c *Client) ListSSHKeys() ([]SSHKey, error)

ListSSHKeys retrieves all SSH keys on the account

func (*Client) ListSizes

func (c *Client) ListSizes() ([]Size, error)

ListSizes retrieves all available droplet sizes

func (*Client) ListSnapshots added in v0.12.0

func (c *Client) ListSnapshots() ([]Snapshot, error)

ListSnapshots retrieves all droplet snapshots

func (*Client) ListVPCs added in v0.13.0

func (c *Client) ListVPCs() ([]VPC, error)

ListVPCs retrieves all VPCs in the account

func (*Client) PostDropletAction added in v0.12.0

func (c *Client) PostDropletAction(dropletID int, actionType string) (*DOAction, error)

PostDropletAction initiates a power action on a droplet

func (*Client) PostReservedIPAction added in v0.13.0

func (c *Client) PostReservedIPAction(reservedIP, actionType string, dropletID *int) (*DOAction, error)

PostReservedIPAction initiates an assign or unassign action for a reserved IP

func (*Client) UpdateAlertPolicy added in v0.13.0

func (c *Client) UpdateAlertPolicy(policyID string, req UpdateAlertPolicyRequest) (*AlertPolicy, error)

UpdateAlertPolicy updates an existing monitoring alert policy

func (*Client) UpdateDNSRecord added in v0.13.0

func (c *Client) UpdateDNSRecord(domain string, recordID int, req DNSRecordRequest) (*DNSRecord, error)

UpdateDNSRecord updates an existing DNS record

type Configuration

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

type CreateAlertPolicy added in v0.13.0

type CreateAlertPolicy struct{}

func (*CreateAlertPolicy) Actions added in v0.13.0

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

func (*CreateAlertPolicy) Cancel added in v0.13.0

func (*CreateAlertPolicy) Cleanup added in v0.13.0

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

func (*CreateAlertPolicy) Color added in v0.13.0

func (c *CreateAlertPolicy) Color() string

func (*CreateAlertPolicy) Configuration added in v0.13.0

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

func (*CreateAlertPolicy) Description added in v0.13.0

func (c *CreateAlertPolicy) Description() string

func (*CreateAlertPolicy) Documentation added in v0.13.0

func (c *CreateAlertPolicy) Documentation() string

func (*CreateAlertPolicy) ExampleOutput added in v0.13.0

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

func (*CreateAlertPolicy) Execute added in v0.13.0

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

func (*CreateAlertPolicy) HandleAction added in v0.13.0

func (c *CreateAlertPolicy) HandleAction(ctx core.ActionContext) error

func (*CreateAlertPolicy) HandleWebhook added in v0.13.0

func (*CreateAlertPolicy) Icon added in v0.13.0

func (c *CreateAlertPolicy) Icon() string

func (*CreateAlertPolicy) Label added in v0.13.0

func (c *CreateAlertPolicy) Label() string

func (*CreateAlertPolicy) Name added in v0.13.0

func (c *CreateAlertPolicy) Name() string

func (*CreateAlertPolicy) OutputChannels added in v0.13.0

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

func (*CreateAlertPolicy) ProcessQueueItem added in v0.13.0

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

func (*CreateAlertPolicy) Setup added in v0.13.0

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

type CreateAlertPolicyRequest added in v0.13.0

type CreateAlertPolicyRequest struct {
	Type        string            `json:"type"`
	Description string            `json:"description"`
	Compare     string            `json:"compare"`
	Value       float64           `json:"value"`
	Window      string            `json:"window"`
	Entities    []string          `json:"entities,omitempty"`
	Tags        []string          `json:"tags,omitempty"`
	Alerts      AlertPolicyAlerts `json:"alerts"`
	Enabled     bool              `json:"enabled"`
}

CreateAlertPolicyRequest is the payload for creating a monitoring alert policy

type CreateAlertPolicySpec added in v0.13.0

type CreateAlertPolicySpec struct {
	Description  string   `json:"description" mapstructure:"description"`
	Type         string   `json:"type" mapstructure:"type"`
	Compare      string   `json:"compare" mapstructure:"compare"`
	Value        float64  `json:"value" mapstructure:"value"`
	Window       string   `json:"window" mapstructure:"window"`
	Entities     []string `json:"entities" mapstructure:"entities"`
	Tags         []string `json:"tags" mapstructure:"tags"`
	Enabled      bool     `json:"enabled" mapstructure:"enabled"`
	Email        []string `json:"email" mapstructure:"email"`
	SlackChannel string   `json:"slackChannel" mapstructure:"slackChannel"`
	SlackURL     string   `json:"slackUrl" mapstructure:"slackUrl"`
}

type CreateDNSRecord added in v0.13.0

type CreateDNSRecord struct{}

func (*CreateDNSRecord) Actions added in v0.13.0

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

func (*CreateDNSRecord) Cancel added in v0.13.0

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

func (*CreateDNSRecord) Cleanup added in v0.13.0

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

func (*CreateDNSRecord) Color added in v0.13.0

func (c *CreateDNSRecord) Color() string

func (*CreateDNSRecord) Configuration added in v0.13.0

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

func (*CreateDNSRecord) Description added in v0.13.0

func (c *CreateDNSRecord) Description() string

func (*CreateDNSRecord) Documentation added in v0.13.0

func (c *CreateDNSRecord) Documentation() string

func (*CreateDNSRecord) ExampleOutput added in v0.13.0

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

func (*CreateDNSRecord) Execute added in v0.13.0

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

func (*CreateDNSRecord) HandleAction added in v0.13.0

func (c *CreateDNSRecord) HandleAction(ctx core.ActionContext) error

func (*CreateDNSRecord) HandleWebhook added in v0.13.0

func (*CreateDNSRecord) Icon added in v0.13.0

func (c *CreateDNSRecord) Icon() string

func (*CreateDNSRecord) Label added in v0.13.0

func (c *CreateDNSRecord) Label() string

func (*CreateDNSRecord) Name added in v0.13.0

func (c *CreateDNSRecord) Name() string

func (*CreateDNSRecord) OutputChannels added in v0.13.0

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

func (*CreateDNSRecord) ProcessQueueItem added in v0.13.0

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

func (*CreateDNSRecord) Setup added in v0.13.0

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

type CreateDNSRecordSpec added in v0.13.0

type CreateDNSRecordSpec struct {
	Domain   string `json:"domain"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Data     string `json:"data"`
	TTL      string `json:"ttl"`
	Priority string `json:"priority"`
	Port     string `json:"port"`
	Weight   string `json:"weight"`
}

type CreateDroplet

type CreateDroplet struct{}

func (*CreateDroplet) Actions

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

func (*CreateDroplet) Cancel

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

func (*CreateDroplet) Cleanup

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

func (*CreateDroplet) Color

func (c *CreateDroplet) Color() string

func (*CreateDroplet) Configuration

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

func (*CreateDroplet) Description

func (c *CreateDroplet) Description() string

func (*CreateDroplet) Documentation

func (c *CreateDroplet) Documentation() string

func (*CreateDroplet) ExampleOutput

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

func (*CreateDroplet) Execute

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

func (*CreateDroplet) HandleAction

func (c *CreateDroplet) HandleAction(ctx core.ActionContext) error

func (*CreateDroplet) HandleWebhook

func (*CreateDroplet) Icon

func (c *CreateDroplet) Icon() string

func (*CreateDroplet) Label

func (c *CreateDroplet) Label() string

func (*CreateDroplet) Name

func (c *CreateDroplet) Name() string

func (*CreateDroplet) OutputChannels

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

func (*CreateDroplet) ProcessQueueItem

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

func (*CreateDroplet) Setup

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

type CreateDropletRequest

type CreateDropletRequest struct {
	Name       string   `json:"name"`
	Region     string   `json:"region"`
	Size       string   `json:"size"`
	Image      string   `json:"image"`
	SSHKeys    []string `json:"ssh_keys,omitempty"`
	Tags       []string `json:"tags,omitempty"`
	UserData   string   `json:"user_data,omitempty"`
	Backups    bool     `json:"backups,omitempty"`
	IPv6       bool     `json:"ipv6,omitempty"`
	Monitoring bool     `json:"monitoring,omitempty"`
	VpcUUID    string   `json:"vpc_uuid,omitempty"`
}

CreateDropletRequest is the payload for creating a droplet

type CreateDropletSpec

type CreateDropletSpec struct {
	Name       string   `json:"name"`
	Region     string   `json:"region"`
	Size       string   `json:"size"`
	Image      string   `json:"image"`
	SSHKeys    []string `json:"sshKeys"`
	Tags       []string `json:"tags"`
	UserData   string   `json:"userData"`
	Backups    bool     `json:"backups"`
	IPv6       bool     `json:"ipv6"`
	Monitoring bool     `json:"monitoring"`
	VpcUUID    string   `json:"vpcUuid"`
}

type CreateLoadBalancer added in v0.13.0

type CreateLoadBalancer struct{}

func (*CreateLoadBalancer) Actions added in v0.13.0

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

func (*CreateLoadBalancer) Cancel added in v0.13.0

func (*CreateLoadBalancer) Cleanup added in v0.13.0

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

func (*CreateLoadBalancer) Color added in v0.13.0

func (c *CreateLoadBalancer) Color() string

func (*CreateLoadBalancer) Configuration added in v0.13.0

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

func (*CreateLoadBalancer) Description added in v0.13.0

func (c *CreateLoadBalancer) Description() string

func (*CreateLoadBalancer) Documentation added in v0.13.0

func (c *CreateLoadBalancer) Documentation() string

func (*CreateLoadBalancer) ExampleOutput added in v0.13.0

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

func (*CreateLoadBalancer) Execute added in v0.13.0

func (*CreateLoadBalancer) HandleAction added in v0.13.0

func (c *CreateLoadBalancer) HandleAction(ctx core.ActionContext) error

func (*CreateLoadBalancer) HandleWebhook added in v0.13.0

func (*CreateLoadBalancer) Icon added in v0.13.0

func (c *CreateLoadBalancer) Icon() string

func (*CreateLoadBalancer) Label added in v0.13.0

func (c *CreateLoadBalancer) Label() string

func (*CreateLoadBalancer) Name added in v0.13.0

func (c *CreateLoadBalancer) Name() string

func (*CreateLoadBalancer) OutputChannels added in v0.13.0

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

func (*CreateLoadBalancer) ProcessQueueItem added in v0.13.0

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

func (*CreateLoadBalancer) Setup added in v0.13.0

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

type CreateLoadBalancerRequest added in v0.13.0

type CreateLoadBalancerRequest struct {
	Name            string           `json:"name"`
	Region          string           `json:"region"`
	ForwardingRules []ForwardingRule `json:"forwarding_rules"`
	DropletIDs      []int            `json:"droplet_ids,omitempty"`
	Tag             string           `json:"tag,omitempty"`
}

CreateLoadBalancerRequest is the payload for creating a load balancer

type CreateLoadBalancerSpec added in v0.13.0

type CreateLoadBalancerSpec struct {
	Name            string               `json:"name" mapstructure:"name"`
	Region          string               `json:"region" mapstructure:"region"`
	ForwardingRules []ForwardingRuleSpec `json:"forwardingRules" mapstructure:"forwardingRules"`
	Droplets        []string             `json:"droplets" mapstructure:"droplets"`
	Tag             string               `json:"tag" mapstructure:"tag"`
}

type CreateSnapshot added in v0.12.0

type CreateSnapshot struct{}

func (*CreateSnapshot) Actions added in v0.12.0

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

func (*CreateSnapshot) Cancel added in v0.12.0

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

func (*CreateSnapshot) Cleanup added in v0.12.0

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

func (*CreateSnapshot) Color added in v0.12.0

func (c *CreateSnapshot) Color() string

func (*CreateSnapshot) Configuration added in v0.12.0

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

func (*CreateSnapshot) Description added in v0.12.0

func (c *CreateSnapshot) Description() string

func (*CreateSnapshot) Documentation added in v0.12.0

func (c *CreateSnapshot) Documentation() string

func (*CreateSnapshot) ExampleOutput added in v0.12.0

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

func (*CreateSnapshot) Execute added in v0.12.0

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

func (*CreateSnapshot) HandleAction added in v0.12.0

func (c *CreateSnapshot) HandleAction(ctx core.ActionContext) error

func (*CreateSnapshot) HandleWebhook added in v0.12.0

func (*CreateSnapshot) Icon added in v0.12.0

func (c *CreateSnapshot) Icon() string

func (*CreateSnapshot) Label added in v0.12.0

func (c *CreateSnapshot) Label() string

func (*CreateSnapshot) Name added in v0.12.0

func (c *CreateSnapshot) Name() string

func (*CreateSnapshot) OutputChannels added in v0.12.0

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

func (*CreateSnapshot) ProcessQueueItem added in v0.12.0

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

func (*CreateSnapshot) Setup added in v0.12.0

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

type CreateSnapshotSpec added in v0.12.0

type CreateSnapshotSpec struct {
	Droplet string `json:"droplet" mapstructure:"droplet"`
	Name    string `json:"name" mapstructure:"name"`
}

type DNSRecord added in v0.13.0

type DNSRecord struct {
	ID       int    `json:"id"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Data     string `json:"data"`
	Priority *int   `json:"priority"`
	Port     *int   `json:"port"`
	TTL      int    `json:"ttl"`
	Weight   *int   `json:"weight"`
}

DNSRecord represents a DigitalOcean DNS record

type DNSRecordNodeMetadata added in v0.13.0

type DNSRecordNodeMetadata struct {
	RecordID   int    `json:"recordId" mapstructure:"recordId"`
	RecordName string `json:"recordName" mapstructure:"recordName"`
}

DNSRecordNodeMetadata stores metadata about a DNS record for display in the UI

type DNSRecordRequest added in v0.13.0

type DNSRecordRequest struct {
	Type     string `json:"type"`
	Name     string `json:"name"`
	Data     string `json:"data"`
	TTL      int    `json:"ttl,omitempty"`
	Priority *int   `json:"priority,omitempty"`
	Port     *int   `json:"port,omitempty"`
	Weight   *int   `json:"weight,omitempty"`
}

DNSRecordRequest is the payload for creating or updating a DNS record

type DOAPIError

type DOAPIError struct {
	StatusCode int
	Body       []byte
}

func (*DOAPIError) Error

func (e *DOAPIError) Error() string

type DOAction

type DOAction struct {
	ID           int    `json:"id"`
	Status       string `json:"status"`
	Type         string `json:"type"`
	StartedAt    string `json:"started_at"`
	CompletedAt  string `json:"completed_at"`
	ResourceID   int    `json:"resource_id"`
	ResourceType string `json:"resource_type"`
	RegionSlug   string `json:"region_slug"`
}

DOAction represents a DigitalOcean action

type DeleteAlertPolicy added in v0.13.0

type DeleteAlertPolicy struct{}

func (*DeleteAlertPolicy) Actions added in v0.13.0

func (d *DeleteAlertPolicy) Actions() []core.Action

func (*DeleteAlertPolicy) Cancel added in v0.13.0

func (*DeleteAlertPolicy) Cleanup added in v0.13.0

func (d *DeleteAlertPolicy) Cleanup(ctx core.SetupContext) error

func (*DeleteAlertPolicy) Color added in v0.13.0

func (d *DeleteAlertPolicy) Color() string

func (*DeleteAlertPolicy) Configuration added in v0.13.0

func (d *DeleteAlertPolicy) Configuration() []configuration.Field

func (*DeleteAlertPolicy) Description added in v0.13.0

func (d *DeleteAlertPolicy) Description() string

func (*DeleteAlertPolicy) Documentation added in v0.13.0

func (d *DeleteAlertPolicy) Documentation() string

func (*DeleteAlertPolicy) ExampleOutput added in v0.13.0

func (d *DeleteAlertPolicy) ExampleOutput() map[string]any

func (*DeleteAlertPolicy) Execute added in v0.13.0

func (d *DeleteAlertPolicy) Execute(ctx core.ExecutionContext) error

func (*DeleteAlertPolicy) HandleAction added in v0.13.0

func (d *DeleteAlertPolicy) HandleAction(ctx core.ActionContext) error

func (*DeleteAlertPolicy) HandleWebhook added in v0.13.0

func (*DeleteAlertPolicy) Icon added in v0.13.0

func (d *DeleteAlertPolicy) Icon() string

func (*DeleteAlertPolicy) Label added in v0.13.0

func (d *DeleteAlertPolicy) Label() string

func (*DeleteAlertPolicy) Name added in v0.13.0

func (d *DeleteAlertPolicy) Name() string

func (*DeleteAlertPolicy) OutputChannels added in v0.13.0

func (d *DeleteAlertPolicy) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteAlertPolicy) ProcessQueueItem added in v0.13.0

func (d *DeleteAlertPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteAlertPolicy) Setup added in v0.13.0

func (d *DeleteAlertPolicy) Setup(ctx core.SetupContext) error

type DeleteAlertPolicySpec added in v0.13.0

type DeleteAlertPolicySpec struct {
	AlertPolicy string `json:"alertPolicy" mapstructure:"alertPolicy"`
}

type DeleteDNSRecord added in v0.13.0

type DeleteDNSRecord struct{}

func (*DeleteDNSRecord) Actions added in v0.13.0

func (d *DeleteDNSRecord) Actions() []core.Action

func (*DeleteDNSRecord) Cancel added in v0.13.0

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

func (*DeleteDNSRecord) Cleanup added in v0.13.0

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

func (*DeleteDNSRecord) Color added in v0.13.0

func (d *DeleteDNSRecord) Color() string

func (*DeleteDNSRecord) Configuration added in v0.13.0

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

func (*DeleteDNSRecord) Description added in v0.13.0

func (d *DeleteDNSRecord) Description() string

func (*DeleteDNSRecord) Documentation added in v0.13.0

func (d *DeleteDNSRecord) Documentation() string

func (*DeleteDNSRecord) ExampleOutput added in v0.13.0

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

func (*DeleteDNSRecord) Execute added in v0.13.0

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

func (*DeleteDNSRecord) HandleAction added in v0.13.0

func (d *DeleteDNSRecord) HandleAction(ctx core.ActionContext) error

func (*DeleteDNSRecord) HandleWebhook added in v0.13.0

func (*DeleteDNSRecord) Icon added in v0.13.0

func (d *DeleteDNSRecord) Icon() string

func (*DeleteDNSRecord) Label added in v0.13.0

func (d *DeleteDNSRecord) Label() string

func (*DeleteDNSRecord) Name added in v0.13.0

func (d *DeleteDNSRecord) Name() string

func (*DeleteDNSRecord) OutputChannels added in v0.13.0

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

func (*DeleteDNSRecord) ProcessQueueItem added in v0.13.0

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

func (*DeleteDNSRecord) Setup added in v0.13.0

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

type DeleteDNSRecordSpec added in v0.13.0

type DeleteDNSRecordSpec struct {
	Domain   string `json:"domain"`
	RecordID string `json:"recordId"`
}

type DeleteDroplet added in v0.12.0

type DeleteDroplet struct{}

func (*DeleteDroplet) Actions added in v0.12.0

func (d *DeleteDroplet) Actions() []core.Action

func (*DeleteDroplet) Cancel added in v0.12.0

func (d *DeleteDroplet) Cancel(ctx core.ExecutionContext) error

func (*DeleteDroplet) Cleanup added in v0.12.0

func (d *DeleteDroplet) Cleanup(ctx core.SetupContext) error

func (*DeleteDroplet) Color added in v0.12.0

func (d *DeleteDroplet) Color() string

func (*DeleteDroplet) Configuration added in v0.12.0

func (d *DeleteDroplet) Configuration() []configuration.Field

func (*DeleteDroplet) Description added in v0.12.0

func (d *DeleteDroplet) Description() string

func (*DeleteDroplet) Documentation added in v0.12.0

func (d *DeleteDroplet) Documentation() string

func (*DeleteDroplet) ExampleOutput added in v0.12.0

func (d *DeleteDroplet) ExampleOutput() map[string]any

func (*DeleteDroplet) Execute added in v0.12.0

func (d *DeleteDroplet) Execute(ctx core.ExecutionContext) error

func (*DeleteDroplet) HandleAction added in v0.12.0

func (d *DeleteDroplet) HandleAction(ctx core.ActionContext) error

func (*DeleteDroplet) HandleWebhook added in v0.12.0

func (*DeleteDroplet) Icon added in v0.12.0

func (d *DeleteDroplet) Icon() string

func (*DeleteDroplet) Label added in v0.12.0

func (d *DeleteDroplet) Label() string

func (*DeleteDroplet) Name added in v0.12.0

func (d *DeleteDroplet) Name() string

func (*DeleteDroplet) OutputChannels added in v0.12.0

func (d *DeleteDroplet) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteDroplet) ProcessQueueItem added in v0.12.0

func (d *DeleteDroplet) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteDroplet) Setup added in v0.12.0

func (d *DeleteDroplet) Setup(ctx core.SetupContext) error

type DeleteDropletSpec added in v0.12.0

type DeleteDropletSpec struct {
	Droplet string `json:"droplet"`
}

type DeleteLoadBalancer added in v0.13.0

type DeleteLoadBalancer struct{}

func (*DeleteLoadBalancer) Actions added in v0.13.0

func (d *DeleteLoadBalancer) Actions() []core.Action

func (*DeleteLoadBalancer) Cancel added in v0.13.0

func (*DeleteLoadBalancer) Cleanup added in v0.13.0

func (d *DeleteLoadBalancer) Cleanup(ctx core.SetupContext) error

func (*DeleteLoadBalancer) Color added in v0.13.0

func (d *DeleteLoadBalancer) Color() string

func (*DeleteLoadBalancer) Configuration added in v0.13.0

func (d *DeleteLoadBalancer) Configuration() []configuration.Field

func (*DeleteLoadBalancer) Description added in v0.13.0

func (d *DeleteLoadBalancer) Description() string

func (*DeleteLoadBalancer) Documentation added in v0.13.0

func (d *DeleteLoadBalancer) Documentation() string

func (*DeleteLoadBalancer) ExampleOutput added in v0.13.0

func (d *DeleteLoadBalancer) ExampleOutput() map[string]any

func (*DeleteLoadBalancer) Execute added in v0.13.0

func (*DeleteLoadBalancer) HandleAction added in v0.13.0

func (d *DeleteLoadBalancer) HandleAction(ctx core.ActionContext) error

func (*DeleteLoadBalancer) HandleWebhook added in v0.13.0

func (*DeleteLoadBalancer) Icon added in v0.13.0

func (d *DeleteLoadBalancer) Icon() string

func (*DeleteLoadBalancer) Label added in v0.13.0

func (d *DeleteLoadBalancer) Label() string

func (*DeleteLoadBalancer) Name added in v0.13.0

func (d *DeleteLoadBalancer) Name() string

func (*DeleteLoadBalancer) OutputChannels added in v0.13.0

func (d *DeleteLoadBalancer) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteLoadBalancer) ProcessQueueItem added in v0.13.0

func (d *DeleteLoadBalancer) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteLoadBalancer) Setup added in v0.13.0

func (d *DeleteLoadBalancer) Setup(ctx core.SetupContext) error

type DeleteLoadBalancerSpec added in v0.13.0

type DeleteLoadBalancerSpec struct {
	LoadBalancerID string `json:"loadBalancerID" mapstructure:"loadBalancerID"`
}

type DeleteSnapshot added in v0.12.0

type DeleteSnapshot struct{}

func (*DeleteSnapshot) Actions added in v0.12.0

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

func (*DeleteSnapshot) Cancel added in v0.12.0

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

func (*DeleteSnapshot) Cleanup added in v0.12.0

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

func (*DeleteSnapshot) Color added in v0.12.0

func (c *DeleteSnapshot) Color() string

func (*DeleteSnapshot) Configuration added in v0.12.0

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

func (*DeleteSnapshot) Description added in v0.12.0

func (c *DeleteSnapshot) Description() string

func (*DeleteSnapshot) Documentation added in v0.12.0

func (c *DeleteSnapshot) Documentation() string

func (*DeleteSnapshot) ExampleOutput added in v0.12.0

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

func (*DeleteSnapshot) Execute added in v0.12.0

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

func (*DeleteSnapshot) HandleAction added in v0.12.0

func (c *DeleteSnapshot) HandleAction(ctx core.ActionContext) error

func (*DeleteSnapshot) HandleWebhook added in v0.12.0

func (*DeleteSnapshot) Icon added in v0.12.0

func (c *DeleteSnapshot) Icon() string

func (*DeleteSnapshot) Label added in v0.12.0

func (c *DeleteSnapshot) Label() string

func (*DeleteSnapshot) Name added in v0.12.0

func (c *DeleteSnapshot) Name() string

func (*DeleteSnapshot) OutputChannels added in v0.12.0

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

func (*DeleteSnapshot) ProcessQueueItem added in v0.12.0

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

func (*DeleteSnapshot) Setup added in v0.12.0

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

type DeleteSnapshotSpec added in v0.12.0

type DeleteSnapshotSpec struct {
	Snapshot string `json:"snapshot" mapstructure:"snapshot"`
}

type DigitalOcean

type DigitalOcean struct{}

func (*DigitalOcean) Actions

func (d *DigitalOcean) Actions() []core.Action

func (*DigitalOcean) Cleanup

func (*DigitalOcean) Components

func (d *DigitalOcean) Components() []core.Component

func (*DigitalOcean) Configuration

func (d *DigitalOcean) Configuration() []configuration.Field

func (*DigitalOcean) Description

func (d *DigitalOcean) Description() string

func (*DigitalOcean) HandleAction

func (d *DigitalOcean) HandleAction(ctx core.IntegrationActionContext) error

func (*DigitalOcean) HandleRequest

func (d *DigitalOcean) HandleRequest(ctx core.HTTPRequestContext)

func (*DigitalOcean) Icon

func (d *DigitalOcean) Icon() string

func (*DigitalOcean) Instructions

func (d *DigitalOcean) Instructions() string

func (*DigitalOcean) Label

func (d *DigitalOcean) Label() string

func (*DigitalOcean) ListResources

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

func (*DigitalOcean) Name

func (d *DigitalOcean) Name() string

func (*DigitalOcean) Sync

func (d *DigitalOcean) Sync(ctx core.SyncContext) error

func (*DigitalOcean) Triggers

func (d *DigitalOcean) Triggers() []core.Trigger

type Domain added in v0.13.0

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

Domain represents a DigitalOcean domain

type Droplet

type Droplet struct {
	ID       int             `json:"id"`
	Name     string          `json:"name"`
	Memory   int             `json:"memory"`
	VCPUs    int             `json:"vcpus"`
	Disk     int             `json:"disk"`
	Status   string          `json:"status"`
	Region   DropletRegion   `json:"region"`
	Image    DropletImage    `json:"image"`
	SizeSlug string          `json:"size_slug"`
	Networks DropletNetworks `json:"networks"`
	Tags     []string        `json:"tags"`
	Features []string        `json:"features"`
}

Droplet represents a DigitalOcean droplet

type DropletImage

type DropletImage struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type DropletNetworkV4

type DropletNetworkV4 struct {
	IPAddress string `json:"ip_address"`
	Type      string `json:"type"`
}

type DropletNetworks

type DropletNetworks struct {
	V4 []DropletNetworkV4 `json:"v4"`
}

type DropletNodeMetadata added in v0.12.0

type DropletNodeMetadata struct {
	DropletID   int    `json:"dropletId" mapstructure:"dropletId"`
	DropletName string `json:"dropletName" mapstructure:"dropletName"`
}

DropletNodeMetadata stores metadata about a droplet for display in the UI

type DropletRegion

type DropletRegion struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type ForwardingRule added in v0.13.0

type ForwardingRule struct {
	EntryProtocol  string `json:"entry_protocol"`
	EntryPort      int    `json:"entry_port"`
	TargetProtocol string `json:"target_protocol"`
	TargetPort     int    `json:"target_port"`
	TLSPassthrough bool   `json:"tls_passthrough,omitempty"`
}

ForwardingRule defines a load balancer forwarding rule

type ForwardingRuleSpec added in v0.13.0

type ForwardingRuleSpec struct {
	EntryProtocol  string `json:"entryProtocol" mapstructure:"entryProtocol"`
	EntryPort      int    `json:"entryPort" mapstructure:"entryPort"`
	TargetProtocol string `json:"targetProtocol" mapstructure:"targetProtocol"`
	TargetPort     int    `json:"targetPort" mapstructure:"targetPort"`
	TLSPassthrough bool   `json:"tlsPassthrough" mapstructure:"tlsPassthrough"`
}

type GetAlertPolicy added in v0.13.0

type GetAlertPolicy struct{}

func (*GetAlertPolicy) Actions added in v0.13.0

func (g *GetAlertPolicy) Actions() []core.Action

func (*GetAlertPolicy) Cancel added in v0.13.0

func (g *GetAlertPolicy) Cancel(ctx core.ExecutionContext) error

func (*GetAlertPolicy) Cleanup added in v0.13.0

func (g *GetAlertPolicy) Cleanup(ctx core.SetupContext) error

func (*GetAlertPolicy) Color added in v0.13.0

func (g *GetAlertPolicy) Color() string

func (*GetAlertPolicy) Configuration added in v0.13.0

func (g *GetAlertPolicy) Configuration() []configuration.Field

func (*GetAlertPolicy) Description added in v0.13.0

func (g *GetAlertPolicy) Description() string

func (*GetAlertPolicy) Documentation added in v0.13.0

func (g *GetAlertPolicy) Documentation() string

func (*GetAlertPolicy) ExampleOutput added in v0.13.0

func (g *GetAlertPolicy) ExampleOutput() map[string]any

func (*GetAlertPolicy) Execute added in v0.13.0

func (g *GetAlertPolicy) Execute(ctx core.ExecutionContext) error

func (*GetAlertPolicy) HandleAction added in v0.13.0

func (g *GetAlertPolicy) HandleAction(ctx core.ActionContext) error

func (*GetAlertPolicy) HandleWebhook added in v0.13.0

func (*GetAlertPolicy) Icon added in v0.13.0

func (g *GetAlertPolicy) Icon() string

func (*GetAlertPolicy) Label added in v0.13.0

func (g *GetAlertPolicy) Label() string

func (*GetAlertPolicy) Name added in v0.13.0

func (g *GetAlertPolicy) Name() string

func (*GetAlertPolicy) OutputChannels added in v0.13.0

func (g *GetAlertPolicy) OutputChannels(configuration any) []core.OutputChannel

func (*GetAlertPolicy) ProcessQueueItem added in v0.13.0

func (g *GetAlertPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetAlertPolicy) Setup added in v0.13.0

func (g *GetAlertPolicy) Setup(ctx core.SetupContext) error

type GetAlertPolicySpec added in v0.13.0

type GetAlertPolicySpec struct {
	AlertPolicy string `json:"alertPolicy" mapstructure:"alertPolicy"`
}

type GetDroplet added in v0.12.0

type GetDroplet struct{}

func (*GetDroplet) Actions added in v0.12.0

func (g *GetDroplet) Actions() []core.Action

func (*GetDroplet) Cancel added in v0.12.0

func (g *GetDroplet) Cancel(ctx core.ExecutionContext) error

func (*GetDroplet) Cleanup added in v0.12.0

func (g *GetDroplet) Cleanup(ctx core.SetupContext) error

func (*GetDroplet) Color added in v0.12.0

func (g *GetDroplet) Color() string

func (*GetDroplet) Configuration added in v0.12.0

func (g *GetDroplet) Configuration() []configuration.Field

func (*GetDroplet) Description added in v0.12.0

func (g *GetDroplet) Description() string

func (*GetDroplet) Documentation added in v0.12.0

func (g *GetDroplet) Documentation() string

func (*GetDroplet) ExampleOutput added in v0.12.0

func (g *GetDroplet) ExampleOutput() map[string]any

func (*GetDroplet) Execute added in v0.12.0

func (g *GetDroplet) Execute(ctx core.ExecutionContext) error

func (*GetDroplet) HandleAction added in v0.12.0

func (g *GetDroplet) HandleAction(ctx core.ActionContext) error

func (*GetDroplet) HandleWebhook added in v0.12.0

func (*GetDroplet) Icon added in v0.12.0

func (g *GetDroplet) Icon() string

func (*GetDroplet) Label added in v0.12.0

func (g *GetDroplet) Label() string

func (*GetDroplet) Name added in v0.12.0

func (g *GetDroplet) Name() string

func (*GetDroplet) OutputChannels added in v0.12.0

func (g *GetDroplet) OutputChannels(configuration any) []core.OutputChannel

func (*GetDroplet) ProcessQueueItem added in v0.12.0

func (g *GetDroplet) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetDroplet) Setup added in v0.12.0

func (g *GetDroplet) Setup(ctx core.SetupContext) error

type GetDropletMetrics added in v0.13.0

type GetDropletMetrics struct{}

func (*GetDropletMetrics) Actions added in v0.13.0

func (g *GetDropletMetrics) Actions() []core.Action

func (*GetDropletMetrics) Cancel added in v0.13.0

func (*GetDropletMetrics) Cleanup added in v0.13.0

func (g *GetDropletMetrics) Cleanup(ctx core.SetupContext) error

func (*GetDropletMetrics) Color added in v0.13.0

func (g *GetDropletMetrics) Color() string

func (*GetDropletMetrics) Configuration added in v0.13.0

func (g *GetDropletMetrics) Configuration() []configuration.Field

func (*GetDropletMetrics) Description added in v0.13.0

func (g *GetDropletMetrics) Description() string

func (*GetDropletMetrics) Documentation added in v0.13.0

func (g *GetDropletMetrics) Documentation() string

func (*GetDropletMetrics) ExampleOutput added in v0.13.0

func (g *GetDropletMetrics) ExampleOutput() map[string]any

func (*GetDropletMetrics) Execute added in v0.13.0

func (g *GetDropletMetrics) Execute(ctx core.ExecutionContext) error

func (*GetDropletMetrics) HandleAction added in v0.13.0

func (g *GetDropletMetrics) HandleAction(ctx core.ActionContext) error

func (*GetDropletMetrics) HandleWebhook added in v0.13.0

func (*GetDropletMetrics) Icon added in v0.13.0

func (g *GetDropletMetrics) Icon() string

func (*GetDropletMetrics) Label added in v0.13.0

func (g *GetDropletMetrics) Label() string

func (*GetDropletMetrics) Name added in v0.13.0

func (g *GetDropletMetrics) Name() string

func (*GetDropletMetrics) OutputChannels added in v0.13.0

func (g *GetDropletMetrics) OutputChannels(configuration any) []core.OutputChannel

func (*GetDropletMetrics) ProcessQueueItem added in v0.13.0

func (g *GetDropletMetrics) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetDropletMetrics) Setup added in v0.13.0

func (g *GetDropletMetrics) Setup(ctx core.SetupContext) error

type GetDropletMetricsSpec added in v0.13.0

type GetDropletMetricsSpec struct {
	Droplet        string `json:"droplet" mapstructure:"droplet"`
	LookbackPeriod string `json:"lookbackPeriod" mapstructure:"lookbackPeriod"`
}

type GetDropletSpec added in v0.12.0

type GetDropletSpec struct {
	Droplet string `json:"droplet"`
}

type Image

type Image struct {
	ID           int    `json:"id"`
	Name         string `json:"name"`
	Slug         string `json:"slug"`
	Type         string `json:"type"`
	Distribution string `json:"distribution"`
}

Image represents a DigitalOcean image

type LBNodeMetadata added in v0.13.0

type LBNodeMetadata struct {
	LBID   string `json:"lbId" mapstructure:"lbId"`
	LBName string `json:"lbName" mapstructure:"lbName"`
}

LBNodeMetadata stores metadata about a load balancer for display in the UI

type LoadBalancer added in v0.13.0

type LoadBalancer struct {
	ID              string           `json:"id"`
	Name            string           `json:"name"`
	IP              string           `json:"ip"`
	Status          string           `json:"status"`
	Algorithm       string           `json:"algorithm"`
	Region          DropletRegion    `json:"region"`
	ForwardingRules []ForwardingRule `json:"forwarding_rules"`
	DropletIDs      []int            `json:"droplet_ids"`
	Tag             string           `json:"tag"`
	CreatedAt       string           `json:"created_at"`
}

LoadBalancer represents a DigitalOcean load balancer

type ManageDropletPower added in v0.12.0

type ManageDropletPower struct{}

func (*ManageDropletPower) Actions added in v0.12.0

func (m *ManageDropletPower) Actions() []core.Action

func (*ManageDropletPower) Cancel added in v0.12.0

func (*ManageDropletPower) Cleanup added in v0.12.0

func (m *ManageDropletPower) Cleanup(ctx core.SetupContext) error

func (*ManageDropletPower) Color added in v0.12.0

func (m *ManageDropletPower) Color() string

func (*ManageDropletPower) Configuration added in v0.12.0

func (m *ManageDropletPower) Configuration() []configuration.Field

func (*ManageDropletPower) Description added in v0.12.0

func (m *ManageDropletPower) Description() string

func (*ManageDropletPower) Documentation added in v0.12.0

func (m *ManageDropletPower) Documentation() string

func (*ManageDropletPower) ExampleOutput added in v0.12.0

func (m *ManageDropletPower) ExampleOutput() map[string]any

func (*ManageDropletPower) Execute added in v0.12.0

func (*ManageDropletPower) HandleAction added in v0.12.0

func (m *ManageDropletPower) HandleAction(ctx core.ActionContext) error

func (*ManageDropletPower) HandleWebhook added in v0.12.0

func (*ManageDropletPower) Icon added in v0.12.0

func (m *ManageDropletPower) Icon() string

func (*ManageDropletPower) Label added in v0.12.0

func (m *ManageDropletPower) Label() string

func (*ManageDropletPower) Name added in v0.12.0

func (m *ManageDropletPower) Name() string

func (*ManageDropletPower) OutputChannels added in v0.12.0

func (m *ManageDropletPower) OutputChannels(configuration any) []core.OutputChannel

func (*ManageDropletPower) ProcessQueueItem added in v0.12.0

func (m *ManageDropletPower) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*ManageDropletPower) Setup added in v0.12.0

func (m *ManageDropletPower) Setup(ctx core.SetupContext) error

type ManageDropletPowerSpec added in v0.12.0

type ManageDropletPowerSpec struct {
	Droplet   string `json:"droplet"`
	Operation string `json:"operation"`
}

type Metadata

type Metadata struct {
	AccountEmail string `json:"accountEmail"`
	AccountUUID  string `json:"accountUUID"`
}

type MetricsData added in v0.13.0

type MetricsData struct {
	ResultType string          `json:"resultType"`
	Result     []MetricsResult `json:"result"`
}

MetricsData is the data envelope returned by the monitoring metrics API

type MetricsResponse added in v0.13.0

type MetricsResponse struct {
	Status string      `json:"status"`
	Data   MetricsData `json:"data"`
}

MetricsResponse is the top-level response from the monitoring metrics API

type MetricsResult added in v0.13.0

type MetricsResult struct {
	Metric map[string]string `json:"metric"`
	Values []MetricsValue    `json:"values"`
}

MetricsResult represents a single labeled metric time series

type MetricsValue added in v0.13.0

type MetricsValue []any

MetricsValue represents a single data point in a metric series: [unix_timestamp, string_value]

type Region

type Region struct {
	Slug      string `json:"slug"`
	Name      string `json:"name"`
	Available bool   `json:"available"`
}

Region represents a DigitalOcean region

type ReservedIP added in v0.13.0

type ReservedIP struct {
	IP         string `json:"ip"`
	RegionSlug string `json:"region_slug"`
	Locked     bool   `json:"locked"`
}

ReservedIP represents a DigitalOcean reserved IP

type SSHKey added in v0.13.0

type SSHKey struct {
	ID          int    `json:"id"`
	Fingerprint string `json:"fingerprint"`
	Name        string `json:"name"`
}

SSHKey represents a DigitalOcean SSH key

type Size

type Size struct {
	Slug         string  `json:"slug"`
	Memory       int     `json:"memory"`
	VCPUs        int     `json:"vcpus"`
	Disk         int     `json:"disk"`
	PriceMonthly float64 `json:"price_monthly"`
	Available    bool    `json:"available"`
}

Size represents a DigitalOcean droplet size

type Snapshot added in v0.12.0

type Snapshot struct {
	ID            json.Number `json:"id"`
	Name          string      `json:"name"`
	CreatedAt     string      `json:"created_at"`
	ResourceID    string      `json:"resource_id"`
	ResourceType  string      `json:"resource_type"`
	Regions       []string    `json:"regions"`
	MinDiskSize   int         `json:"min_disk_size"`
	SizeGigabytes float64     `json:"size_gigabytes"`
}

Snapshot represents a DigitalOcean snapshot

type SnapshotNodeMetadata added in v0.12.0

type SnapshotNodeMetadata struct {
	SnapshotID   string `json:"snapshotId" mapstructure:"snapshotId"`
	SnapshotName string `json:"snapshotName" mapstructure:"snapshotName"`
}

SnapshotNodeMetadata stores metadata about a snapshot for display in the UI

type UpdateAlertPolicy added in v0.13.0

type UpdateAlertPolicy struct{}

func (*UpdateAlertPolicy) Actions added in v0.13.0

func (u *UpdateAlertPolicy) Actions() []core.Action

func (*UpdateAlertPolicy) Cancel added in v0.13.0

func (*UpdateAlertPolicy) Cleanup added in v0.13.0

func (u *UpdateAlertPolicy) Cleanup(ctx core.SetupContext) error

func (*UpdateAlertPolicy) Color added in v0.13.0

func (u *UpdateAlertPolicy) Color() string

func (*UpdateAlertPolicy) Configuration added in v0.13.0

func (u *UpdateAlertPolicy) Configuration() []configuration.Field

func (*UpdateAlertPolicy) Description added in v0.13.0

func (u *UpdateAlertPolicy) Description() string

func (*UpdateAlertPolicy) Documentation added in v0.13.0

func (u *UpdateAlertPolicy) Documentation() string

func (*UpdateAlertPolicy) ExampleOutput added in v0.13.0

func (u *UpdateAlertPolicy) ExampleOutput() map[string]any

func (*UpdateAlertPolicy) Execute added in v0.13.0

func (u *UpdateAlertPolicy) Execute(ctx core.ExecutionContext) error

func (*UpdateAlertPolicy) HandleAction added in v0.13.0

func (u *UpdateAlertPolicy) HandleAction(ctx core.ActionContext) error

func (*UpdateAlertPolicy) HandleWebhook added in v0.13.0

func (*UpdateAlertPolicy) Icon added in v0.13.0

func (u *UpdateAlertPolicy) Icon() string

func (*UpdateAlertPolicy) Label added in v0.13.0

func (u *UpdateAlertPolicy) Label() string

func (*UpdateAlertPolicy) Name added in v0.13.0

func (u *UpdateAlertPolicy) Name() string

func (*UpdateAlertPolicy) OutputChannels added in v0.13.0

func (u *UpdateAlertPolicy) OutputChannels(configuration any) []core.OutputChannel

func (*UpdateAlertPolicy) ProcessQueueItem added in v0.13.0

func (u *UpdateAlertPolicy) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdateAlertPolicy) Setup added in v0.13.0

func (u *UpdateAlertPolicy) Setup(ctx core.SetupContext) error

type UpdateAlertPolicyRequest added in v0.13.0

type UpdateAlertPolicyRequest struct {
	Type        string            `json:"type"`
	Description string            `json:"description"`
	Compare     string            `json:"compare"`
	Value       float64           `json:"value"`
	Window      string            `json:"window"`
	Entities    []string          `json:"entities,omitempty"`
	Tags        []string          `json:"tags,omitempty"`
	Alerts      AlertPolicyAlerts `json:"alerts"`
	Enabled     bool              `json:"enabled"`
}

UpdateAlertPolicyRequest is the payload for updating a monitoring alert policy

type UpdateAlertPolicySpec added in v0.13.0

type UpdateAlertPolicySpec struct {
	AlertPolicy  string   `json:"alertPolicy" mapstructure:"alertPolicy"`
	Description  string   `json:"description" mapstructure:"description"`
	Type         string   `json:"type" mapstructure:"type"`
	Compare      string   `json:"compare" mapstructure:"compare"`
	Value        float64  `json:"value" mapstructure:"value"`
	Window       string   `json:"window" mapstructure:"window"`
	Entities     []string `json:"entities" mapstructure:"entities"`
	Tags         []string `json:"tags" mapstructure:"tags"`
	Enabled      bool     `json:"enabled" mapstructure:"enabled"`
	Email        []string `json:"email" mapstructure:"email"`
	SlackChannel string   `json:"slackChannel" mapstructure:"slackChannel"`
	SlackURL     string   `json:"slackUrl" mapstructure:"slackUrl"`
}

type UpsertDNSRecord added in v0.13.0

type UpsertDNSRecord struct{}

func (*UpsertDNSRecord) Actions added in v0.13.0

func (u *UpsertDNSRecord) Actions() []core.Action

func (*UpsertDNSRecord) Cancel added in v0.13.0

func (u *UpsertDNSRecord) Cancel(ctx core.ExecutionContext) error

func (*UpsertDNSRecord) Cleanup added in v0.13.0

func (u *UpsertDNSRecord) Cleanup(ctx core.SetupContext) error

func (*UpsertDNSRecord) Color added in v0.13.0

func (u *UpsertDNSRecord) Color() string

func (*UpsertDNSRecord) Configuration added in v0.13.0

func (u *UpsertDNSRecord) Configuration() []configuration.Field

func (*UpsertDNSRecord) Description added in v0.13.0

func (u *UpsertDNSRecord) Description() string

func (*UpsertDNSRecord) Documentation added in v0.13.0

func (u *UpsertDNSRecord) Documentation() string

func (*UpsertDNSRecord) ExampleOutput added in v0.13.0

func (u *UpsertDNSRecord) ExampleOutput() map[string]any

func (*UpsertDNSRecord) Execute added in v0.13.0

func (u *UpsertDNSRecord) Execute(ctx core.ExecutionContext) error

func (*UpsertDNSRecord) HandleAction added in v0.13.0

func (u *UpsertDNSRecord) HandleAction(ctx core.ActionContext) error

func (*UpsertDNSRecord) HandleWebhook added in v0.13.0

func (*UpsertDNSRecord) Icon added in v0.13.0

func (u *UpsertDNSRecord) Icon() string

func (*UpsertDNSRecord) Label added in v0.13.0

func (u *UpsertDNSRecord) Label() string

func (*UpsertDNSRecord) Name added in v0.13.0

func (u *UpsertDNSRecord) Name() string

func (*UpsertDNSRecord) OutputChannels added in v0.13.0

func (u *UpsertDNSRecord) OutputChannels(configuration any) []core.OutputChannel

func (*UpsertDNSRecord) ProcessQueueItem added in v0.13.0

func (u *UpsertDNSRecord) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpsertDNSRecord) Setup added in v0.13.0

func (u *UpsertDNSRecord) Setup(ctx core.SetupContext) error

type UpsertDNSRecordSpec added in v0.13.0

type UpsertDNSRecordSpec struct {
	Domain   string `json:"domain"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Data     string `json:"data"`
	TTL      string `json:"ttl"`
	Priority string `json:"priority"`
	Port     string `json:"port"`
	Weight   string `json:"weight"`
}

type VPC added in v0.13.0

type VPC struct {
	ID          string `json:"id"`
	URN         string `json:"urn"`
	Name        string `json:"name"`
	Description string `json:"description"`
	RegionSlug  string `json:"region"`
	IPRange     string `json:"ip_range"`
	CreatedAt   string `json:"created_at"`
	Default     bool   `json:"default"`
}

VPC represents a DigitalOcean VPC

Jump to

Keyboard shortcuts

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