hcloudclient

package
v1.0.0-alpha.15 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package hcloudclient defines and implements the interface for talking to Hetzner HCloud API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Close()

	CreateLoadBalancer(context.Context, hcloud.LoadBalancerCreateOpts) (hcloud.LoadBalancerCreateResult, error)
	DeleteLoadBalancer(context.Context, int) error
	ListLoadBalancers(context.Context, hcloud.LoadBalancerListOpts) ([]*hcloud.LoadBalancer, error)
	AttachLoadBalancerToNetwork(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerAttachToNetworkOpts) (*hcloud.Action, error)
	ChangeLoadBalancerType(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerChangeTypeOpts) (*hcloud.Action, error)
	ChangeLoadBalancerAlgorithm(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerChangeAlgorithmOpts) (*hcloud.Action, error)
	UpdateLoadBalancer(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerUpdateOpts) (*hcloud.LoadBalancer, error)
	AddTargetServerToLoadBalancer(context.Context, hcloud.LoadBalancerAddServerTargetOpts, *hcloud.LoadBalancer) (*hcloud.Action, error)
	DeleteTargetServerOfLoadBalancer(context.Context, *hcloud.LoadBalancer, *hcloud.Server) (*hcloud.Action, error)
	AddServiceToLoadBalancer(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerAddServiceOpts) (*hcloud.Action, error)
	DeleteServiceFromLoadBalancer(context.Context, *hcloud.LoadBalancer, int) (*hcloud.Action, error)
	ListImages(context.Context, hcloud.ImageListOpts) ([]*hcloud.Image, error)
	CreateServer(context.Context, hcloud.ServerCreateOpts) (hcloud.ServerCreateResult, error)
	AttachServerToNetwork(context.Context, *hcloud.Server, hcloud.ServerAttachToNetworkOpts) (*hcloud.Action, error)
	ListServers(context.Context, hcloud.ServerListOpts) ([]*hcloud.Server, error)
	DeleteServer(context.Context, *hcloud.Server) error
	PowerOnServer(context.Context, *hcloud.Server) (*hcloud.Action, error)
	ShutdownServer(context.Context, *hcloud.Server) (*hcloud.Action, error)
	CreateNetwork(context.Context, hcloud.NetworkCreateOpts) (*hcloud.Network, error)
	ListNetworks(context.Context, hcloud.NetworkListOpts) ([]*hcloud.Network, error)
	DeleteNetwork(context.Context, *hcloud.Network) error
	ListSSHKeys(ctx context.Context, opts hcloud.SSHKeyListOpts) ([]*hcloud.SSHKey, error)
	CreatePlacementGroup(context.Context, hcloud.PlacementGroupCreateOpts) (hcloud.PlacementGroupCreateResult, error)
	DeletePlacementGroup(context.Context, int) error
	ListPlacementGroups(context.Context, hcloud.PlacementGroupListOpts) ([]*hcloud.PlacementGroup, error)
	AddServerToPlacementGroup(context.Context, *hcloud.Server, *hcloud.PlacementGroup) (*hcloud.Action, error)
}

Client collects all methods used by the controller in the hcloud cloud API.

type Factory

type Factory interface {
	NewClient(hcloudToken string) Client
}

Factory is the interface for creating new Client objects.

func NewFactory

func NewFactory() Factory

NewFactory creates a new factory for HCloud clients.

Directories

Path Synopsis
Package fake implements fakes for important interfaces like the HCloud api.
Package fake implements fakes for important interfaces like the HCloud api.

Jump to

Keyboard shortcuts

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