diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-04-30 20:34:07 +0200 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-04-30 20:34:07 +0200 |
commit | 6424c502b18ff2f0b263b46729b1d76585e1ad39 (patch) | |
tree | efabeb70f39980c0e2a0f397c14753d0475c9189 /gosrc/structs.go | |
parent | improve response display, now with 400% more unmarshalling (smith_v_0.1.0) (diff) | |
download | smith-6424c502b18ff2f0b263b46729b1d76585e1ad39.tar.gz smith-6424c502b18ff2f0b263b46729b1d76585e1ad39.tar.bz2 smith-6424c502b18ff2f0b263b46729b1d76585e1ad39.tar.xz smith-6424c502b18ff2f0b263b46729b1d76585e1ad39.tar.zst smith-6424c502b18ff2f0b263b46729b1d76585e1ad39.zip |
refactor to to make space for multiple views/workspaces
Diffstat (limited to 'gosrc/structs.go')
-rw-r--r-- | gosrc/structs.go | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/gosrc/structs.go b/gosrc/structs.go index 49843a0..cca0244 100644 --- a/gosrc/structs.go +++ b/gosrc/structs.go @@ -6,29 +6,20 @@ package main -// 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", -} +import ( + ui "github.com/gizak/termui/v3" + "github.com/gizak/termui/v3/widgets" +) -var POST_Targets = Targets { - getall: "/null", - address: "/null", - status: "/null", - snapshot: "/null", - null: "/null", +// +// 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 @@ -68,3 +59,30 @@ type DepositAddressResponse struct { 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", +} |