Documentation ¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, data *HAGroupCreateRequestBody) error
- func (c *Client) Delete(ctx context.Context, groupID string) error
- func (c *Client) ExpandPath(path string) string
- func (c *Client) Get(ctx context.Context, groupID string) (*HAGroupGetResponseData, error)
- func (c *Client) List(ctx context.Context) ([]*HAGroupListResponseData, error)
- func (c *Client) Update(ctx context.Context, groupID string, data *HAGroupUpdateRequestBody) error
- type HAGroupCreateRequestBody
- type HAGroupDataBase
- type HAGroupGetResponseBody
- type HAGroupGetResponseData
- type HAGroupListResponseBody
- type HAGroupListResponseData
- type HAGroupUpdateRequestBody
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 High Availability groups API.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, data *HAGroupCreateRequestBody) error
Create creates a new HA group.
func (*Client) ExpandPath ¶
ExpandPath expands a relative path to the HA groups management API path.
type HAGroupCreateRequestBody ¶
type HAGroupCreateRequestBody struct { // The group's data HAGroupDataBase // The group's identifier ID string `url:"group"` // The type. Always set to `group`. Type string `url:"type"` }
HAGroupCreateRequestBody contains the data which must be sent when creating a HA group.
type HAGroupDataBase ¶
type HAGroupDataBase struct { // A SHA1 digest of the group's configuration. Digest *string `json:"digest,omitempty" url:"digest,omitempty"` // The group's comment, if defined Comment *string `json:"comment,omitempty" url:"comment,omitempty"` // A comma-separated list of node fields. Each node field contains a node name, and may // include a priority, with a semicolon acting as a separator. Nodes string `json:"nodes" url:"nodes"` // A boolean (0/1) indicating that failing back to the highest priority node is disabled. NoFailback types.CustomBool `json:"nofailback" url:"nofailback,int"` // A boolean (0/1) indicating that associated resources cannot run on other nodes. Restricted types.CustomBool `json:"restricted" url:"restricted,int"` }
HAGroupDataBase contains fields which are both received from and send to the HA group API.
type HAGroupGetResponseBody ¶
type HAGroupGetResponseBody struct {
Data *HAGroupGetResponseData `json:"data,omitempty"`
}
HAGroupGetResponseBody contains the body from a HA group get response.
type HAGroupGetResponseData ¶
type HAGroupGetResponseData struct { // The group's data HAGroupDataBase // The group's identifier ID string `json:"group"` // The type. Always set to `group`. Type string `json:"type"` }
HAGroupGetResponseData contains the data from a HA group get response.
type HAGroupListResponseBody ¶
type HAGroupListResponseBody struct {
Data []*HAGroupListResponseData `json:"data,omitempty"`
}
HAGroupListResponseBody contains the body from a HA group list response.
type HAGroupListResponseData ¶
type HAGroupListResponseData struct {
ID string `json:"group"`
}
HAGroupListResponseData contains the data from a HA group list response.
type HAGroupUpdateRequestBody ¶
type HAGroupUpdateRequestBody struct { // The group's data HAGroupDataBase // A list of settings to delete Delete string `url:"delete"` }
HAGroupUpdateRequestBody contains the data which must be sent when updating a HA group.