Documentation ¶
Index ¶
- Constants
- type DiskStatus
- type Image
- type ImageListResponse
- type Instance
- type InstanceListResponse
- type Linode
- func (v *Linode) AttachVolume(ctx *lepton.Context, image, name string, attachID int) error
- func (v *Linode) BuildImage(ctx *lepton.Context) (string, error)
- func (v *Linode) BuildImageWithPackage(ctx *lepton.Context, pkgpath string) (string, error)
- func (v *Linode) CreateImage(ctx *lepton.Context, imagePath string) error
- func (v *Linode) CreateInstance(ctx *lepton.Context) error
- func (v *Linode) CreateVolume(ctx *lepton.Context, name, data, provider string) (lepton.NanosVolume, error)
- func (v *Linode) CustomizeImage(ctx *lepton.Context) (string, error)
- func (v *Linode) DeleteImage(ctx *lepton.Context, snapshotID string) error
- func (v *Linode) DeleteInstance(ctx *lepton.Context, instanceID string) error
- func (v *Linode) DeleteVolume(ctx *lepton.Context, name string) error
- func (v *Linode) DetachVolume(ctx *lepton.Context, image, name string) error
- func (v *Linode) GetAllVolumes(ctx *lepton.Context) (*[]lepton.NanosVolume, error)
- func (v *Linode) GetImages(ctx *lepton.Context) ([]lepton.CloudImage, error)
- func (v *Linode) GetInstanceByName(ctx *lepton.Context, name string) (*lepton.CloudInstance, error)
- func (v *Linode) GetInstanceLogs(ctx *lepton.Context, instancename string) (string, error)
- func (v *Linode) GetInstances(ctx *lepton.Context) ([]lepton.CloudInstance, error)
- func (v *Linode) GetStorage() lepton.Storage
- func (v *Linode) Initialize(config *types.ProviderConfig) error
- func (v *Linode) ListImages(ctx *lepton.Context) error
- func (v *Linode) ListInstances(ctx *lepton.Context) error
- func (v *Linode) PrintInstanceLogs(ctx *lepton.Context, instancename string, watch bool) error
- func (v *Linode) RebootInstance(ctx *lepton.Context, instanceName string) error
- func (v *Linode) ResizeImage(ctx *lepton.Context, imagename string, hbytes string) error
- func (v *Linode) StartInstance(ctx *lepton.Context, instanceID string) error
- func (v *Linode) StopInstance(ctx *lepton.Context, instanceID string) error
- func (v *Linode) SyncImage(config *types.Config, target lepton.Provider, image string) error
- type Objects
- type URLResponse
Constants ¶
const ProviderName = "linode"
ProviderName of the cloud platform provider
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskStatus ¶
DiskStatus holds the status for a linode disk status.
type Image ¶
type Image struct { CreatedBy string `json:"created_by"` ID string `json:"id"` IsPublic bool `json:"is_public"` Label string `json:"label"` Status string `json:"status"` }
Image represents a given linode image configuration.
type ImageListResponse ¶
type ImageListResponse struct {
Data []Image `json:"data"`
}
ImageListResponse is the set of instances available from linode in an images list call.
type Instance ¶
type Instance struct { Created string `json:"created"` ID int `json:"id"` Image string `json:"image"` IPv4 []string `json:"ipv4"` Region string `json:"region"` Status string `json:"status"` }
Instance is the Linode configuration for a given instance.
type InstanceListResponse ¶
type InstanceListResponse struct {
Data []Instance `json:"data"`
}
InstanceListResponse is the set of instances available from linode.
type Linode ¶
type Linode struct { Storage *Objects // contains filtered or unexported fields }
Linode Provider to interact with Linode infrastructure
func (*Linode) AttachVolume ¶
AttachVolume is a stub to satisfy VolumeService interface
func (*Linode) BuildImage ¶
BuildImage to be upload on linode
func (*Linode) BuildImageWithPackage ¶
BuildImageWithPackage to upload on Linode.
func (*Linode) CreateImage ¶
CreateImage - Creates image on linode using nanos images
func (*Linode) CreateInstance ¶
CreateInstance - Creates instance on Digital Ocean Platform
func (*Linode) CreateVolume ¶
func (v *Linode) CreateVolume(ctx *lepton.Context, name, data, provider string) (lepton.NanosVolume, error)
CreateVolume is a stub to satisfy VolumeService interface
func (*Linode) CustomizeImage ¶
CustomizeImage returns image path with adaptations needed by cloud provider
func (*Linode) DeleteImage ¶
DeleteImage deletes image from v
func (*Linode) DeleteInstance ¶
DeleteInstance deletes instance from linode
func (*Linode) DeleteVolume ¶
DeleteVolume is a stub to satisfy VolumeService interface
func (*Linode) DetachVolume ¶
DetachVolume is a stub to satisfy VolumeService interface
func (*Linode) GetAllVolumes ¶
GetAllVolumes is a stub to satisfy VolumeService interface
func (*Linode) GetInstanceByName ¶
GetInstanceByName returns instance with given name
func (*Linode) GetInstanceLogs ¶
GetInstanceLogs gets instance related logs
func (*Linode) GetInstances ¶
GetInstances return all instances on Linode
func (*Linode) GetStorage ¶
GetStorage returns storage interface for cloud provider
func (*Linode) Initialize ¶
func (v *Linode) Initialize(config *types.ProviderConfig) error
Initialize provider
func (*Linode) ListImages ¶
ListImages lists images on Linode
func (*Linode) ListInstances ¶
ListInstances lists instances on v
func (*Linode) PrintInstanceLogs ¶
PrintInstanceLogs writes instance logs to console
func (*Linode) RebootInstance ¶
RebootInstance reboots the instance.
func (*Linode) ResizeImage ¶
ResizeImage is not supported on Linode.
func (*Linode) StartInstance ¶
StartInstance starts an instance in linode
func (*Linode) StopInstance ¶
StopInstance halts instance from v
type Objects ¶
type Objects struct{}
Objects provides Linode Object Storage related operations
func (*Objects) CopyToBucket ¶
CopyToBucket copies archive to bucket
type URLResponse ¶
type URLResponse struct {
Link string `json:"upload_to"`
}
URLResponse provides a url for uploading an image to Linode.