-
Notifications
You must be signed in to change notification settings - Fork 13
/
types.go
81 lines (74 loc) · 2.83 KB
/
types.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package migrate
import "time"
type ScanningRequest struct {
ID string `bson:"_id"`
Name string `bson:"name"`
MinSize uint64 `bson:"minSize"`
MaxSize uint64 `bson:"maxSize"`
Path string `bson:"path"`
Status string `bson:"status"`
OutDir string `bson:"outDir"`
TmpDir string `bson:"tmpDir"`
Scanned uint64 `bson:"scanned"`
DagGenerationAttempted bool `bson:"dagGenerationAttempted"`
UpdatedAt time.Time `bson:"updatedAt"`
}
type GenerationRequest struct {
ID string `bson:"_id"`
DatasetName string `bson:"datasetName"`
Path string `bson:"path"`
Index uint64 `bson:"index"`
OutDir string `bson:"outDir"`
Status string `bson:"status"`
TmpDir string `bson:"tmpDir"`
CreatedAt time.Time `bson:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt"`
CarSize uint64 `bson:"carSize"`
DataCID string `bson:"dataCid"`
PieceCID string `bson:"pieceCid"`
PieceSize uint64 `bson:"pieceSize"`
}
type OutputFileList struct {
ID string `bson:"_id"`
GeneratedFileList []GeneratedFile `bson:"generatedFileList"`
}
type GeneratedFile struct {
Path string `bson:"path"`
Dir bool `bson:"dir"`
CID string `bson:"cid"`
Size uint64 `bson:"size"`
Start uint64 `bson:"start"`
End uint64 `bson:"end"`
}
type ReplicationRequest struct {
ID string `bson:"_id"`
DatasetID string `bson:"datasetId"`
StorageProviders string `bson:"storageProviders"`
URLPrefix string `bson:"urlPrefix"`
MaxPrice uint64 `bson:"maxPrice"`
IsVerified bool `bson:"isVerified"`
StartDelay uint64 `bson:"startDelay"`
Duration uint64 `bson:"duration"`
MaxNumberOfDeals uint64 `bson:"maxNumberOfDeals"`
Status string `bson:"status"`
CreatedAt time.Time `bson:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt"`
FileListPath string `bson:"fileListPath"`
CronSchedule string `bson:"cronSchedule"`
CronMaxDeals uint64 `bson:"cronMaxDeals"`
CronMaxPendingDeals uint64 `bson:"cronMaxPendingDeals"`
Notes string `bson:"notes"`
}
type DealState struct {
Client string `bson:"client"`
Provider string `bson:"provider"`
DealCID string `bson:"dealCid"`
PieceCID string `bson:"pieceCid"`
StartEpoch int64 `bson:"startEpoch"`
Expiration int64 `bson:"expiration"`
Duration int64 `bson:"duration"`
DealID uint64 `bson:"dealId"`
State string `bson:"state"`
CreatedAt time.Time `bson:"createdAt"`
UpdatedAt time.Time `bson:"updatedAt"`
}