-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtable_model.go
42 lines (36 loc) · 983 Bytes
/
table_model.go
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
package nbpapi
import "net/http"
// NBPTable type
type NBPTable struct {
tableType string
result []byte
Exchange []ExchangeTable
ExchangeC []ExchangeTableC
Client *http.Client
}
type rateTable struct {
Currency string `json:"currency"`
Code string `json:"code"`
Mid float64 `json:"mid"`
}
// ExchangeTable type
type ExchangeTable struct {
Table string `json:"table"`
No string `json:"no"`
EffectiveDate string `json:"effectiveDate"`
Rates []rateTable `json:"rates"`
}
type rateTableC struct {
Currency string `json:"currency"`
Code string `json:"code"`
Bid float64 `json:"bid"`
Ask float64 `json:"ask"`
}
// ExchangeTableC type
type ExchangeTableC struct {
Table string `json:"table"`
No string `json:"no"`
TradingDate string `json:"tradingDate"`
EffectiveDate string `json:"effectiveDate"`
Rates []rateTableC `json:"rates"`
}