hetzner

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LoadBalancerAlgorithmTypeRoundRobin       = "round_robin"
	LoadBalancerAlgorithmTypeLeastConnections = "least_connections"
)
View Source
const (
	ActionStatusRunning = "running"
	ActionStatusSuccess = "success"
	ActionStatusError   = "error"
)
View Source
const (
	CreateServerPayloadType  = "hetzner.server.created"
	CreateServerPollInterval = 5 * time.Second
)
View Source
const (
	CreateSnapshotPayloadType  = "hetzner.snapshot.created"
	CreateSnapshotPollInterval = 5 * time.Second
)
View Source
const (
	DeleteServerPayloadType  = "hetzner.server.deleted"
	DeleteServerPollInterval = 5 * time.Second
)
View Source
const CreateBucketPayloadType = "hetzner.bucket.created"
View Source
const CreateLoadBalancerPayloadType = "hetzner.load_balancer.created"
View Source
const DeleteBucketPayloadType = "hetzner.bucket.deleted"
View Source
const DeleteLoadBalancerPayloadType = "hetzner.load_balancer.deleted"
View Source
const DeleteObjectPayloadType = "hetzner.object.deleted"
View Source
const DeleteSnapshotPayloadType = "hetzner.snapshot.deleted"
View Source
const ListObjectsPayloadType = "hetzner.objects.listed"
View Source
const PresignedURLPayloadType = "hetzner.object.presigned"
View Source
const UploadObjectPayloadType = "hetzner.object.uploaded"

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Body       string
	Message    string
}

func (*APIError) Error

func (e *APIError) Error() string

type ActionResponse

