Documentation
¶
Index ¶
- Constants
- Variables
- func Bool(b bool) *bool
- func String(s string) *string
- type Action
- type ActionClient
- type ActionStatus
- type Client
- type ClientOption
- type Datacenter
- type DatacenterClient
- type FloatingIP
- type FloatingIPClient
- type FloatingIPCreateOpts
- type FloatingIPCreateResult
- type FloatingIPListOpts
- type FloatingIPType
- type FloatingIPUpdateOpts
- type ISO
- type ISOClient
- type Image
- type ImageClient
- type ImageListOpts
- type Location
- type LocationClient
- type PricingClient
- type Response
- type SSHKey
- type SSHKeyClient
- type SSHKeyCreateOpts
- type SSHKeyUpdateOpts
- type Server
- type ServerClient
- type ServerCreateOpts
- type ServerCreateResult
- type ServerEnableRescueOpts
- type ServerEnableRescueResult
- type ServerPublicNet
- type ServerPublicNetIPv4
- type ServerPublicNetIPv6
- type ServerRescueType
- type ServerStatus
- type ServerType
- type ServerTypeClient
- type ServerTypeListOpts
- type ServerUpdateOpts
Constants ¶
const ( ActionStatusError = hcloud.ActionStatusError ActionStatusSuccess = hcloud.ActionStatusSuccess ActionStatusRunning = hcloud.ActionStatusRunning )
ActionStatus
const ( FloatingIPTypeIPv4 = hcloud.FloatingIPTypeIPv4 FloatingIPTypeIPv6 = hcloud.FloatingIPTypeIPv6 )
Floating IP types.
Variables ¶
var ( ServerStatusOff = hcloud.ServerStatusOff ServerStatusRunning = hcloud.ServerStatusRunning )
ServerStatus alias of hcloud.ServerStatus*
Functions ¶
Types ¶
type ActionClient ¶
type ActionClient interface {
GetByID(ctx context.Context, id int) (*hcloud.Action, *hcloud.Response, error)
List(ctx context.Context, opts hcloud.ActionListOpts) ([]*hcloud.Action, *hcloud.Response, error)
All(ctx context.Context) ([]*hcloud.Action, error)
WatchProgress(ctx context.Context, action *hcloud.Action) (<-chan int, <-chan error)
}
ActionClient interface of hcloud.ActionClient
type ActionStatus ¶
type ActionStatus = hcloud.ActionStatus
ActionStatus alias of hcloud.ActionStatus
type Client ¶
type Client struct {
*hcloud.Client
Action ActionClient
Datacenter DatacenterClient
FloatingIP FloatingIPClient
Image ImageClient
ISO ISOClient
Location LocationClient
Pricing PricingClient
Server ServerClient
ServerType ServerTypeClient
SSHKey SSHKeyClient
}
Client is an alias using interfaces of hcloud.Client
func BuildClient ¶
BuildClient creates and configures an hcloud client
func NewClient ¶
func NewClient(options ...hcloud.ClientOption) *Client
NewClient is creates a new wrapped client
type ClientOption ¶
type ClientOption = hcloud.ClientOption
ClientOption alias of hcloud.ClientOption
func WithEndpoint ¶
func WithEndpoint(token string) ClientOption
WithEndpoint alias of hcloud.WithEndpoint
type DatacenterClient ¶
type DatacenterClient interface {
GetByID(ctx context.Context, id int) (*hcloud.Datacenter, *hcloud.Response, error)
GetByName(ctx context.Context, name string) (*hcloud.Datacenter, *hcloud.Response, error)
Get(ctx context.Context, idOrName string) (*hcloud.Datacenter, *hcloud.Response, error)
List(ctx context.Context, opts hcloud.DatacenterListOpts) ([]*hcloud.Datacenter, *hcloud.Response, error)
All(ctx context.Context) ([]*hcloud.Datacenter, error)
}
DatacenterClient interface of hcloud.DatacenterClient
type FloatingIPClient ¶
type FloatingIPClient interface {
GetByID(ctx context.Context, id int) (*FloatingIP, *Response, error)
List(ctx context.Context, opts FloatingIPListOpts) ([]*FloatingIP, *Response, error)
All(ctx context.Context) ([]*FloatingIP, error)
Create(ctx context.Context, opts FloatingIPCreateOpts) (FloatingIPCreateResult, *Response, error)
Delete(ctx context.Context, floatingIP *FloatingIP) (*Response, error)
Assign(ctx context.Context, floatingIP *FloatingIP, server *Server) (*Action, *Response, error)
Unassign(ctx context.Context, floatingIP *FloatingIP) (*Action, *Response, error)
Update(ctx context.Context, floatingIP *FloatingIP, opts FloatingIPUpdateOpts) (*FloatingIP, *Response, error)
}
FloatingIPClient interface of hcloud.FloatingIPClient
type FloatingIPCreateOpts ¶
type FloatingIPCreateOpts = hcloud.FloatingIPCreateOpts
FloatingIPCreateOpts alias of hcloud.FloatingIPCreateOpts
type FloatingIPCreateResult ¶
type FloatingIPCreateResult = hcloud.FloatingIPCreateResult
FloatingIPCreateResult alias of hcloud.FloatingIPCreateResult
type FloatingIPListOpts ¶
type FloatingIPListOpts = hcloud.FloatingIPListOpts
FloatingIPListOpts alias of hcloud.FloatingIPListOpts
type FloatingIPType ¶
type FloatingIPType = hcloud.FloatingIPType
FloatingIPType alias of hcloud.FloatingIPType
type FloatingIPUpdateOpts ¶
type FloatingIPUpdateOpts = hcloud.FloatingIPUpdateOpts
FloatingIPUpdateOpts alias of hcloud.FloatingIPUpdateOpts
type ISOClient ¶
type ISOClient interface {
GetByID(ctx context.Context, id int) (*hcloud.ISO, *hcloud.Response, error)
GetByName(ctx context.Context, name string) (*hcloud.ISO, *hcloud.Response, error)
Get(ctx context.Context, idOrName string) (*hcloud.ISO, *hcloud.Response, error)
}
ISOClient interface of hcloud.ISOClient
type ImageClient ¶
type ImageClient interface {
GetByID(ctx context.Context, id int) (*hcloud.Image, *hcloud.Response, error)
GetByName(ctx context.Context, name string) (*hcloud.Image, *hcloud.Response, error)
Get(ctx context.Context, idOrName string) (*hcloud.Image, *hcloud.Response, error)
List(ctx context.Context, opts hcloud.ImageListOpts) ([]*hcloud.Image, *hcloud.Response, error)
All(ctx context.Context) ([]*hcloud.Image, error)
}
ImageClient interface of hcloud.ImageClient
type ImageListOpts ¶ added in v0.3.0
type ImageListOpts = hcloud.ImageListOpts
ImageListOpts alias of hcloud.ImageListOpts
type LocationClient ¶
type LocationClient interface {
Get(ctx context.Context, idOrName string) (*hcloud.Location, *hcloud.Response, error)
}
LocationClient interface of hcloud.LocationClient
type SSHKeyClient ¶
type SSHKeyClient interface {
GetByID(ctx context.Context, id int) (*SSHKey, *Response, error)
GetByName(ctx context.Context, name string) (*SSHKey, *Response, error)
Get(ctx context.Context, idOrName string) (*SSHKey, *Response, error)
All(ctx context.Context) ([]*SSHKey, error)
Create(ctx context.Context, opts SSHKeyCreateOpts) (*SSHKey, *Response, error)
Delete(ctx context.Context, sshKey *SSHKey) (*Response, error)
Update(ctx context.Context, sshKey *SSHKey, opts SSHKeyUpdateOpts) (*SSHKey, *Response, error)
}
SSHKeyClient interface of hcloud.SSHKeyClient
type SSHKeyCreateOpts ¶
type SSHKeyCreateOpts = hcloud.SSHKeyCreateOpts
SSHKeyCreateOpts alias of hcloud.SSHKeyCreateOpts
type SSHKeyUpdateOpts ¶
type SSHKeyUpdateOpts = hcloud.SSHKeyUpdateOpts
SSHKeyUpdateOpts alias of hcloud.SSHKeyUpdateOpts
type ServerClient ¶
type ServerClient interface {
GetByID(ctx context.Context, id int) (*Server, *Response, error)
GetByName(ctx context.Context, name string) (*Server, *Response, error)
Get(ctx context.Context, idOrName string) (*Server, *Response, error)
// List(ctx context.Context, opts ServerListOpts) ([]*Server, *Response, error)
All(ctx context.Context) ([]*Server, error)
Create(ctx context.Context, opts ServerCreateOpts) (ServerCreateResult, *Response, error)
Delete(ctx context.Context, server *Server) (*Response, error)
Update(ctx context.Context, server *Server, opts ServerUpdateOpts) (*Server, *Response, error)
Poweron(ctx context.Context, server *Server) (*Action, *Response, error)
Reboot(ctx context.Context, server *Server) (*Action, *Response, error)
Reset(ctx context.Context, server *Server) (*Action, *Response, error)
// Shutdown(ctx context.Context, server *Server) (*Action, *Response, error)
Poweroff(ctx context.Context, server *Server) (*Action, *Response, error)
// ResetPassword(ctx context.Context, server *Server) (ServerResetPasswordResult, *Response, error)
// CreateImage(ctx context.Context, server *Server, opts *ServerCreateImageOpts) (ServerCreateImageResult, *Response, error)
AttachISO(ctx context.Context, server *Server, iso *ISO) (*Action, *Response, error)
DetachISO(ctx context.Context, server *Server) (*Action, *Response, error)
EnableRescue(ctx context.Context, server *Server, opts ServerEnableRescueOpts) (ServerEnableRescueResult, *Response, error)
DisableRescue(ctx context.Context, server *Server) (*Action, *Response, error)
// Rebuild(ctx context.Context, server *Server, opts ServerRebuildOpts) (*Action, *Response, error)
// AttachISO(ctx context.Context, server *Server, iso *ISO) (*Action, *Response, error)
// DetachISO(ctx context.Context, server *Server) (*Action, *Response, error)
EnableBackup(ctx context.Context, server *Server, window string) (*Action, *Response, error)
DisableBackup(ctx context.Context, server *Server) (*Action, *Response, error)
}
ServerClient interface of hcloud.ServerClient
type ServerCreateOpts ¶
type ServerCreateOpts = hcloud.ServerCreateOpts
ServerCreateOpts alias of hcloud.ServerCreateOpts
type ServerCreateResult ¶ added in v0.3.0
type ServerCreateResult = hcloud.ServerCreateResult
ServerCreateResult alias of hcloud.ServerCreateResult
type ServerEnableRescueOpts ¶
type ServerEnableRescueOpts = hcloud.ServerEnableRescueOpts
ServerEnableRescueOpts alias of hcloud.ServerEnableRescueOpts
type ServerEnableRescueResult ¶
type ServerEnableRescueResult = hcloud.ServerEnableRescueResult
ServerEnableRescueResult alias of hcloud.ServerEnableRescueResult
type ServerPublicNet ¶ added in v0.3.0
type ServerPublicNet = hcloud.ServerPublicNet
ServerPublicNet alias of hcloud.ServerPublicNet
type ServerPublicNetIPv4 ¶ added in v0.3.0
type ServerPublicNetIPv4 = hcloud.ServerPublicNetIPv4
ServerPublicNetIPv4 alias of hcloud.ServerPublicNetIPv4
type ServerPublicNetIPv6 ¶ added in v0.3.0
type ServerPublicNetIPv6 = hcloud.ServerPublicNetIPv6
ServerPublicNetIPv6 alias of hcloud.ServerPublicNetIPv6
type ServerRescueType ¶
type ServerRescueType = hcloud.ServerRescueType
ServerRescueType alias of hcloud.ServerRescueType
type ServerStatus ¶
type ServerStatus = hcloud.ServerStatus
ServerStatus alias of hcloud.ServerStatus
type ServerTypeClient ¶
type ServerTypeClient interface {
Get(ctx context.Context, idOrName string) (*ServerType, *Response, error)
}
ServerTypeClient interface of hcloud.ServerTypeClient
type ServerTypeListOpts ¶ added in v0.3.0
type ServerTypeListOpts = hcloud.ServerTypeListOpts
ServerTypeListOpts alias of hcloud.ServerTypeListOpts
type ServerUpdateOpts ¶
type ServerUpdateOpts = hcloud.ServerUpdateOpts
ServerUpdateOpts alias of hcloud.ServerUpdateOpts