Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Create(ctx context.Context, req CreateRequest) error
- func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
- func (c *Client) Find(ctx context.Context, req FindRequest) (FindResponse, error)
- func (c *Client) Index(ctx context.Context) ([]IndexResponse, error)
- func (c *Client) Update(ctx context.Context, req UpdateRequest) error
- type CreateRequest
- type DeleteRequest
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexResponse
- type Members
- type MembersType
- type Type
- type UpdateRequest
Constants ¶
View Source
const ( MembersType_QEMU MembersType = "qemu" MembersType_LXC MembersType = "lxc" MembersType_OPENVZ MembersType = "openvz" MembersType_STORAGE MembersType = "storage" Type_QEMU Type = "qemu" Type_LXC Type = "lxc" Type_STORAGE Type = "storage" )
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 ¶
func (c *Client) Create(ctx context.Context, req CreateRequest) error
Create Create new pool.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
Delete Delete pool.
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req FindRequest) (FindResponse, error)
Find Get pool configuration.
type CreateRequest ¶
type DeleteRequest ¶
type DeleteRequest struct {
Poolid string `url:"poolid" json:"poolid"`
}
type FindRequest ¶
type FindResponse ¶
type HTTPClient ¶
type IndexResponse ¶
type IndexResponse struct {
Poolid string `url:"poolid" json:"poolid"`
}
type Members ¶ added in v0.0.10
type Members struct { Id string `url:"id" json:"id"` Node string `url:"node" json:"node"` Type MembersType `url:"type" json:"type"` // The following parameters are optional Storage *string `url:"storage,omitempty" json:"storage,omitempty"` Vmid *int `url:"vmid,omitempty" json:"vmid,omitempty"` }
type MembersType ¶ added in v0.0.15
type MembersType string
func PtrMembersType ¶ added in v0.0.15
func PtrMembersType(i MembersType) *MembersType
type UpdateRequest ¶
type UpdateRequest struct { Poolid string `url:"poolid" json:"poolid"` // The following parameters are optional Comment *string `url:"comment,omitempty" json:"comment,omitempty"` Delete *util.PVEBool `url:"delete,omitempty" json:"delete,omitempty"` // Remove vms/storage (instead of adding it). Storage *string `url:"storage,omitempty" json:"storage,omitempty"` // List of storage IDs. Vms *string `url:"vms,omitempty" json:"vms,omitempty"` // List of virtual machines. }
Click to show internal directories.
Click to hide internal directories.