type ActionResponse struct {
	ID       string `json:"id"`
	Status   string `json:"status"`
	Command  string `json:"command"`
	Progress int    `json:"progress"`
	Started  string `json:"started"`
	Finished string `json:"finished"`
	Error    *struct {
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

type Client

type Client struct {
	Token   string
	BaseURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpCtx core.HTTPContext, integration core.IntegrationContext) (*Client, error)

func (*Client) CreateLoadBalancer added in v0.9.0

func (c *Client) CreateLoadBalancer(name, loadBalancerType, location, algorithm string) (*ServerResponse, *ActionResponse, error)

func (*Client) CreateServer

func (c *Client) CreateServer(name, serverType, image, location string, sshKeys []string, firewall, userData string) (*ServerResponse, *ActionResponse, error)

func (*Client) CreateServerSnapshot added in v0.11.0

func (c *Client) CreateServerSnapshot(serverID, description string) (*ImageResponse, *ActionResponse, error)

func (*Client) DeleteImage added in v0.11.0

func (c *Client) DeleteImage(imageID string) error

func (*Client) DeleteLoadBalancer added in v0.9.0

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

func (*Client) DeleteServer

func (c *Client) DeleteServer(serverID string) (*ActionResponse, error)

func (*Client) GetAction

func (c *Client) GetAction(actionID string) (*ActionResponse, error)

func (*Client) GetImage added in v0.11.0

func (c *Client) GetImage(imageID string) (*ImageResponse, error)

func (*Client) GetServer

func (c *Client) GetServer(serverID string) (*ServerResponse, error)

func (*Client) ListFirewalls added in v0.11.0

func (c *Client) ListFirewalls() ([]FirewallResponse, error)

func (*Client) ListImages

func (c *Client) ListImages() ([]ImageResponse, error)

func (*Client) ListLoadBalancerTypes added in v0.9.0

func (c *Client) ListLoadBalancerTypes() ([]LoadBalancerTypeResponse, error)

func (*Client) ListLoadBalancers added in v0.9.0

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

func (*Client) ListLocations

func (c *Client) ListLocations() ([]LocationResponse, error)

func (*Client) ListServerTypes

func (c *Client) ListServerTypes() ([]ServerTypeResponse, error)

func (*Client) ListServers

func (c *Client) ListServers() ([]ServerResponse, error)

func (*Client) ServerTypeLocationNames

func (c *Client) ServerTypeLocationNames(serverTypeName string) ([]string, error)

ServerTypeLocationNames returns the location names (e.g. fsn1, nbg1) where the given server type is available. Prices in the API list per-location pricing, so a price entry means the type is available there.

func (*Client) Verify

func (c *Client) Verify() error

type Configuration

type Configuration struct {
	APIToken          string `json:"apiToken" mapstructure:"apiToken"`
	S3AccessKeyId     string `json:"s3AccessKeyId" mapstructure:"s3AccessKeyId"`
	S3SecretAccessKey string `json:"s3SecretAccessKey" mapstructure:"s3SecretAccessKey"`
	S3Region          string `json:"s3Region" mapstructure:"s3Region"`
}

type CreateBucket added in v0.28.0

type CreateBucket struct{}

func (*CreateBucket) Cancel added in v0.28.0

func (c *CreateBucket) Cancel(_ core.ExecutionContext) error

func (*CreateBucket) Cleanup added in v0.28.0

func (c *CreateBucket) Cleanup(_ core.SetupContext) error

func (*CreateBucket) Color added in v0.28.0

func (c *CreateBucket) Color() string

func (*CreateBucket) Configuration added in v0.28.0

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

func (*CreateBucket) Description added in v0.28.0

func (c *CreateBucket) Description() string

func (*CreateBucket) Documentation added in v0.28.0

func (c *CreateBucket) Documentation() string

func (*CreateBucket) ExampleOutput added in v0.28.0

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

func (*CreateBucket) Execute added in v0.28.0

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

func (*CreateBucket) HandleHook added in v0.28.0

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

func (*CreateBucket) HandleWebhook added in v0.28.0

func (*CreateBucket) Hooks added in v0.28.0

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

func (*CreateBucket) Icon added in v0.28.0

func (c *CreateBucket) Icon() string

func (*CreateBucket) Label added in v0.28.0

func (c *CreateBucket) Label() string

func (*CreateBucket) Name added in v0.28.0

func (c *CreateBucket) Name() string

func (*CreateBucket) OutputChannels added in v0.28.0

func (c *CreateBucket) OutputChannels(_ any) []core.OutputChannel

func (*CreateBucket) ProcessQueueItem added in v0.28.0

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

func (*CreateBucket) Setup added in v0.28.0

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

type CreateBucketSpec added in v0.28.0

type CreateBucketSpec struct {
	Bucket string `json:"bucket" mapstructure:"bucket"`
}

type CreateLoadBalancer added in v0.9.0

type CreateLoadBalancer struct{}

func (*CreateLoadBalancer) Cancel added in v0.9.0

func (*CreateLoadBalancer) Cleanup added in v0.9.0

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

func (*CreateLoadBalancer) Color added in v0.9.0

func (c *CreateLoadBalancer) Color() string

func (*CreateLoadBalancer) Configuration added in v0.9.0

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

func (*CreateLoadBalancer) Description added in v0.9.0

func (c *CreateLoadBalancer) Description() string

func (*CreateLoadBalancer) Documentation added in v0.9.0

func (c *CreateLoadBalancer) Documentation() string

func (*CreateLoadBalancer) ExampleOutput added in v0.9.0

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

func (*CreateLoadBalancer) Execute added in v0.9.0

func (*CreateLoadBalancer) HandleHook added in v0.18.0

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

func (*CreateLoadBalancer) HandleWebhook added in v0.9.0

func (*CreateLoadBalancer) Hooks added in v0.18.0

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

func (*CreateLoadBalancer) Icon added in v0.9.0

func (c *CreateLoadBalancer) Icon() string

func (*CreateLoadBalancer) Label added in v0.9.0

func (c *CreateLoadBalancer) Label() string

func (*CreateLoadBalancer) Name added in v0.9.0

func (c *CreateLoadBalancer) Name() string

func (*CreateLoadBalancer) OutputChannels added in v0.9.0

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

func (*CreateLoadBalancer) ProcessQueueItem added in v0.9.0

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

func (*CreateLoadBalancer) Setup added in v0.9.0

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

type CreateLoadBalancerExecutionMetadata added in v0.9.0

type CreateLoadBalancerExecutionMetadata struct {
	ActionID     string          `json:"actionId" mapstructure:"actionId"`
	LoadBalancer *ServerResponse `json:"loadBalancer,omitempty" mapstructure:"loadBalancer"`
}

type CreateLoadBalancerSpec added in v0.9.0

type CreateLoadBalancerSpec struct {
	Name             string `json:"name" mapstructure:"name"`
	LoadBalancerType string `json:"load_balancer_type" mapstructure:"loadBalancerType"`
	Location         string `json:"location" mapstructure:"location"`
	Algorithm        string `json:"algorithm" mapstructure:"algorithm"`
}

type CreateServer

type CreateServer struct{}

func (*CreateServer) Cancel

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

func (*CreateServer) Cleanup

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

func (*CreateServer) Color

func (c *CreateServer) Color() string

func (*CreateServer) Configuration

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

func (*CreateServer) Description

func (c *CreateServer) Description() string

func (*CreateServer) Documentation

func (c *CreateServer) Documentation() string

func (*CreateServer) ExampleOutput

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

func (*CreateServer) Execute

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

func (*CreateServer) HandleHook added in v0.18.0

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

func (*CreateServer) HandleWebhook

func (*CreateServer) Hooks added in v0.18.0

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

func (*CreateServer) Icon

func (c *CreateServer) Icon() string

func (*CreateServer) Label

func (c *CreateServer) Label() string

func (*CreateServer) Name

func (c *CreateServer) Name() string

func (*CreateServer) OutputChannels

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

func (*CreateServer) ProcessQueueItem

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

func (*CreateServer) Setup

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

type CreateServerExecutionMetadata

type CreateServerExecutionMetadata struct {
	ActionID string          `json:"actionId" mapstructure:"actionId"`
	Server   *ServerResponse `json:"server,omitempty" mapstructure:"server"`
}

type CreateServerSpec

type CreateServerSpec struct {
	Name       string   `json:"name" mapstructure:"name"`
	ServerType string   `json:"serverType" mapstructure:"serverType"`
	Image      string   `json:"image" mapstructure:"image"`
	Location   string   `json:"location" mapstructure:"location"`
	SSHKeys    []string `json:"sshKeys" mapstructure:"sshKeys"`
	Firewall   string   `json:"firewall" mapstructure:"firewall"`
	UserData   string   `json:"userData" mapstructure:"userData"`
}

type CreateSnapshot added in v0.11.0

type CreateSnapshot struct{}

func (*CreateSnapshot) Cancel added in v0.11.0

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

func (*CreateSnapshot) Cleanup added in v0.11.0

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

func (*CreateSnapshot) Color added in v0.11.0

func (c *CreateSnapshot) Color() string

func (*CreateSnapshot) Configuration added in v0.11.0

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

func (*CreateSnapshot) Description added in v0.11.0

func (c *CreateSnapshot) Description() string

func (*CreateSnapshot) Documentation added in v0.11.0

func (c *CreateSnapshot) Documentation() string

func (*CreateSnapshot) ExampleOutput added in v0.11.0

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

func (*CreateSnapshot) Execute added in v0.11.0

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

func (*CreateSnapshot) HandleHook added in v0.18.0

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

func (*CreateSnapshot) HandleWebhook added in v0.11.0

func (*CreateSnapshot) Hooks added in v0.18.0

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

func (*CreateSnapshot) Icon added in v0.11.0

func (c *CreateSnapshot) Icon() string

func (*CreateSnapshot) Label added in v0.11.0

func (c *CreateSnapshot) Label() string

func (*CreateSnapshot) Name added in v0.11.0

func (c *CreateSnapshot) Name() string

func (*CreateSnapshot) OutputChannels added in v0.11.0

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

func (*CreateSnapshot) ProcessQueueItem added in v0.11.0

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

func (*CreateSnapshot) Setup added in v0.11.0

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

type CreateSnapshotExecutionMetadata added in v0.11.0

type CreateSnapshotExecutionMetadata struct {
	ActionID string         `json:"actionId" mapstructure:"actionId"`
	ServerID string         `json:"serverId" mapstructure:"serverId"`
	ImageID  string         `json:"imageId" mapstructure:"imageId"`
	Image    *ImageResponse `json:"image,omitempty" mapstructure:"image"`
}

type CreateSnapshotSpec added in v0.11.0

type CreateSnapshotSpec struct {
	Server      string `json:"server" mapstructure:"server"`
	Description string `json:"description" mapstructure:"description"`
}

type DeleteBucket added in v0.28.0

type DeleteBucket struct{}

func (*DeleteBucket) Cancel added in v0.28.0

func (c *DeleteBucket) Cancel(_ core.ExecutionContext) error

func (*DeleteBucket) Cleanup added in v0.28.0

func (c *DeleteBucket) Cleanup(_ core.SetupContext) error

func (*DeleteBucket) Color added in v0.28.0

func (c *DeleteBucket) Color() string

func (*DeleteBucket) Configuration added in v0.28.0

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

func (*DeleteBucket) Description added in v0.28.0

func (c *DeleteBucket) Description() string

func (*DeleteBucket) Documentation added in v0.28.0

func (c *DeleteBucket) Documentation() string

func (*DeleteBucket) ExampleOutput added in v0.28.0

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

func (*DeleteBucket) Execute added in v0.28.0

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

func (*DeleteBucket) HandleHook added in v0.28.0

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

func (*DeleteBucket) HandleWebhook added in v0.28.0

func (*DeleteBucket) Hooks added in v0.28.0

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

func (*DeleteBucket) Icon added in v0.28.0

func (c *DeleteBucket) Icon() string

func (*DeleteBucket) Label added in v0.28.0

func (c *DeleteBucket) Label() string

func (*DeleteBucket) Name added in v0.28.0

func (c *DeleteBucket) Name() string

func (*DeleteBucket) OutputChannels added in v0.28.0

func (c *DeleteBucket) OutputChannels(_ any) []core.OutputChannel

func (*DeleteBucket) ProcessQueueItem added in v0.28.0

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

func (*DeleteBucket) Setup added in v0.28.0

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

type DeleteBucketSpec added in v0.28.0

type DeleteBucketSpec struct {
	Bucket string `json:"bucket" mapstructure:"bucket"`
}

type DeleteLoadBalancer added in v0.9.0

type DeleteLoadBalancer struct{}

func (*DeleteLoadBalancer) Cancel added in v0.9.0

func (*DeleteLoadBalancer) Cleanup added in v0.9.0

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

func (*DeleteLoadBalancer) Color added in v0.9.0

func (c *DeleteLoadBalancer) Color() string

func (*DeleteLoadBalancer) Configuration added in v0.9.0

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

func (*DeleteLoadBalancer) Description added in v0.9.0

func (c *DeleteLoadBalancer) Description() string

func (*DeleteLoadBalancer) Documentation added in v0.9.0

func (c *DeleteLoadBalancer) Documentation() string

func (*DeleteLoadBalancer) ExampleOutput added in v0.9.0

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

func (*DeleteLoadBalancer) Execute added in v0.9.0

func (*DeleteLoadBalancer) HandleHook added in v0.18.0

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

func (*DeleteLoadBalancer) HandleWebhook added in v0.9.0

func (*DeleteLoadBalancer) Hooks added in v0.18.0

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

func (*DeleteLoadBalancer) Icon added in v0.9.0

func (c *DeleteLoadBalancer) Icon() string

func (*DeleteLoadBalancer) Label added in v0.9.0

func (c *DeleteLoadBalancer) Label() string

func (*DeleteLoadBalancer) Name added in v0.9.0

func (c *DeleteLoadBalancer) Name() string

func (*DeleteLoadBalancer) OutputChannels added in v0.9.0

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

func (*DeleteLoadBalancer) ProcessQueueItem added in v0.9.0

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

func (*DeleteLoadBalancer) Setup added in v0.9.0

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

type DeleteLoadBalancerExecutionMetadata added in v0.9.0

type DeleteLoadBalancerExecutionMetadata struct {
	LoadBalancerID string `json:"loadBalancerId" mapstructure:"loadBalancerId"`
}

type DeleteLoadBalancerSpec added in v0.9.0

type DeleteLoadBalancerSpec struct {
	LoadBalancer string `json:"loadBalancer" mapstructure:"loadBalancer"`
}

type DeleteObject added in v0.28.0

type DeleteObject struct{}

func (*DeleteObject) Cancel added in v0.28.0

func (c *DeleteObject) Cancel(_ core.ExecutionContext) error

func (*DeleteObject) Cleanup added in v0.28.0

func (c *DeleteObject) Cleanup(_ core.SetupContext) error

func (*DeleteObject) Color added in v0.28.0

func (c *DeleteObject) Color() string

func (*DeleteObject) Configuration added in v0.28.0

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

func (*DeleteObject) Description added in v0.28.0

func (c *DeleteObject) Description() string

func (*DeleteObject) Documentation added in v0.28.0

func (c *DeleteObject) Documentation() string

func (*DeleteObject) ExampleOutput added in v0.28.0

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

func (*DeleteObject) Execute added in v0.28.0

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

func (*DeleteObject) HandleHook added in v0.28.0

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

func (*DeleteObject) HandleWebhook added in v0.28.0

func (*DeleteObject) Hooks added in v0.28.0

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

func (*DeleteObject) Icon added in v0.28.0

func (c *DeleteObject) Icon() string

func (*DeleteObject) Label added in v0.28.0

func (c *DeleteObject) Label() string

func (*DeleteObject) Name added in v0.28.0

func (c *DeleteObject) Name() string

func (*DeleteObject) OutputChannels added in v0.28.0

func (c *DeleteObject) OutputChannels(_ any) []core.OutputChannel

func (*DeleteObject) ProcessQueueItem added in v0.28.0

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

func (*DeleteObject) Setup added in v0.28.0

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

type DeleteObjectSpec added in v0.28.0

type DeleteObjectSpec struct {
	Bucket string `json:"bucket" mapstructure:"bucket"`
	Key    any    `json:"key" mapstructure:"key"`
}

type DeleteServer

type DeleteServer struct{}

func (*DeleteServer) Cancel

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

func (*DeleteServer) Cleanup

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

func (*DeleteServer) Color

func (c *DeleteServer) Color() string

func (*DeleteServer) Configuration

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

func (*DeleteServer) Description

func (c *DeleteServer) Description() string

func (*DeleteServer) Documentation

func (c *DeleteServer) Documentation() string

func (*DeleteServer) ExampleOutput

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

func (*DeleteServer) Execute

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

func (*DeleteServer) HandleHook added in v0.18.0

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

func (*DeleteServer) HandleWebhook

func (*DeleteServer) Hooks added in v0.18.0

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

func (*DeleteServer) Icon

func (c *DeleteServer) Icon() string

func (*DeleteServer) Label

func (c *DeleteServer) Label() string

func (*DeleteServer) Name

func (c *DeleteServer) Name() string

func (*DeleteServer) OutputChannels

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

func (*DeleteServer) ProcessQueueItem

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

func (*DeleteServer) Setup

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

type DeleteServerExecutionMetadata

type DeleteServerExecutionMetadata struct {
	ActionID string `json:"actionId" mapstructure:"actionId"`
	ServerID string `json:"serverId" mapstructure:"serverId"`
}

type DeleteServerSpec

type DeleteServerSpec struct {
	Server string `json:"server" mapstructure:"server"`
}

type DeleteSnapshot added in v0.11.0

type DeleteSnapshot struct{}

func (*DeleteSnapshot) Cancel added in v0.11.0

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

func (*DeleteSnapshot) Cleanup added in v0.11.0

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

func (*DeleteSnapshot) Color added in v0.11.0

func (c *DeleteSnapshot) Color() string

func (*DeleteSnapshot) Configuration added in v0.11.0

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

func (*DeleteSnapshot) Description added in v0.11.0

func (c *DeleteSnapshot) Description() string

func (*DeleteSnapshot) Documentation added in v0.11.0

func (c *DeleteSnapshot) Documentation() string

func (*DeleteSnapshot) ExampleOutput added in v0.11.0

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

func (*DeleteSnapshot) Execute added in v0.11.0

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

func (*DeleteSnapshot) HandleHook added in v0.18.0

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

func (*DeleteSnapshot) HandleWebhook added in v0.11.0

func (*DeleteSnapshot) Hooks added in v0.18.0

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

func (*DeleteSnapshot) Icon added in v0.11.0

func (c *DeleteSnapshot) Icon() string

func (*DeleteSnapshot) Label added in v0.11.0

func (c *DeleteSnapshot) Label() string

func (*DeleteSnapshot) Name added in v0.11.0

func (c *DeleteSnapshot) Name() string

func (*DeleteSnapshot) OutputChannels added in v0.11.0

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

func (*DeleteSnapshot) ProcessQueueItem added in v0.11.0

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

func (*DeleteSnapshot) Setup added in v0.11.0

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

type DeleteSnapshotExecutionMetadata added in v0.11.0

type DeleteSnapshotExecutionMetadata struct {
	ImageID string `json:"imageId" mapstructure:"imageId"`
}

type DeleteSnapshotSpec added in v0.11.0

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

type FirewallResponse added in v0.11.0

type FirewallResponse struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
}

type Hetzner

type Hetzner struct{}

func (*Hetzner) Actions

func (h *Hetzner) Actions() []core.Action

func (*Hetzner) Cleanup

func (h *Hetzner) Cleanup(ctx core.IntegrationCleanupContext) error

func (*Hetzner) Configuration

func (h *Hetzner) Configuration() []configuration.Field

func (*Hetzner) Description

func (h *Hetzner) Description() string

func (*Hetzner) HandleHook added in v0.18.0

func (h *Hetzner) HandleHook(ctx core.IntegrationHookContext) error

func (*Hetzner) HandleRequest

func (h *Hetzner) HandleRequest(ctx core.HTTPRequestContext)

func (*Hetzner) Hooks added in v0.18.0

func (h *Hetzner) Hooks() []core.Hook

func (*Hetzner) Icon

func (h *Hetzner) Icon() string

func (*Hetzner) Instructions

func (h *Hetzner) Instructions() string

func (*Hetzner) Label

func (h *Hetzner) Label() string

func (*Hetzner) ListResources

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

func (*Hetzner) Name

func (h *Hetzner) Name() string

func (*Hetzner) Sync

func (h *Hetzner) Sync(ctx core.SyncContext) error

func (*Hetzner) Triggers

func (h *Hetzner) Triggers() []core.Trigger

type HetznerS3Bucket added in v0.28.0

type HetznerS3Bucket struct {
	Name string `xml:"Name"`
}

type HetznerS3Client added in v0.28.0

type HetznerS3Client struct {
	// contains filtered or unexported fields
}

func NewHetznerS3Client added in v0.28.0

func NewHetznerS3Client(httpCtx core.HTTPContext, integration core.IntegrationContext) (*HetznerS3Client, error)

func (*HetznerS3Client) CreateBucket added in v0.28.0

func (c *HetznerS3Client) CreateBucket(bucket string) error

func (*HetznerS3Client) DeleteBucket added in v0.28.0

func (c *HetznerS3Client) DeleteBucket(bucket string) error

func (*HetznerS3Client) DeleteObject added in v0.28.0

func (c *HetznerS3Client) DeleteObject(bucket, key string) error

func (*HetznerS3Client) ListBuckets added in v0.28.0

func (c *HetznerS3Client) ListBuckets() ([]HetznerS3Bucket, error)

func (*HetznerS3Client) ListObjects added in v0.28.0

func (c *HetznerS3Client) ListObjects(bucket, prefix string, maxKeys int) (*S3ListResult, error)

func (*HetznerS3Client) PresignURL added in v0.28.0

func (c *HetznerS3Client) PresignURL(bucket, key, method string, expiresIn time.Duration) (string, error)

func (*HetznerS3Client) PutObject added in v0.28.0

func (c *HetznerS3Client) PutObject(bucket, key, contentType string, body []byte) (etag string, err error)

type ImageResponse

type ImageResponse struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Type        string `json:"type"`
	ID          int    `json:"id"`
}

