services

package
v0.0.0-...-be81f65 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeerService

type BeerService interface {
	SearchBeers() ([]models.BeerItem, error)
	AddBeers(id int64, name, brewery, country, currency string, price float64) error
	SearchBeerById(id int64) (*models.BeerItem, error)
	BoxBeerPriceById(id int64, currency string, quantiy int64) (*models.BeerBox, error)
}

BeerService : represent the beer's services

func NewBeerService

func NewBeerService() BeerService

NewBeerService method

type Response

type Response struct {
	Success bool               `json:"success"`
	Source  string             `json:"source"`
	Quotes  map[string]float64 `json:"quotes"`
	Error   struct {
		Code int64  `json:"code,omitempty"`
		Info string `json:"info,omitempty"`
	} `json:"error,omitempty"`
}

Response from API CurrencyLayer

Jump to

Keyboard shortcuts

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