Documentation ¶
Index ¶
- type Client
- func (c *Client) Index(ctx context.Context, req IndexRequest) ([]map[string]interface{}, error)
- func (c *Client) Initgpt(ctx context.Context, req InitgptRequest) (string, error)
- func (c *Client) List(ctx context.Context, req ListRequest) ([]ListResponse, error)
- func (c *Client) Smart(ctx context.Context, req SmartRequest) (SmartResponse, error)
- func (c *Client) WipeDiskWipedisk(ctx context.Context, req WipeDiskWipediskRequest) (string, error)
- type HTTPClient
- type IndexRequest
- type InitgptRequest
- type ListRequest
- type ListResponse
- type SmartRequest
- type SmartResponse
- type Type
- type WipeDiskWipediskRequest
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) List ¶
func (c *Client) List(ctx context.Context, req ListRequest) ([]ListResponse, error)
List List local disks.
func (*Client) Smart ¶
func (c *Client) Smart(ctx context.Context, req SmartRequest) (SmartResponse, error)
Smart Get SMART Health of a disk.
func (*Client) WipeDiskWipedisk ¶
WipeDiskWipedisk Wipe a disk or partition.
type HTTPClient ¶
type IndexRequest ¶
type IndexRequest struct {
Node string `url:"node" json:"node"` // The cluster node name.
}
type InitgptRequest ¶
type ListRequest ¶
type ListRequest struct { Node string `url:"node" json:"node"` // The cluster node name. // The following parameters are optional IncludePartitions *util.PVEBool `url:"include-partitions,omitempty" json:"include-partitions,omitempty"` // Also include partitions. Skipsmart *util.PVEBool `url:"skipsmart,omitempty" json:"skipsmart,omitempty"` // Skip smart checks. Type *Type `url:"type,omitempty" json:"type,omitempty"` // Only list specific types of disks. }
type ListResponse ¶
type ListResponse struct { Devpath string `url:"devpath" json:"devpath"` // The device path Gpt util.PVEBool `url:"gpt" json:"gpt"` Mounted util.PVEBool `url:"mounted" json:"mounted"` Osdid int `url:"osdid" json:"osdid"` Size int `url:"size" json:"size"` // The following parameters are optional Health *string `url:"health,omitempty" json:"health,omitempty"` Model *string `url:"model,omitempty" json:"model,omitempty"` Parent *string `url:"parent,omitempty" json:"parent,omitempty"` // For partitions only. The device path of the disk the partition resides on. Serial *string `url:"serial,omitempty" json:"serial,omitempty"` Used *string `url:"used,omitempty" json:"used,omitempty"` Vendor *string `url:"vendor,omitempty" json:"vendor,omitempty"` Wwn *string `url:"wwn,omitempty" json:"wwn,omitempty"` }
type SmartRequest ¶
type SmartRequest struct { Disk string `url:"disk" json:"disk"` // Block device name Node string `url:"node" json:"node"` // The cluster node name. // The following parameters are optional Healthonly *util.PVEBool `url:"healthonly,omitempty" json:"healthonly,omitempty"` // If true returns only the health status }
type SmartResponse ¶
type SmartResponse struct { Health string `url:"health" json:"health"` // The following parameters are optional Attributes *[]map[string]interface{} `url:"attributes,omitempty" json:"attributes,omitempty"` Text *string `url:"text,omitempty" json:"text,omitempty"` Type *string `url:"type,omitempty" json:"type,omitempty"` }
type WipeDiskWipediskRequest ¶
Click to show internal directories.
Click to hide internal directories.