type ListObjects added in v0.28.0

type ListObjects struct{}

func (*ListObjects) Cancel added in v0.28.0

func (c *ListObjects) Cancel(_ core.ExecutionContext) error

func (*ListObjects) Cleanup added in v0.28.0

func (c *ListObjects) Cleanup(_ core.SetupContext) error

func (*ListObjects) Color added in v0.28.0

func (c *ListObjects) Color() string

func (*ListObjects) Configuration added in v0.28.0

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

func (*ListObjects) Description added in v0.28.0

func (c *ListObjects) Description() string

func (*ListObjects) Documentation added in v0.28.0

func (c *ListObjects) Documentation() string

func (*ListObjects) ExampleOutput added in v0.28.0

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

func (*ListObjects) Execute added in v0.28.0

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

func (*ListObjects) HandleHook added in v0.28.0

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

func (*ListObjects) HandleWebhook added in v0.28.0

func (*ListObjects) Hooks added in v0.28.0

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

func (*ListObjects) Icon added in v0.28.0

func (c *ListObjects) Icon() string

func (*ListObjects) Label added in v0.28.0

func (c *ListObjects) Label() string

func (*ListObjects) Name added in v0.28.0

func (c *ListObjects) Name() string

func (*ListObjects) OutputChannels added in v0.28.0

