-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
108 lines (97 loc) · 2.73 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package main
type Buy struct {
BuyTimestamp int64
QuoteTimestamp int64
QuoteCryptoKey string
StockSymbol string
StockPrice int
BuyAmount int
}
type Sell struct {
SellTimestamp int64
QuoteTimestamp int64
QuoteCryptoKey string
StockSymbol string
StockPrice int
SellAmount int
StockSellAmount int
}
type BuyTrigger struct {
SetBuyTimestamp int64
StockSymbol string
BuyAmount int
BuyPrice int
}
type SellTrigger struct {
SetSellTimestamp int64
StockSymbol string
SellAmount int
SellPrice int
StockSellAmount int
}
type transactionConfig struct {
quoteServer string
quotePort string
auditServer string
db string
redisHost string
redisPort string
port string
rabbitMQ string
}
// Auditing types
type AccountTransaction struct {
Server string `json:"server"`
Action string `json:"action"`
Username string `json:"username"`
Funds int `json:"funds"`
TransactionNum int `json:"transactionNum"`
}
type SystemEvent struct {
Server string `json:"server"`
Command string `json:"command"`
StockSymbol string `json:"stockSymbol"`
Username string `json:"username"`
Filename string `json:"filename"`
Funds int `json:"funds"`
TransactionNum int `json:"transactionNum"`
}
type ErrorEvent struct {
Server string `json:"server"`
Command string `json:"command"`
StockSymbol string `json:"stockSymbol"`
Filename string `json:"filename"`
Funds int `json:"funds"`
Username string `json:"username"`
ErrorMessage string `json:"errorMessage"`
TransactionNum int `json:"transactionNum"`
}
type DebugEvent struct {
Server string `json:"server"`
Command string `json:"command"`
StockSymbol string `json:"stockSymbol"`
Filename string `json:"filename"`
Funds int `json:"funds"`
Username string `json:"username"`
DebugMessage string `json:"debugMessage"`
TransactionNum int `json:"transactionNum"`
Path string `json:"path"`
}
type QuoteServer struct {
Server string `json:"server"`
Price int `json:"price"`
StockSymbol string `json:"stockSymbol"`
Username string `json:"username"`
QuoteServerTime int64 `json:"quoteServerTime"`
Cryptokey string `json:"cryptokey"`
TransactionNum int `json:"transactionNum"`
}
type UserCommand struct {
Server string `json:"server"`
Command string `json:"command"`
Username string `json:"username"`
StockSymbol string `json:"stockSymbol"`
Filename string `json:"filename"`
Funds int `json:"funds"`
TransactionNum int `json:"transactionNum"`
}