Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an interface for accessing the Proxmox storage API.
func (*Client) GetDatastore ¶
func (c *Client) GetDatastore( ctx context.Context, datastoreID string, ) (*DatastoreGetResponseData, error)
GetDatastore retrieves information about a datastore.
Using undocumented API endpoints is not recommended, but sometimes it's the only way to get things done. $ pvesh get /storage/local ┌─────────┬───────────────────────────────────────────┐ │ key │ value │ ╞═════════╪═══════════════════════════════════════════╡ │ content │ images,vztmpl,iso,backup,snippets,rootdir │ ├─────────┼───────────────────────────────────────────┤ │ digest │ 5b65ede80f34631d6039e6922845cfa4abc956be │ ├─────────┼───────────────────────────────────────────┤ │ path │ /var/lib/vz │ ├─────────┼───────────────────────────────────────────┤ │ shared │ 0 │ ├─────────┼───────────────────────────────────────────┤ │ storage │ local │ ├─────────┼───────────────────────────────────────────┤ │ type │ dir │ └─────────┴───────────────────────────────────────────┘.
type DatastoreGetResponseBody ¶
type DatastoreGetResponseBody struct {
Data *DatastoreGetResponseData `json:"data,omitempty"`
}
DatastoreGetResponseBody contains the body from a datastore get response.
type DatastoreGetResponseData ¶
type DatastoreGetResponseData struct { Content types.CustomCommaSeparatedList `json:"content,omitempty" url:"content,omitempty,comma"` Digest *string `json:"digest,omitempty"` Path *string `json:"path,omitempty"` Storage *string `json:"storage,omitempty"` Type *string `json:"type,omitempty"` }
DatastoreGetResponseData contains the data from a datastore get response.