-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathclone.go
39 lines (34 loc) · 1.05 KB
/
clone.go
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
/*
2019 © Postgres.ai
*/
package models
// Clone defines a clone model.
type Clone struct {
ID string `json:"id"`
Snapshot *Snapshot `json:"snapshot"`
Protected bool `json:"protected"`
DeleteAt *LocalTime `json:"deleteAt"`
CreatedAt *LocalTime `json:"createdAt"`
Status Status `json:"status"`
DB Database `json:"db"`
Metadata CloneMetadata `json:"metadata"`
}
// CloneMetadata contains fields describing a clone model.
type CloneMetadata struct {
CloneDiffSize uint64 `json:"cloneDiffSize"`
LogicalSize uint64 `json:"logicalSize"`
CloningTime float64 `json:"cloningTime"`
MaxIdleMinutes uint `json:"maxIdleMinutes"`
}
// CloneView represents a view of clone model.
type CloneView struct {
*Clone
Snapshot *SnapshotView `json:"snapshot"`
Metadata CloneMetadataView `json:"metadata"`
}
// CloneMetadataView represents a view of clone metadata.
type CloneMetadataView struct {
*CloneMetadata
CloneDiffSize Size `json:"cloneDiffSize"`
LogicalSize Size `json:"logicalSize"`
}