entity

package
v0.0.0-...-ee2e90e Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCEPNotFound = errors.New("can not found zipcode")
	ErrCEPNotValid = errors.New("invalid zipcode")
	ErrEmptyAPIkey = errors.New("you should provide a not empty API key")
)

Functions

func CEPValidation

func CEPValidation(cep string) error

Types

type Location

type Location struct {
	Cep        string
	Localidade string
}

type LocationRepo

type LocationRepo interface {
	Get(ctx context.Context, cep string) (Location, error)
}

type Temperature

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

func NewTemperature

func NewTemperature(celsius float64) *Temperature

func (*Temperature) Celsius

func (t *Temperature) Celsius() float64

func (*Temperature) Fahrenheit

func (t *Temperature) Fahrenheit() float64

func (*Temperature) Kelvin

func (t *Temperature) Kelvin() float64

type TemperatureRepo

type TemperatureRepo interface {
	Get(ctx context.Context, location string) (Temperature, error)
}

Jump to

Keyboard shortcuts

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