economy

package
v0.0.0-...-f67e159 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Currency

type Currency struct {
	Name         string  `json:"name"`
	ISO4217      string  `json:"iso4217"`
	ExchangeRate float64 `json:"exchange_rate"`
}

type DefaultService

type DefaultService struct {
	// contains filtered or unexported fields
}

func NewDefaultService

func NewDefaultService() *DefaultService

func (*DefaultService) GetCurrencies

func (s *DefaultService) GetCurrencies() ([]*Currency, error)

func (*DefaultService) GetIndicators

func (s *DefaultService) GetIndicators() (*Indicators, error)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(env *env.Env, service Service) *Handler

func (*Handler) Currencies

func (h *Handler) Currencies() gin.HandlerFunc

func (*Handler) Indicators

func (h *Handler) Indicators() gin.HandlerFunc

type Indicators

type Indicators struct {
	UF        float64 `json:"uf"`
	IVP       float64 `json:"ivp"`
	Dollar    float64 `json:"dollar"`
	Euro      float64 `json:"euro"`
	ITCNM     float64 `json:"itcnm"`
	OztSilver float64 `json:"ozt_silver"`
	OztGold   float64 `json:"ozt_gold"`
	LbCopper  float64 `json:"lb_copper"`
}

type Service

type Service interface {
	GetIndicators() (*Indicators, error)
	GetCurrencies() ([]*Currency, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL