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.

70 lines
1.6 KiB

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