-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
65 lines (53 loc) · 1.26 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
package main
type Settings struct {
Admin string `json:"admin"`
}
type Asset struct {
History []string `json:"history"`
Value uint64 `json:"value"`
Info InfoEntry `json:"info"`
}
type User struct {
Role string `json:"role"`
Name string `json:"name"`
Balance uint64 `json:"userBalance"`
BalanceHistory []HistoryEntry `json:"balanceHistory"`
}
type Transfer struct {
Receiver string `json:"receiver"`
Value uint64 `json:"value"`
}
type BankObligation struct {
Bank string `json:"bank"`
Value uint64 `json:"value"`
}
type TransferEvent struct {
Sender string `json:"sender"`
Receiver string `json:"receiver"`
Value uint64 `json:"value"`
Info InfoEntry `json:"info"`
}
type Allowance struct {
Buyer string `json:"buyer"`
Value uint64 `json:"value"`
}
type AllowanceEvent struct {
Buyer string `json:"buyer"`
Value uint64 `json:"value"`
Shop string `json:"shop"`
Info InfoEntry `json:"info"`
}
type HistoryEntry struct {
Value string `json:"value"`
TxId string `json:"txId"`
Timestamp int64 `json:"timeStamp"`
}
type InfoEntry struct {
TxId string `json:"txId"`
Timestamp int64 `json:"timeStamp"`
}
type ValueType string
const (
String = ValueType("string")
UInt64 = ValueType("uInt64")
)