goBlockchainDataAnalysis/mongoModels.go
mongoModels.goRaw
1package main
2
3type TxModel struct {
4 Txid string
5 From string
6 To string
7 Amount float64
8}
9type BlockModel struct {
10 Hash string
11 Height int64
12 Confirmations uint64
13 Amount float64
14 Fee float64
15 Tx []TxModel
16}
17
18type NodeModel struct {
19 Id string `json:"id"`
20 Label string `json:"label"`
21 Title string `json:"title"`
22 Group string `json:"group"`
23 Value int `json:"value"`
24 Shape string `json:"shape"`
25}
26
27type EdgeModel struct {
28 Txid string `json:"txid"`
29 From string `json:"from"`
30 To string `json:"to"`
31 Label float64 `json:"label"` //the value of transaction
32 Arrows string `json:"arrows"`
33 BlockHeight int64 `json:"blockheight"`
34}
35type NetworkModel struct {
36 Nodes []NodeModel `json:"nodes"`
37 Edges []EdgeModel `json:"edges"`
38}
39
40type SankeyNodeModel struct {
41 //StringNode string `json:"stringnode"`
42 Node int `json:"node"`
43 Name string `json:"name"`
44}
45type SankeyLinkModel struct {
46 //StringSource string `json:"stringsource"`
47 Source int `json:"source"`
48 //StringTarget string `json:"stringtarget"`
49 Target int `json:"target"`
50 Value float64 `json:"value"`
51}
52type SankeyModel struct {
53 Nodes []SankeyNodeModel `json:"nodes"`
54 Links []SankeyLinkModel `json:"links"`
55}
56
57type HourCountModel struct {
58 Hour string `json:"hour"`
59 Count int `json:"count"`
60}
61type HourAnalysisResp struct {
62 Labels []string `json:"labels"`
63 Data []int `json:"data"`
64}
65type DateCountModel struct {
66 Time int64 `json:"time"`
67 Date string `json:"date"`
68 Count int `json:"count"`
69}