-
Notifications
You must be signed in to change notification settings - Fork 0
/
driverfile.go
79 lines (66 loc) · 1.71 KB
/
driverfile.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
package dao
type DirItemCheck struct {
Name string
Size uint64
ModifyTime uint64
}
type IDriverFile interface {
GetDriverId() uint64
GetDirPath() []string
GetName() string
GetVersion() uint64
GetHash() string
GetMode() uint64
GetSize() uint64
GetCreateTime() uint64
GetModifyTime() uint64
GetChangeTime() uint64
GetAccessTime() uint64
}
// https://zhuanlan.zhihu.com/p/343682839
type DriverFile struct {
DriverId uint64 `json:"driverId"`
DriverName string `json:"driverName"`
DirPath []string `json:"dirPath"`
Name string `json:"name"`
Version uint64 `json:"version"` // TODO: REMOVE IT!
Hash string `json:"hash"`
Mode uint64 `json:"mode"`
Size uint64 `json:"size"`
CreateTime uint64 `json:"createTime"` // linux does not support it.
ModifyTime uint64 `json:"modifyTime"`
ChangeTime uint64 `json:"changeTime"` // windows does not support it.
AccessTime uint64 `json:"accessTime"`
UploadDeviceId string `json:"uploadDeviceId"`
UploadTime uint64 `json:"uploadTime"`
}
func (d DriverFile) GetDriverId() uint64 {
return d.DriverId
}
func (d DriverFile) GetDirPath() []string {
return d.DirPath
}
func (d DriverFile) GetName() string {
return d.Name
}
func (d DriverFile) GetHash() string {
return d.Hash
}
func (d DriverFile) GetMode() uint64 {
return d.Mode
}
func (d DriverFile) GetSize() uint64 {
return d.Size
}
func (d DriverFile) GetCreateTime() uint64 {
return d.CreateTime
}
func (d DriverFile) GetModifyTime() uint64 {
return d.ModifyTime
}
func (d DriverFile) GetChangeTime() uint64 {
return d.ChangeTime
}
func (d DriverFile) GetAccessTime() uint64 {
return d.AccessTime
}