You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.7 KiB

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