func (c *ListObjects) OutputChannels(_ any) []core.OutputChannel

func (*ListObjects) ProcessQueueItem added in v0.28.0

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

func (*ListObjects) Setup added in v0.28.0

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

type ListObjectsSpec added in v0.28.0

type ListObjectsSpec struct {
	Bucket  string `json:"bucket" mapstructure:"bucket"`
	Prefix  any    `json:"prefix" mapstructure:"prefix"`
	MaxKeys int    `json:"maxKeys" mapstructure:"maxKeys"`
}

type LoadBalancerAlgorithmType added in v0.9.0

type LoadBalancerAlgorithmType struct {
	Type string `json:"type"`
}

type LoadBalancerTypeResponse added in v0.9.0

type LoadBalancerTypeResponse struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type LocationResponse

type LocationResponse struct {
	Name        string `json:"name"`
	ID          int    `json:"id"`
	Description string `json:"description"`
	City        string `json:"city"`
	Country     string `json:"country"`
}

func (*LocationResponse) LocationDisplayName

func (l *LocationResponse) LocationDisplayName() string

LocationDisplayName returns a label for the location (e.g. "Nuremberg, DE (nbg1)").

type PresignedURL added in v0.28.0

type PresignedURL struct{}

func (*PresignedURL) Cancel added in v0.28.0

