Documentation ¶
Index ¶
- type Client
- func (c *Client) CreatePool(ctx context.Context, d *PoolCreateRequestBody) error
- func (c *Client) DeletePool(ctx context.Context, id string) error
- func (c *Client) GetPool(ctx context.Context, id string) (*PoolGetResponseData, error)
- func (c *Client) ListPools(ctx context.Context) ([]*PoolListResponseData, error)
- func (c *Client) UpdatePool(ctx context.Context, id string, d *PoolUpdateRequestBody) error
- type PoolCreateRequestBody
- type PoolGetResponseBody
- type PoolGetResponseData
- type PoolListResponseBody
- type PoolListResponseData
- type PoolUpdateRequestBody
- type VirtualEnvironmentPoolGetResponseMembers
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 pools API.
func (*Client) CreatePool ¶
func (c *Client) CreatePool(ctx context.Context, d *PoolCreateRequestBody) error
CreatePool creates a pool.
func (*Client) DeletePool ¶
DeletePool deletes a pool.
func (*Client) ListPools ¶
func (c *Client) ListPools(ctx context.Context) ([]*PoolListResponseData, error)
ListPools retrieves a list of pools.
func (*Client) UpdatePool ¶
UpdatePool updates a pool.
type PoolCreateRequestBody ¶
type PoolCreateRequestBody struct { Comment *string `json:"comment,omitempty" url:"comment,omitempty"` ID string `json:"groupid" url:"poolid"` }
PoolCreateRequestBody contains the data for a pool create request.
type PoolGetResponseBody ¶
type PoolGetResponseBody struct {
Data *PoolGetResponseData `json:"data,omitempty"`
}
PoolGetResponseBody contains the body from a pool get response.
type PoolGetResponseData ¶
type PoolGetResponseData struct { Comment *string `json:"comment,omitempty"` Members []VirtualEnvironmentPoolGetResponseMembers `json:"members,omitempty"` }
PoolGetResponseData contains the data from a pool get response.
type PoolListResponseBody ¶
type PoolListResponseBody struct {
Data []*PoolListResponseData `json:"data,omitempty"`
}
PoolListResponseBody contains the body from a pool list response.
type PoolListResponseData ¶
type PoolListResponseData struct { Comment *string `json:"comment,omitempty"` ID string `json:"poolid"` }
PoolListResponseData contains the data from a pool list response.
type PoolUpdateRequestBody ¶
type PoolUpdateRequestBody struct {
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
}
PoolUpdateRequestBody contains the data for an pool update request.
type VirtualEnvironmentPoolGetResponseMembers ¶
type VirtualEnvironmentPoolGetResponseMembers struct { ID string `json:"id"` Node string `json:"node"` DatastoreID *string `json:"storage,omitempty"` Type string `json:"type"` VMID *int `json:"vmid"` }
VirtualEnvironmentPoolGetResponseMembers contains the members data from a pool get response.