Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) Create ¶
Create Create a Filesystem on an unused disk. Will be mounted under '/mnt/pve/NAME'.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
Index PVE Managed Directory storages.
type CreateRequest ¶
type CreateRequest struct { Device string `url:"device" json:"device"` // The block device you want to create the filesystem on. Name string `url:"name" json:"name"` // The storage identifier. Node string `url:"node" json:"node"` // The cluster node name. // The following parameters are optional AddStorage *util.PVEBool `url:"add_storage,omitempty" json:"add_storage,omitempty"` // Configure storage using the directory. Filesystem *Filesystem `url:"filesystem,omitempty" json:"filesystem,omitempty"` // The desired filesystem. }
type DeleteRequest ¶
type DeleteRequest struct { Name string `url:"name" json:"name"` // The storage identifier. Node string `url:"node" json:"node"` // The cluster node name. // The following parameters are optional CleanupConfig *util.PVEBool `url:"cleanup-config,omitempty" json:"cleanup-config,omitempty"` // Marks associated storage(s) as not available on this node anymore or removes them from the configuration (if configured for this node only). CleanupDisks *util.PVEBool `url:"cleanup-disks,omitempty" json:"cleanup-disks,omitempty"` // Also wipe disk so it can be repurposed afterwards. }
type Filesystem ¶ added in v0.0.15
type Filesystem string
const ( Filesystem_EXT4 Filesystem = "ext4" Filesystem_XFS Filesystem = "xfs" )
func PtrFilesystem ¶ added in v0.0.15
func PtrFilesystem(i Filesystem) *Filesystem
type HTTPClient ¶
type IndexRequest ¶
type IndexRequest struct {
Node string `url:"node" json:"node"` // The cluster node name.
}
type IndexResponse ¶
type IndexResponse struct { Device string `url:"device" json:"device"` // The mounted device. Options string `url:"options" json:"options"` // The mount options. Path string `url:"path" json:"path"` // The mount path. Type string `url:"type" json:"type"` // The filesystem type. Unitfile string `url:"unitfile" json:"unitfile"` // The path of the mount unit. }
Click to show internal directories.
Click to hide internal directories.