func (c *PresignedURL) Cancel(_ core.ExecutionContext) error

func (*PresignedURL) Cleanup added in v0.28.0

func (c *PresignedURL) Cleanup(_ core.SetupContext) error

func (*PresignedURL) Color added in v0.28.0

func (c *PresignedURL) Color() string

func (*PresignedURL) Configuration added in v0.28.0

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

func (*PresignedURL) Description added in v0.28.0

func (c *PresignedURL) Description() string

func (*PresignedURL) Documentation added in v0.28.0

func (c *PresignedURL) Documentation() string

func (*PresignedURL) ExampleOutput added in v0.28.0

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

func (*PresignedURL) Execute added in v0.28.0

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

func (*PresignedURL) HandleHook added in v0.28.0

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

func (*PresignedURL) HandleWebhook added in v0.28.0

func (*PresignedURL) Hooks added in v0.28.0

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

func (*PresignedURL) Icon added in v0.28.0

func (c *PresignedURL) Icon() string

func (*PresignedURL) Label added in v0.28.0

func (c *PresignedURL) Label() string

func (*PresignedURL) Name added in v0.28.0

func (c *PresignedURL) Name() string

func (*PresignedURL) OutputChannels added in v0.28.0

func (c *PresignedURL) OutputChannels(_ any) []core.OutputChannel

