aboutsummaryrefslogtreecommitdiffstats
path: root/gosrc/structs.go
blob: cca024496031d0672941494c04e8ff06befad423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//   SMITH            (  //       /
//   structs           ( )/       /
//   by salade         )(/        /
//  ________________  ( /)        /
// ()__)____________)))))   :^}   /

package main

import (
	ui "github.com/gizak/termui/v3"
	"github.com/gizak/termui/v3/widgets"
)

//
// displayed contents
//  having a tree and an output makes sense because it just does, ok
//
type DisplayGrid struct {
	output *widgets.Paragraph
	tree *widgets.Tree
	grid *ui.Grid
	name string
}

// config.json content
type Config struct {
    Public_key string
	Secret_key string
	Mirror string
}

//
// ---- responses ----
//
type AccountStatusResponse struct {
    Data string
}

type AccountSnapshotResponseMain struct {
    Code float64
	Msg string
	SnapshotVos map[string]interface{}
}

type AccountSnapshotResponseVos struct {
	Data map[string]interface{}
	Type string
	UpdateTime float64
}

type AccountSnapshotResponseData struct {
	Balances []interface{}
	TotalAssetOfBtc float64
}

type DepositAddressResponse struct {
	Address string
	Coin string
	Tag string
	Url string
}

//
// urls to hit on mirror
//
type Targets struct {
	getall		string
	address		string
	status		string
	snapshot	string
	null		string
}

var GET_Targets = Targets {
	getall:		"/sapi/v1/capital/config/getall",
	address:	"/sapi/v1/capital/deposit/address",
	status:		"/sapi/v1/account/status",
	snapshot:	"/sapi/v1/accountSnapshot",
	null:		"/null",
}

var POST_Targets = Targets {
	getall:		"/null",
	address:	"/null",
	status:		"/null",
	snapshot:	"/null",
	null:		"/null",
}