-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataset.go
More file actions
44 lines (40 loc) · 1.55 KB
/
dataset.go
File metadata and controls
44 lines (40 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package truenas
// DatasetResponse represents a dataset from the pool.dataset.query API.
type DatasetResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Pool string `json:"pool"`
Type string `json:"type"`
Mountpoint string `json:"mountpoint"`
Comments PropertyValue `json:"comments"`
Compression PropertyValue `json:"compression"`
Quota SizePropertyField `json:"quota"`
RefQuota SizePropertyField `json:"refquota"`
Atime PropertyValue `json:"atime"`
Volsize SizePropertyField `json:"volsize"`
Volblocksize PropertyValue `json:"volblocksize"`
Sparse PropertyValue `json:"sparse"`
Used SizePropertyField `json:"used"`
Available SizePropertyField `json:"available"`
}
// SizePropertyField represents a ZFS size property with a parsed numeric value and string representation.
type SizePropertyField struct {
Parsed int64 `json:"parsed"`
Value string `json:"value"`
}
// DatasetCreateResponse represents the response from pool.dataset.create.
type DatasetCreateResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Mountpoint string `json:"mountpoint"`
}
// PoolResponse represents a pool from the pool.query API.
type PoolResponse struct {
ID int64 `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Status string `json:"status"`
Size int64 `json:"size"`
Allocated int64 `json:"allocated"`
Free int64 `json:"free"`
}