func (*PresignedURL) ProcessQueueItem added in v0.28.0

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

func (*PresignedURL) Setup added in v0.28.0

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

type PresignedURLSpec added in v0.28.0

type PresignedURLSpec struct {
	Bucket    string `json:"bucket" mapstructure:"bucket"`
	Key       any    `json:"key" mapstructure:"key"`
	ExpiresIn int    `json:"expiresIn" mapstructure:"expiresIn"`
	Method    string `json:"method" mapstructure:"method"`
}

type S3ListItem added in v0.28.0

type S3ListItem struct {
	Key          string `xml:"Key"`
	Size         int64  `xml:"Size"`
	LastModified string `xml:"LastModified"`
	ETag         string `xml:"ETag"`
}

type S3ListResult added in v0.28.0

type S3ListResult struct {
	Items     []S3ListItem
	Truncated bool
}

type ServerResponse

type ServerResponse struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Status  string `json:"status"`
	Created string `json:"created"`
	Image   struct {
		ID          int    `json:"id"`
		Name        string `json:"name"`
		Description string `json:"description"`
		Type        string `json:"type"`
	} `json:"image"`
	PublicNet struct {
		IPv4 struct {
			IP string `json:"ip"`
		} `json:"ipv4"`
	} `json:"public_net"`
}

