Adding types to the project
This commit is contained in:
parent
99f6abbc6c
commit
6e504199cc
9
Gopkg.lock
generated
Normal file
9
Gopkg.lock
generated
Normal file
@ -0,0 +1,9 @@
|
||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
input-imports = []
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
30
Gopkg.toml
Normal file
30
Gopkg.toml
Normal file
@ -0,0 +1,30 @@
|
||||
# Gopkg.toml example
|
||||
#
|
||||
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
|
||||
# for detailed Gopkg.toml documentation.
|
||||
#
|
||||
# required = ["github.com/user/thing/cmd/thing"]
|
||||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project"
|
||||
# version = "1.0.0"
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project2"
|
||||
# branch = "dev"
|
||||
# source = "github.com/myfork/project2"
|
||||
#
|
||||
# [[override]]
|
||||
# name = "github.com/x/y"
|
||||
# version = "2.4.0"
|
||||
#
|
||||
# [prune]
|
||||
# non-go = false
|
||||
# go-tests = true
|
||||
# unused-packages = true
|
||||
|
||||
|
||||
[prune]
|
||||
go-tests = true
|
||||
unused-packages = true
|
1
main.go
1
main.go
@ -47,5 +47,6 @@ func main() {
|
||||
|
||||
defer resp.Body.Close()
|
||||
b, _ := ioutil.ReadAll(resp.Body)
|
||||
|
||||
fmt.Printf("Got %s from Ally\n", b)
|
||||
}
|
||||
|
50
types.go
Normal file
50
types.go
Normal file
@ -0,0 +1,50 @@
|
||||
type AllyResponse struct {
|
||||
}
|
||||
|
||||
type AllyAccounts struct {
|
||||
Accounts []AllyAccount
|
||||
}
|
||||
|
||||
type AllyAccount struct {
|
||||
Summary AccountSummary `xml:"accountsummary"`
|
||||
}
|
||||
|
||||
type AccountSummary struct {
|
||||
Account int `xml:"accountsummary>account"`
|
||||
AccountName string `xml:"accountsummary>accountname"`
|
||||
Balance AccountBalance
|
||||
Holdings AccountHoldings
|
||||
}
|
||||
|
||||
type AccountBalance struct {
|
||||
Account int
|
||||
AccountValue float64
|
||||
BuyingPower BuyingPower
|
||||
FedCall int
|
||||
HouseCall int
|
||||
Money Money
|
||||
Securities Securities
|
||||
}
|
||||
|
||||
type BuyingPower struct {
|
||||
CashAvailableForWithdrawal float64
|
||||
DayTrading int
|
||||
EquityPercentage int
|
||||
Options int
|
||||
SodDayTrading int
|
||||
SodOptions int
|
||||
SodStock int
|
||||
Stock int
|
||||
}
|
||||
|
||||
type Money struct {
|
||||
AccruedInterest float64
|
||||
Cash float64
|
||||
CashAvailable float64
|
||||
MarginBalance int
|
||||
Mmf int
|
||||
Total int
|
||||
UnclearedDeposits float64
|
||||
UnsettledFunds float64
|
||||
Yield float64
|
||||
}
|
Loading…
Reference in New Issue
Block a user