dadata

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoFreeTokens = errors.New("no tokens which not exceeded daily limit")

Functions

This section is empty.

Types

type AddressData

type AddressData struct {
	CityFiasID         string  `json:"city_fias_id"`
	CityKladrID        string  `json:"city_kladr_id"`
	CityType           string  `json:"city_type"`
	CityTypeFull       string  `json:"city_type_full"`
	City               string  `json:"city"`
	SettlementFiasID   string  `json:"settlement_fias_id"`
	SettlementKladrID  string  `json:"settlement_kladr_id"`
	SettlementType     string  `json:"settlement_type"`
	SettlementTypeFull string  `json:"settlement_type_full"`
	Settlement         string  `json:"settlement"`
	Metro              []metro `json:"metro"`
}

type Client

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

func NewClient

func NewClient(tokens []string, db *mongo.Database) Client

func (Client) GetByINN

func (c Client) GetByINN(ctx context.Context, inn string) (res []Suggestion, err error)

type Suggestion

type Suggestion struct {
	Value string `json:"value"`
	Data  data   `json:"data"`
}

Jump to

Keyboard shortcuts

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