correios

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Correios

type Correios interface {
	Check(ctx context.Context) error
	Lookup(ctx context.Context, cep string) (*storage.Address, error)
}

func New

func New() Correios

type Dado

type Dado struct {
	UF                       string        `json:"uf"`
	Localidade               string        `json:"localidade"`
	LocNoSem                 string        `json:"locNoSem"`
	LocNu                    string        `json:"locNu"`
	LocalidadeSubordinada    string        `json:"localidadeSubordinada"`
	LogradouroDNEC           string        `json:"logradouroDNEC"`
	LogradouroTextoAdicional string        `json:"logradouroTextoAdicional"`
	LogradouroTexto          string        `json:"logradouroTexto"`
	Bairro                   string        `json:"bairro"`
	BaiNu                    string        `json:"baiNu"`
	NomeUnidade              string        `json:"nomeUnidade"`
	CEP                      string        `json:"cep"`
	TipoCEP                  string        `json:"tipoCep"`
	NumeroLocalidade         string        `json:"numeroLocalidade"`
	Situacao                 string        `json:"situacao"`
	FaixasCaixaPostal        []interface{} `json:"faixasCaixaPostal"`
	FaixasCEP                []interface{} `json:"faixasCep"`
}

type LookupResponse

type LookupResponse struct {
	Erro     bool    `json:"erro"`
	Mensagem string  `json:"mensagem"`
	Total    int     `json:"total"`
	Dados    []*Dado `json:"dados"`
}

Jump to

Keyboard shortcuts

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