type ServerTypePrice

type ServerTypePrice struct {
	Location string `json:"location"`
}

type ServerTypeResponse

type ServerTypeResponse struct {
	Name        string            `json:"name"`
	ID          int               `json:"id"`
	Description string            `json:"description"`
	Cores       int               `json:"cores"`
	Memory      float64           `json:"memory"`
	Disk        int               `json:"disk"`
	Prices      []ServerTypePrice `json:"prices"`
}

func (*ServerTypeResponse) ServerTypeDisplayName

func (s *ServerTypeResponse) ServerTypeDisplayName() string

ServerTypeDisplayName returns a label for the server type including specs (e.g. "cpx11 — 2 vCPU, 2 GB RAM, 40 GB disk").

type UploadObject added in v0.28.0

type UploadObject struct{}

func (*UploadObject) Cancel added in v0.28.0

func (c *UploadObject) Cancel(_ core.ExecutionContext) error

func (*UploadObject) Cleanup added in v0.28.0

func (c *UploadObject) Cleanup(_ core.SetupContext) error

func (*UploadObject) Color added in v0.28.0

func (c *UploadObject) Color() string

func (*UploadObject) Configuration added in v0.28.0

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

func (*UploadObject) Description added in v0.28.0

func (c *UploadObject) Description() string

