arnaucube
arnaucube/goBlockchainDataAnalysisPublic Self-hosted repository
goBlockchainDataAnalysis/mongoModels.go
mongoModels.goRaw
 1package main
 2
 3type AddressModel struct {
 4	Hash      string  `json:"hash"`
 5	Amount    float64 `json:"amount"`
 6	InBittrex bool    `json:"inbittrex"`
 7}
 8type DateModel struct {
 9	Hour        string  `json:"hour"`
10	Day         string  `json:"day"`
11	Month       string  `json:"month"`
12	Amount      float64 `json:"amount"`
13	BlockHash   string  `json:"blockhash"`
14	BlockHeight string  `json:"blockheight"`
15}
16type TxModel struct {
17	Hex         string  `json:"hex"`
18	Txid        string  `json:"txid"`
19	Hash        string  `json:"hash"`
20	From        string  `json:"from"` //hash of address
21	To          string  `json:"to"`   //hash of address
22	Amount      float64 `json:"amount"`
23	BlockHash   string  `json:"blockhash"`
24	BlockHeight string  `json:"blockheight"`
25	Time        int64   `json:"time"`
26	DateF       string  `json:"datef"` //date formated
27	Date        DateModel
28}
29type BlockModel struct {
30	Hash          string `json:"hash"`
31	Confirmations uint64 `json:"confirmations"`
32	Size          int32  `json:"size"`
33	Height        int64  `json:"height"`
34	//Amount        float64  `json:"amount"`
35	//Fee           float64  `json:"fee"`
36	Tx           []string `json:"txid"` //txid of the TxModel
37	PreviousHash string   `json:"previoushash"`
38	NextHash     string   `json:"nexthash"`
39	Time         int64    `json:"time"`
40	DateF        string   `json:"datef"` //date formated
41	Date         DateModel
42}
43
44type NodeModel struct {
45	Id    string `json:"id"`
46	Label string `json:"label"`
47	Title string `json:"title"`
48	Group string `json:"group"`
49	Value int    `json:"value"`
50	Shape string `json:"shape"`
51	Type  string `json:"type"`
52}
53
54type EdgeModel struct {
55	Txid        string  `json:"txid"`
56	From        string  `json:"from"`
57	To          string  `json:"to"`
58	Label       float64 `json:"label"` //the value of transaction
59	Arrows      string  `json:"arrows"`
60	BlockHeight int64   `json:"blockheight"`
61}
62type NetworkModel struct {
63	Nodes []NodeModel `json:"nodes"`
64	Edges []EdgeModel `json:"edges"`
65}
66
67type SankeyNodeModel struct {
68	//StringNode string `json:"stringnode"`
69	Node int    `json:"node"`
70	Name string `json:"name"`
71}
72type SankeyLinkModel struct {
73	//StringSource string  `json:"stringsource"`
74	Source int `json:"source"`
75	//StringTarget string  `json:"stringtarget"`
76	Target int     `json:"target"`
77	Value  float64 `json:"value"`
78}
79type SankeyModel struct {
80	Nodes []SankeyNodeModel `json:"nodes"`
81	Links []SankeyLinkModel `json:"links"`
82}
83
84type HourCountModel struct {
85	Hour  string `json:"hour"`
86	Count int    `json:"count"`
87}
88type HourAnalysisResp struct {
89	Labels []string `json:"labels"`
90	Data   []int    `json:"data"`
91}
92type DateCountModel struct {
93	Time  int64  `json:"time"`
94	Date  string `json:"date"`
95	Count int    `json:"count"`
96}