Documentation ¶
Index ¶
Constants ¶
View Source
const ( URL_ECONOMIA = "https://economia.awesomeapi.com.br/json/last/" CODE = "USD" CODEIN = "BRL" EP = "cotacao" PORT = "8080" )
Variables ¶
View Source
var CotacaoTest = NewCotacao(
"USD",
"BRL",
"Dólar Americano/Real Brasileiro",
"5.3471",
"5.2792",
"0.0446",
"0.84",
"5.322",
"5.3245",
"1671124497",
"2022-12-15 14:51:33",
)
Functions ¶
Types ¶
type Cotacao ¶
type Cotacao struct { Id string `json:"id"` Code string `json:"code"` CodeIn string `json:"codein"` Name string `json:"name"` High string `json:"high"` Low string `json:"low"` VarBid string `json:"varBid"` PctChange string `json:"pctChange"` Bid string `json:"bid"` Ask string `json:"ask"` Timestamp string `json:"timestamp"` CreateDate string `json:"create_date"` }
type CotacaoDtoOut ¶
type CotacaoDtoOut struct {
Valor string `json:"valor"`
}
func GetCotacao ¶
func GetCotacao(ctx context.Context, cancel context.CancelFunc, ctxDB context.Context, cancelDB context.CancelFunc) (cotacaoOut CotacaoDtoOut, err error)
Click to show internal directories.
Click to hide internal directories.