func (*UploadObject) Documentation added in v0.28.0

func (c *UploadObject) Documentation() string

func (*UploadObject) ExampleOutput added in v0.28.0

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

func (*UploadObject) Execute added in v0.28.0

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

func (*UploadObject) HandleHook added in v0.28.0

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

func (*UploadObject) HandleWebhook added in v0.28.0

func (*UploadObject) Hooks added in v0.28.0

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

func (*UploadObject) Icon added in v0.28.0

func (c *UploadObject) Icon() string

func (*UploadObject) Label added in v0.28.0

func (c *UploadObject) Label() string

func (*UploadObject) Name added in v0.28.0

func (c *UploadObject) Name() string

func (*UploadObject) OutputChannels added in v0.28.0

func (c *UploadObject) OutputChannels(_ any) []core.OutputChannel

func (*UploadObject) ProcessQueueItem added in v0.28.0

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

func (*UploadObject) Setup added in v0.28.0

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

type UploadObjectSpec added in v0.28.0

type UploadObjectSpec struct {
	Bucket      string `json:"bucket" mapstructure:"bucket"`
	Key         any    `json:"key" mapstructure:"key"`
	Content     any    `json:"content" mapstructure:"content"`
	ContentType string `json:"contentType" mapstructure:"contentType"`
}

Jump to

Keyboard shortcuts

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