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.

55 lines
1.3 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. }
  24. type EdgeModel struct {
  25. Txid string `json:"txid"`
  26. From string `json:"from"`
  27. To string `json:"to"`
  28. Label float64 `json:"label"` //the value of transaction
  29. Arrows string `json:"arrows"`
  30. BlockHeight int64 `json:"blockheight"`
  31. }
  32. type NetworkModel struct {
  33. Nodes []NodeModel `json:"nodes"`
  34. Edges []EdgeModel `json:"edges"`
  35. }
  36. type SankeyNodeModel struct {
  37. //StringNode string `json:"stringnode"`
  38. Node int `json:"node"`
  39. Name string `json:"name"`
  40. }
  41. type SankeyLinkModel struct {
  42. //StringSource string `json:"stringsource"`
  43. Source int `json:"source"`
  44. //StringTarget string `json:"stringtarget"`
  45. Target int `json:"target"`
  46. Value float64 `json:"value"`
  47. }
  48. type SankeyModel struct {
  49. Nodes []SankeyNodeModel `json:"nodes"`
  50. Links []SankeyLinkModel `json:"links"`
  51. }