Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type Bairros
- type Cep
- type CepRemovidoService
- type CepService
- type CepStatus
- type CepTipo
- type Cidades
- type CidadesItem
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Endereco
- type EnderecoHits
- type EnderecoHitsHit
- type EnderecoPesquisaParams
- type EnderecoPesquisaParamsParams
- type EnderecoService
- type EnderecoTemplateCodigoIbgeNewParams
- type EnderecoTemplateCodigoIbgeNewParamsParams
- type EnderecoTemplateCodigoIbgeService
- type EnderecoTemplateService
- type EnderecoTemplateUfCidadeNewParams
- type EnderecoTemplateUfCidadeNewParamsParams
- type EnderecoTemplateUfCidadeService
- type EnderecoTemplateUfNewParams
- type EnderecoTemplateUfNewParamsParams
- type EnderecoTemplateUfService
- type Error
- type Estados
- type EstadosItem
- type EstadosItemRegion
- type GeoDistanceDistanceFromCepToCepService
- type GeoDistanceDistanceFromCepToLatlonService
- type GeoDistanceDistanceFromLatlonToLatlonService
- type GeoDistanceService
- type GeolocationCep
- type GeolocationCepLocation
- type GeolocationDistanceFromCepService
- type GeolocationDistanceFromCepToCepService
- type GeolocationDistanceFromCepToLatlonService
- type GeolocationDistanceFromLatlonService
- type GeolocationDistanceFromLatlonToLatlonService
- type GeolocationDistanceService
- type GeolocationService
- type Ibge
- type LocalidadeCidadeBairroService
- type LocalidadeCidadeIbgeService
- type LocalidadeCidadeService
- type LocalidadeCodigoMunicipioService
- type LocalidadeCodigoService
- type LocalidadeEstadoCidadeBairroService
- type LocalidadeEstadoCidadeIbgeService
- type LocalidadeEstadoCidadeService
- type LocalidadeEstadoService
- type LocalidadeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type Bairros ¶
type Bairros struct { // Lista com todos os bairros Bairros []string `json:"bairros"` // Nome da Cidade Cidade string `json:"cidade"` // reservado para o futuro Extras []interface{} `json:"extras"` // é a chave unica da localidade resultada da junçao dos campos "uf|cidade" da base // de Cep usando "shake_128" com Output Lenght setado em 5 bytes em hexadecimal. // "python3.8" "import hashlib; // print(hashlib.shake_128(b'SP|Bebedouro').hexdigest(5))" HashKey string `json:"hash_key"` // todos os nomes dos bairros Uf string `json:"uf"` // campo cidade normalizado com lower case e replace dos espaços por "-" para ser // usado como parte da url URLKey string `json:"url_key"` // timestamp com ultima atualizacao do dado Version int64 `json:"version"` JSON bairrosJSON `json:"-"` }
func (*Bairros) UnmarshalJSON ¶
type Cep ¶
type Cep struct { // Neighborhood Bairro string `json:"bairro"` // cep Cep string `json:"cep"` // City Cidade string `json:"cidade"` // IBGE Code CodigoIbge string `json:"codigo_ibge"` // Address complement only for directions Complemento string `json:"complemento"` // Address Logradouro string `json:"logradouro"` // Este campo só trará conteudo quando o campo "tipo" é igual a "cep_cod_especial e // cep_caixa_postal_comunitaria". Geralmente opcional para os formularios. Nome string `json:"nome"` // Status of CEP São denominados "completo" todos os ceps que não precisam de // interação manual do usuario para completar o endereço. Ver mais em "tipo". São // denominados "incompleto" todos os ceps que precisam ser completados pelo // usuario, pois esse tipo de cep geralmente não devolve os campos "logradouro/rua" // e "bairro". ver mais em "tipo". Status CepStatus `json:"status"` // cep_logradouro é um cep completo, com todos os campos do endereço fornecidas. // cep_localidade "14740-000" é um cep incompleto e regularmente conhecido como // "CEP ÚNICO", pois este cep engloba todo o municipio, pois a cidade ainda nao tem // populacao sufieciente para ter o cep catalogado por logradouro. // cep_agencia_correios "61603-970" é cep das agencias dos correios pelo Brasil. // cep_cod_especial "60150-901" é o cep grande usuario, e são os ceps destinados a // grandes empresas, universidades e outras denominacões que tenham um alto volume // de correspondencia, funcionando como uma mini-cidade, neste tipo de cep, o campo // "nome" trará a denominacao da instituição. cep_caixa_postal_comunitaria // "12918-991" é um cep incompleto e geralmente usado apenas para // "correspondencia", e regularmente "não é habilitado para entrega de encomendas" // por diversas transportadoras. Tipo CepTipo `json:"tipo"` // State Uf string `json:"uf"` JSON cepJSON `json:"-"` }
func (*Cep) UnmarshalJSON ¶
type CepRemovidoService ¶
type CepRemovidoService struct {
Options []option.RequestOption
}
CepRemovidoService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCepRemovidoService method instead.
func NewCepRemovidoService ¶
func NewCepRemovidoService(opts ...option.RequestOption) (r *CepRemovidoService)
NewCepRemovidoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CepRemovidoService) Get ¶
func (r *CepRemovidoService) Get(ctx context.Context, cepRemovido string, opts ...option.RequestOption) (res *Cep, err error)
Returns a map with address. Lista de ceps removidos. [11680000, 35570000, 62500000, 95180000, 13480637, 90040440, 77020902]
type CepService ¶
type CepService struct { Options []option.RequestOption Removido *CepRemovidoService }
CepService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCepService method instead.
func NewCepService ¶
func NewCepService(opts ...option.RequestOption) (r *CepService)
NewCepService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CepService) Get ¶
func (r *CepService) Get(ctx context.Context, cep string, opts ...option.RequestOption) (res *Cep, err error)
Returns a map with address. Lista de ceps para validar todos os campos de retorno. [01234000, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type CepStatus ¶
type CepStatus string
Status of CEP São denominados "completo" todos os ceps que não precisam de interação manual do usuario para completar o endereço. Ver mais em "tipo". São denominados "incompleto" todos os ceps que precisam ser completados pelo usuario, pois esse tipo de cep geralmente não devolve os campos "logradouro/rua" e "bairro". ver mais em "tipo".
type CepTipo ¶
type CepTipo string
cep_logradouro é um cep completo, com todos os campos do endereço fornecidas. cep_localidade "14740-000" é um cep incompleto e regularmente conhecido como "CEP ÚNICO", pois este cep engloba todo o municipio, pois a cidade ainda nao tem populacao sufieciente para ter o cep catalogado por logradouro. cep_agencia_correios "61603-970" é cep das agencias dos correios pelo Brasil. cep_cod_especial "60150-901" é o cep grande usuario, e são os ceps destinados a grandes empresas, universidades e outras denominacões que tenham um alto volume de correspondencia, funcionando como uma mini-cidade, neste tipo de cep, o campo "nome" trará a denominacao da instituição. cep_caixa_postal_comunitaria "12918-991" é um cep incompleto e geralmente usado apenas para "correspondencia", e regularmente "não é habilitado para entrega de encomendas" por diversas transportadoras.
type Cidades ¶
type Cidades []CidadesItem
type CidadesItem ¶
type CidadesItem struct { HashKey string `json:"hash_key"` Nome string `json:"nome"` URLKey string `json:"url_key"` JSON cidadesItemJSON `json:"-"` }
func (*CidadesItem) UnmarshalJSON ¶
func (r *CidadesItem) UnmarshalJSON(data []byte) (err error)
type Client ¶
type Client struct { Options []option.RequestOption Ceps *CepService Enderecos *EnderecoService Geolocations *GeolocationService GeoDistances *GeoDistanceService Localidades *LocalidadeService }
Client creates a struct with services and top level methods that help with interacting with the findcep API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned [url.Values] will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type Endereco ¶
type Endereco struct { Hits EnderecoHits `json:"hits"` JSON enderecoJSON `json:"-"` }
func (*Endereco) UnmarshalJSON ¶
type EnderecoHits ¶
type EnderecoHits struct { Hits []EnderecoHitsHit `json:"hits"` Total int64 `json:"total"` JSON enderecoHitsJSON `json:"-"` }
func (*EnderecoHits) UnmarshalJSON ¶
func (r *EnderecoHits) UnmarshalJSON(data []byte) (err error)
type EnderecoHitsHit ¶
type EnderecoHitsHit struct { Source interface{} `json:"_source"` JSON enderecoHitsHitJSON `json:"-"` }
func (*EnderecoHitsHit) UnmarshalJSON ¶
func (r *EnderecoHitsHit) UnmarshalJSON(data []byte) (err error)
type EnderecoPesquisaParams ¶
type EnderecoPesquisaParams struct { // modelo do template de busca ID param.Field[string] `json:"id"` Params param.Field[EnderecoPesquisaParamsParams] `json:"params"` }
func (EnderecoPesquisaParams) MarshalJSON ¶
func (r EnderecoPesquisaParams) MarshalJSON() (data []byte, err error)
type EnderecoPesquisaParamsParams ¶
type EnderecoPesquisaParamsParams struct { // paginação dos resultados From param.Field[int64] `json:"from"` // termo para busca QueryString param.Field[string] `json:"query_string"` // quantidade de registros a serem exibidos Size param.Field[int64] `json:"size"` }
func (EnderecoPesquisaParamsParams) MarshalJSON ¶
func (r EnderecoPesquisaParamsParams) MarshalJSON() (data []byte, err error)
type EnderecoService ¶
type EnderecoService struct { Options []option.RequestOption Templates *EnderecoTemplateService }
EnderecoService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnderecoService method instead.
func NewEnderecoService ¶
func NewEnderecoService(opts ...option.RequestOption) (r *EnderecoService)
NewEnderecoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnderecoService) Pesquisa ¶
func (r *EnderecoService) Pesquisa(ctx context.Context, body EnderecoPesquisaParams, opts ...option.RequestOption) (res *Endereco, err error)
Essa método aceita acentuação na busca e usa um modelo de aproximação das palavras para contornar erros de ortograficos de nomes e sobrenomes dos endereços.
type EnderecoTemplateCodigoIbgeNewParams ¶
type EnderecoTemplateCodigoIbgeNewParams struct { // modelo do template de busca ID param.Field[string] `json:"id"` Params param.Field[EnderecoTemplateCodigoIbgeNewParamsParams] `json:"params"` }
func (EnderecoTemplateCodigoIbgeNewParams) MarshalJSON ¶
func (r EnderecoTemplateCodigoIbgeNewParams) MarshalJSON() (data []byte, err error)
type EnderecoTemplateCodigoIbgeNewParamsParams ¶
type EnderecoTemplateCodigoIbgeNewParamsParams struct { // filtro para busca CodigoIbge param.Field[string] `json:"codigo_ibge"` // paginação dos resultados From param.Field[int64] `json:"from"` // termo para busca no campo logradouro QueryString param.Field[string] `json:"query_string"` // quantidade de registros a serem exibidos Size param.Field[int64] `json:"size"` }
func (EnderecoTemplateCodigoIbgeNewParamsParams) MarshalJSON ¶
func (r EnderecoTemplateCodigoIbgeNewParamsParams) MarshalJSON() (data []byte, err error)
type EnderecoTemplateCodigoIbgeService ¶
type EnderecoTemplateCodigoIbgeService struct {
Options []option.RequestOption
}
EnderecoTemplateCodigoIbgeService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnderecoTemplateCodigoIbgeService method instead.
func NewEnderecoTemplateCodigoIbgeService ¶
func NewEnderecoTemplateCodigoIbgeService(opts ...option.RequestOption) (r *EnderecoTemplateCodigoIbgeService)
NewEnderecoTemplateCodigoIbgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnderecoTemplateCodigoIbgeService) New ¶
func (r *EnderecoTemplateCodigoIbgeService) New(ctx context.Context, body EnderecoTemplateCodigoIbgeNewParams, opts ...option.RequestOption) (res *Endereco, err error)
Essa método aceita acentuação na busca e usa um modelo de aproximação das palavras para contornar erros de ortograficos de nomes e sobrenomes dos endereços.
type EnderecoTemplateService ¶
type EnderecoTemplateService struct { Options []option.RequestOption CodigoIbge *EnderecoTemplateCodigoIbgeService Uf *EnderecoTemplateUfService }
EnderecoTemplateService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnderecoTemplateService method instead.
func NewEnderecoTemplateService ¶
func NewEnderecoTemplateService(opts ...option.RequestOption) (r *EnderecoTemplateService)
NewEnderecoTemplateService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type EnderecoTemplateUfCidadeNewParams ¶
type EnderecoTemplateUfCidadeNewParams struct { // modelo do template de busca ID param.Field[string] `json:"id"` Params param.Field[EnderecoTemplateUfCidadeNewParamsParams] `json:"params"` }
func (EnderecoTemplateUfCidadeNewParams) MarshalJSON ¶
func (r EnderecoTemplateUfCidadeNewParams) MarshalJSON() (data []byte, err error)
type EnderecoTemplateUfCidadeNewParamsParams ¶
type EnderecoTemplateUfCidadeNewParamsParams struct { // filtro para busca Cidade param.Field[string] `json:"cidade"` // paginação dos resultados From param.Field[int64] `json:"from"` // termo para busca no campo logradouro QueryString param.Field[string] `json:"query_string"` // quantidade de registros a serem exibidos Size param.Field[int64] `json:"size"` // filtro para busca Uf param.Field[string] `json:"uf"` }
func (EnderecoTemplateUfCidadeNewParamsParams) MarshalJSON ¶
func (r EnderecoTemplateUfCidadeNewParamsParams) MarshalJSON() (data []byte, err error)
type EnderecoTemplateUfCidadeService ¶
type EnderecoTemplateUfCidadeService struct {
Options []option.RequestOption
}
EnderecoTemplateUfCidadeService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnderecoTemplateUfCidadeService method instead.
func NewEnderecoTemplateUfCidadeService ¶
func NewEnderecoTemplateUfCidadeService(opts ...option.RequestOption) (r *EnderecoTemplateUfCidadeService)
NewEnderecoTemplateUfCidadeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnderecoTemplateUfCidadeService) New ¶
func (r *EnderecoTemplateUfCidadeService) New(ctx context.Context, body EnderecoTemplateUfCidadeNewParams, opts ...option.RequestOption) (res *Endereco, err error)
Essa método aceita acentuação na busca e usa um modelo de aproximação das palavras para contornar erros de ortograficos de nomes e sobrenomes dos endereços.
type EnderecoTemplateUfNewParams ¶
type EnderecoTemplateUfNewParams struct { // modelo do template de busca ID param.Field[string] `json:"id"` Params param.Field[EnderecoTemplateUfNewParamsParams] `json:"params"` }
func (EnderecoTemplateUfNewParams) MarshalJSON ¶
func (r EnderecoTemplateUfNewParams) MarshalJSON() (data []byte, err error)
type EnderecoTemplateUfNewParamsParams ¶
type EnderecoTemplateUfNewParamsParams struct { // paginação dos resultados From param.Field[int64] `json:"from"` // termo para busca no campo logradouro QueryString param.Field[string] `json:"query_string"` // quantidade de registros a serem exibidos Size param.Field[int64] `json:"size"` // filtro para busca Uf param.Field[string] `json:"uf"` }
func (EnderecoTemplateUfNewParamsParams) MarshalJSON ¶
func (r EnderecoTemplateUfNewParamsParams) MarshalJSON() (data []byte, err error)
type EnderecoTemplateUfService ¶
type EnderecoTemplateUfService struct { Options []option.RequestOption Cidade *EnderecoTemplateUfCidadeService }
EnderecoTemplateUfService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnderecoTemplateUfService method instead.
func NewEnderecoTemplateUfService ¶
func NewEnderecoTemplateUfService(opts ...option.RequestOption) (r *EnderecoTemplateUfService)
NewEnderecoTemplateUfService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EnderecoTemplateUfService) New ¶
func (r *EnderecoTemplateUfService) New(ctx context.Context, body EnderecoTemplateUfNewParams, opts ...option.RequestOption) (res *Endereco, err error)
Essa método aceita acentuação na busca e usa um modelo de aproximação das palavras para contornar erros de ortograficos de nomes e sobrenomes dos endereços.
type Estados ¶
type Estados []EstadosItem
type EstadosItem ¶
type EstadosItem struct { Nome string `json:"nome"` Region EstadosItemRegion `json:"region"` Sigla string `json:"sigla"` JSON estadosItemJSON `json:"-"` }
func (*EstadosItem) UnmarshalJSON ¶
func (r *EstadosItem) UnmarshalJSON(data []byte) (err error)
type EstadosItemRegion ¶
type EstadosItemRegion struct { Nome string `json:"nome"` Sigla string `json:"sigla"` JSON estadosItemRegionJSON `json:"-"` }
func (*EstadosItemRegion) UnmarshalJSON ¶
func (r *EstadosItemRegion) UnmarshalJSON(data []byte) (err error)
type GeoDistanceDistanceFromCepToCepService ¶
type GeoDistanceDistanceFromCepToCepService struct {
Options []option.RequestOption
}
GeoDistanceDistanceFromCepToCepService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeoDistanceDistanceFromCepToCepService method instead.
func NewGeoDistanceDistanceFromCepToCepService ¶
func NewGeoDistanceDistanceFromCepToCepService(opts ...option.RequestOption) (r *GeoDistanceDistanceFromCepToCepService)
NewGeoDistanceDistanceFromCepToCepService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeoDistanceDistanceFromCepToCepService) List ¶
func (r *GeoDistanceDistanceFromCepToCepService) List(ctx context.Context, cepFrom string, cepTo string, approximate float64, opts ...option.RequestOption) (res *GeolocationCep, err error)
Returns a distance between two cep. Lista de ceps para validar todos os campos de retorno. [01234000, 99945970, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type GeoDistanceDistanceFromCepToLatlonService ¶
type GeoDistanceDistanceFromCepToLatlonService struct {
Options []option.RequestOption
}
GeoDistanceDistanceFromCepToLatlonService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeoDistanceDistanceFromCepToLatlonService method instead.
func NewGeoDistanceDistanceFromCepToLatlonService ¶
func NewGeoDistanceDistanceFromCepToLatlonService(opts ...option.RequestOption) (r *GeoDistanceDistanceFromCepToLatlonService)
NewGeoDistanceDistanceFromCepToLatlonService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeoDistanceDistanceFromCepToLatlonService) List ¶
func (r *GeoDistanceDistanceFromCepToLatlonService) List(ctx context.Context, cepFrom string, latlonTo string, approximate float64, opts ...option.RequestOption) (res *GeolocationCep, err error)
Returns a distance between two cep. Lista de ceps para validar todos os campos de retorno. [01234000, 99945970, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type GeoDistanceDistanceFromLatlonToLatlonService ¶
type GeoDistanceDistanceFromLatlonToLatlonService struct {
Options []option.RequestOption
}
GeoDistanceDistanceFromLatlonToLatlonService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeoDistanceDistanceFromLatlonToLatlonService method instead.
func NewGeoDistanceDistanceFromLatlonToLatlonService ¶
func NewGeoDistanceDistanceFromLatlonToLatlonService(opts ...option.RequestOption) (r *GeoDistanceDistanceFromLatlonToLatlonService)
NewGeoDistanceDistanceFromLatlonToLatlonService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeoDistanceDistanceFromLatlonToLatlonService) List ¶
func (r *GeoDistanceDistanceFromLatlonToLatlonService) List(ctx context.Context, latlonFrom string, latlonTo string, approximate float64, opts ...option.RequestOption) (res *GeolocationCep, err error)
Returns a distance between two cep. Lista de ceps para validar todos os campos de retorno. [01234000, 99945970, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type GeoDistanceService ¶
type GeoDistanceService struct { Options []option.RequestOption DistanceFromCepToCep *GeoDistanceDistanceFromCepToCepService DistanceFromCepToLatlon *GeoDistanceDistanceFromCepToLatlonService DistanceFromLatlonToLatlon *GeoDistanceDistanceFromLatlonToLatlonService }
GeoDistanceService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeoDistanceService method instead.
func NewGeoDistanceService ¶
func NewGeoDistanceService(opts ...option.RequestOption) (r *GeoDistanceService)
NewGeoDistanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type GeolocationCep ¶
type GeolocationCep struct { // geo location Location GeolocationCepLocation `json:"location"` // cep PostalCode string `json:"postal_code"` // true quando existir geo coodenadas disponiveis para o cep Status bool `json:"status"` JSON geolocationCepJSON `json:"-"` }
func (*GeolocationCep) UnmarshalJSON ¶
func (r *GeolocationCep) UnmarshalJSON(data []byte) (err error)
type GeolocationCepLocation ¶
type GeolocationCepLocation struct { Lat float64 `json:"lat"` Lon float64 `json:"lon"` JSON geolocationCepLocationJSON `json:"-"` }
geo location
func (*GeolocationCepLocation) UnmarshalJSON ¶
func (r *GeolocationCepLocation) UnmarshalJSON(data []byte) (err error)
type GeolocationDistanceFromCepService ¶
type GeolocationDistanceFromCepService struct { Options []option.RequestOption ToCep *GeolocationDistanceFromCepToCepService ToLatlon *GeolocationDistanceFromCepToLatlonService }
GeolocationDistanceFromCepService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeolocationDistanceFromCepService method instead.
func NewGeolocationDistanceFromCepService ¶
func NewGeolocationDistanceFromCepService(opts ...option.RequestOption) (r *GeolocationDistanceFromCepService)
NewGeolocationDistanceFromCepService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type GeolocationDistanceFromCepToCepService ¶
type GeolocationDistanceFromCepToCepService struct {
Options []option.RequestOption
}
GeolocationDistanceFromCepToCepService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeolocationDistanceFromCepToCepService method instead.
func NewGeolocationDistanceFromCepToCepService ¶
func NewGeolocationDistanceFromCepToCepService(opts ...option.RequestOption) (r *GeolocationDistanceFromCepToCepService)
NewGeolocationDistanceFromCepToCepService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeolocationDistanceFromCepToCepService) List ¶
func (r *GeolocationDistanceFromCepToCepService) List(ctx context.Context, cepFrom string, cepTo string, opts ...option.RequestOption) (res *GeolocationCep, err error)
Returns a distance between two cep. Lista de ceps para validar todos os campos de retorno. [01234000, 99945970, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type GeolocationDistanceFromCepToLatlonService ¶
type GeolocationDistanceFromCepToLatlonService struct {
Options []option.RequestOption
}
GeolocationDistanceFromCepToLatlonService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeolocationDistanceFromCepToLatlonService method instead.
func NewGeolocationDistanceFromCepToLatlonService ¶
func NewGeolocationDistanceFromCepToLatlonService(opts ...option.RequestOption) (r *GeolocationDistanceFromCepToLatlonService)
NewGeolocationDistanceFromCepToLatlonService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeolocationDistanceFromCepToLatlonService) List ¶
func (r *GeolocationDistanceFromCepToLatlonService) List(ctx context.Context, cepFrom string, latlonTo string, opts ...option.RequestOption) (res *GeolocationCep, err error)
Returns a distance between two cep. Lista de ceps para validar todos os campos de retorno. [01234000, 99945970, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type GeolocationDistanceFromLatlonService ¶
type GeolocationDistanceFromLatlonService struct { Options []option.RequestOption ToLatlon *GeolocationDistanceFromLatlonToLatlonService }
GeolocationDistanceFromLatlonService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeolocationDistanceFromLatlonService method instead.
func NewGeolocationDistanceFromLatlonService ¶
func NewGeolocationDistanceFromLatlonService(opts ...option.RequestOption) (r *GeolocationDistanceFromLatlonService)
NewGeolocationDistanceFromLatlonService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type GeolocationDistanceFromLatlonToLatlonService ¶
type GeolocationDistanceFromLatlonToLatlonService struct {
Options []option.RequestOption
}
GeolocationDistanceFromLatlonToLatlonService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeolocationDistanceFromLatlonToLatlonService method instead.
func NewGeolocationDistanceFromLatlonToLatlonService ¶
func NewGeolocationDistanceFromLatlonToLatlonService(opts ...option.RequestOption) (r *GeolocationDistanceFromLatlonToLatlonService)
NewGeolocationDistanceFromLatlonToLatlonService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeolocationDistanceFromLatlonToLatlonService) List ¶
func (r *GeolocationDistanceFromLatlonToLatlonService) List(ctx context.Context, latlonFrom string, latlonTo string, opts ...option.RequestOption) (res *GeolocationCep, err error)
Returns a distance between two cep. Lista de ceps para validar todos os campos de retorno. [01234000, 99945970, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type GeolocationDistanceService ¶
type GeolocationDistanceService struct { Options []option.RequestOption FromCep *GeolocationDistanceFromCepService FromLatlon *GeolocationDistanceFromLatlonService }
GeolocationDistanceService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeolocationDistanceService method instead.
func NewGeolocationDistanceService ¶
func NewGeolocationDistanceService(opts ...option.RequestOption) (r *GeolocationDistanceService)
NewGeolocationDistanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type GeolocationService ¶
type GeolocationService struct { Options []option.RequestOption Distances *GeolocationDistanceService }
GeolocationService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeolocationService method instead.
func NewGeolocationService ¶
func NewGeolocationService(opts ...option.RequestOption) (r *GeolocationService)
NewGeolocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeolocationService) Get ¶
func (r *GeolocationService) Get(ctx context.Context, cep string, opts ...option.RequestOption) (res *GeolocationCep, err error)
Returns a map with geo coordinates. Lista de ceps para validar todos os campos de retorno. [01234000, 99945970, 01010000, 14740000, 61603970, 60150901, 12918991, 99999999]
type Ibge ¶
type Ibge struct { // Nome da Cidade Cidade string `json:"cidade"` // Texto com codigo ibge CodigoIbge string `json:"codigo_ibge"` // reservado para o futuro Extras []interface{} `json:"extras"` // é a chave unica da localidade resultada da junçao dos campos "uf|cidade" da base // de Cep usando "shake_128" com Output Lenght setado em 5 bytes em hexadecimal. // python3 -c "import hashlib; // print(hashlib.shake_128(b'SP|Bebedouro').hexdigest(5))" HashKey string `json:"hash_key"` // todos os nomes dos bairros Uf string `json:"uf"` // campo cidade normalizado com lower case e replace dos espaços por "-" para ser // usado como parte da url URLKey string `json:"url_key"` JSON ibgeJSON `json:"-"` }
func (*Ibge) UnmarshalJSON ¶
type LocalidadeCidadeBairroService ¶
type LocalidadeCidadeBairroService struct {
Options []option.RequestOption
}
LocalidadeCidadeBairroService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeCidadeBairroService method instead.
func NewLocalidadeCidadeBairroService ¶
func NewLocalidadeCidadeBairroService(opts ...option.RequestOption) (r *LocalidadeCidadeBairroService)
NewLocalidadeCidadeBairroService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LocalidadeCidadeBairroService) List ¶
func (r *LocalidadeCidadeBairroService) List(ctx context.Context, cidadeHash string, opts ...option.RequestOption) (res *Bairros, err error)
Returns a map of bairros
type LocalidadeCidadeIbgeService ¶
type LocalidadeCidadeIbgeService struct {
Options []option.RequestOption
}
LocalidadeCidadeIbgeService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeCidadeIbgeService method instead.
func NewLocalidadeCidadeIbgeService ¶
func NewLocalidadeCidadeIbgeService(opts ...option.RequestOption) (r *LocalidadeCidadeIbgeService)
NewLocalidadeCidadeIbgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LocalidadeCidadeIbgeService) Get ¶
func (r *LocalidadeCidadeIbgeService) Get(ctx context.Context, cidadeHash string, opts ...option.RequestOption) (res *Ibge, err error)
Returns a IBGE code id
type LocalidadeCidadeService ¶
type LocalidadeCidadeService struct { Options []option.RequestOption Bairros *LocalidadeCidadeBairroService Ibge *LocalidadeCidadeIbgeService }
LocalidadeCidadeService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeCidadeService method instead.
func NewLocalidadeCidadeService ¶
func NewLocalidadeCidadeService(opts ...option.RequestOption) (r *LocalidadeCidadeService)
NewLocalidadeCidadeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LocalidadeCodigoMunicipioService ¶
type LocalidadeCodigoMunicipioService struct {
Options []option.RequestOption
}
LocalidadeCodigoMunicipioService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeCodigoMunicipioService method instead.
func NewLocalidadeCodigoMunicipioService ¶
func NewLocalidadeCodigoMunicipioService(opts ...option.RequestOption) (r *LocalidadeCodigoMunicipioService)
NewLocalidadeCodigoMunicipioService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LocalidadeCodigoMunicipioService) Get ¶
func (r *LocalidadeCodigoMunicipioService) Get(ctx context.Context, codigoIbge string, opts ...option.RequestOption) (res *Ibge, err error)
Returns a IBGE code id
type LocalidadeCodigoService ¶
type LocalidadeCodigoService struct { Options []option.RequestOption Municipio *LocalidadeCodigoMunicipioService }
LocalidadeCodigoService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeCodigoService method instead.
func NewLocalidadeCodigoService ¶
func NewLocalidadeCodigoService(opts ...option.RequestOption) (r *LocalidadeCodigoService)
NewLocalidadeCodigoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LocalidadeEstadoCidadeBairroService ¶
type LocalidadeEstadoCidadeBairroService struct {
Options []option.RequestOption
}
LocalidadeEstadoCidadeBairroService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeEstadoCidadeBairroService method instead.
func NewLocalidadeEstadoCidadeBairroService ¶
func NewLocalidadeEstadoCidadeBairroService(opts ...option.RequestOption) (r *LocalidadeEstadoCidadeBairroService)
NewLocalidadeEstadoCidadeBairroService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LocalidadeEstadoCidadeIbgeService ¶
type LocalidadeEstadoCidadeIbgeService struct {
Options []option.RequestOption
}
LocalidadeEstadoCidadeIbgeService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeEstadoCidadeIbgeService method instead.
func NewLocalidadeEstadoCidadeIbgeService ¶
func NewLocalidadeEstadoCidadeIbgeService(opts ...option.RequestOption) (r *LocalidadeEstadoCidadeIbgeService)
NewLocalidadeEstadoCidadeIbgeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LocalidadeEstadoCidadeService ¶
type LocalidadeEstadoCidadeService struct { Options []option.RequestOption Bairros *LocalidadeEstadoCidadeBairroService Ibge *LocalidadeEstadoCidadeIbgeService }
LocalidadeEstadoCidadeService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeEstadoCidadeService method instead.
func NewLocalidadeEstadoCidadeService ¶
func NewLocalidadeEstadoCidadeService(opts ...option.RequestOption) (r *LocalidadeEstadoCidadeService)
NewLocalidadeEstadoCidadeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LocalidadeEstadoService ¶
type LocalidadeEstadoService struct { Options []option.RequestOption Cidades *LocalidadeEstadoCidadeService Cidade *LocalidadeEstadoCidadeService }
LocalidadeEstadoService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeEstadoService method instead.
func NewLocalidadeEstadoService ¶
func NewLocalidadeEstadoService(opts ...option.RequestOption) (r *LocalidadeEstadoService)
NewLocalidadeEstadoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LocalidadeService ¶
type LocalidadeService struct { Options []option.RequestOption Estados *LocalidadeEstadoService Estado *LocalidadeEstadoService Cidade *LocalidadeCidadeService Codigo *LocalidadeCodigoService }
LocalidadeService contains methods and other services that help with interacting with the findcep API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLocalidadeService method instead.
func NewLocalidadeService ¶
func NewLocalidadeService(opts ...option.RequestOption) (r *LocalidadeService)
NewLocalidadeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
Source Files
¶
- aliases.go
- cep.go
- cepremovido.go
- client.go
- endereco.go
- enderecotemplate.go
- enderecotemplatecodigoibge.go
- enderecotemplateuf.go
- enderecotemplateufcidade.go
- field.go
- geodistance.go
- geodistancedistancefromceptocep.go
- geodistancedistancefromceptolatlon.go
- geodistancedistancefromlatlontolatlon.go
- geolocation.go
- geolocationdistance.go
- geolocationdistancefromcep.go
- geolocationdistancefromceptocep.go
- geolocationdistancefromceptolatlon.go
- geolocationdistancefromlatlon.go
- geolocationdistancefromlatlontolatlon.go
- localidade.go
- localidadecidade.go
- localidadecidadebairro.go
- localidadecidadeibge.go
- localidadecodigo.go
- localidadecodigomunicipio.go
- localidadeestado.go
- localidadeestado1.go
- localidadeestadocidade.go
- localidadeestadocidade1.go
- localidadeestadocidadebairro.go
- localidadeestadocidadeibge.go