Documentation
¶
Index ¶
- type Attachment
- type BlockVolume
- type BlockVolumeBackend
- type BlockVolumeClient
- func (c *BlockVolumeClient) Create(params *BlockVolumeParams) (*BlockVolume, error)
- func (c *BlockVolumeClient) Delete(id string) (*BlockVolumeDeletion, error)
- func (c *BlockVolumeClient) Details(id string) (*BlockVolume, error)
- func (c *BlockVolumeClient) List(params *BlockVolumeParams) (*BlockVolumeList, error)
- func (c *BlockVolumeClient) Resize(params *BlockVolumeParams) (*BlockVolumeResize, error)
- func (c *BlockVolumeClient) Update(params *BlockVolumeParams) (*BlockVolume, error)
- type BlockVolumeDeletion
- type BlockVolumeList
- type BlockVolumeParams
- type BlockVolumeResize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { Device string `json:"device,omitempty"` Resource string `json:"resource,omitempty"` }
Attachment represents the attachment details for a block volume.
type BlockVolume ¶
type BlockVolume struct { AttachedTo []Attachment `json:"attachedTo,omitempty"` CrossAttach types.NumericalBoolean `json:"cross_attach,omitempty"` Domain string `json:"domain,omitempty"` Label string `json:"label,omitempty"` Size types.FlexInt `json:"size,omitempty"` Status string `json:"status,omitempty"` UniqID string `json:"uniq_id,omitempty"` ZoneAvailability []types.FlexInt `json:"zoneAvailability,omitempty"` }
BlockVolume is the resource representing a block volume.
type BlockVolumeBackend ¶
type BlockVolumeBackend interface { Create(*BlockVolumeParams) (*BlockVolume, error) Details(string) (*BlockVolume, error) List(*BlockVolumeParams) (*BlockVolumeList, error) Update(*BlockVolumeParams) (*BlockVolume, error) Delete(string) (*BlockVolumeDeletion, error) Resize(*BlockVolumeParams) (*BlockVolumeResize, error) }
BlockVolumeBackend describes the interface for interactions with the API.
type BlockVolumeClient ¶
BlockVolumeClient is the backend implementation for interacting with block volumes.
func (*BlockVolumeClient) Create ¶
func (c *BlockVolumeClient) Create(params *BlockVolumeParams) (*BlockVolume, error)
Create creates a new block volume.
func (*BlockVolumeClient) Delete ¶
func (c *BlockVolumeClient) Delete(id string) (*BlockVolumeDeletion, error)
Delete will delete a block volume.
func (*BlockVolumeClient) Details ¶
func (c *BlockVolumeClient) Details(id string) (*BlockVolume, error)
Details returns details about a block volume.
func (*BlockVolumeClient) List ¶
func (c *BlockVolumeClient) List(params *BlockVolumeParams) (*BlockVolumeList, error)
List returns a list of block volumes.
func (*BlockVolumeClient) Resize ¶
func (c *BlockVolumeClient) Resize(params *BlockVolumeParams) (*BlockVolumeResize, error)
Resize will resize a block volume.
func (*BlockVolumeClient) Update ¶
func (c *BlockVolumeClient) Update(params *BlockVolumeParams) (*BlockVolume, error)
Update will update a block volume.
type BlockVolumeDeletion ¶
type BlockVolumeDeletion struct {
Deleted string `json:"deleted"`
}
BlockVolumeDeletion represents the API result when deleting a block volume.
type BlockVolumeList ¶
type BlockVolumeList struct { liquidweb.ListMeta Items []BlockVolume `json:"items,omitempty"` }
BlockVolumeList is an envelope for the API result containing either a list of block volumes or an error.
type BlockVolumeParams ¶
type BlockVolumeParams struct { Attach string `json:"attach,omitempty"` CrossAttach bool `json:"cross_attach,omitempty"` DetachFrom string `json:"detach_from,omitempty"` Domain string `json:"domain,omitempty"` NewSize int `json:"new_size,omitempty"` Region int `json:"region,omitempty"` Size int `json:"size,omitempty"` To string `json:"to,omitempty"` UniqID string `json:"uniq_id,omitempty"` Zone int `json:"zone,omitempty"` liquidweb.PageParams }
BlockVolumeParams is the set of parameters used when creating or updating a block volume