ares

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: MIT Imports: 6 Imported by: 0

README

ARES

Golang ARES client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	State            string `xml:"Nazev_statu"`         // NS - NazevStatu, Required
	City             string `xml:"Nazev_obce"`          // N - Nazev obce
	CityDistrict     string `xml:"Nazev_mestske_casti"` // NMC - Nazev mestské casti
	MunicipalityPart string `xml:"Nazev_casti_obce"`    // NCO - Nazev casti obce
	Street           string `xml:"Nazev_ulice"`         // NU - NazevUlice
	PostCode         string `xml:"PSC"`
	HouseNumber      string `xml:"Cislo_domovni"`         // CD - Cislo domovni
	StreetNumber     string `xml:"Cislo_orientacni"`      // CO - Cislo orientacni
	RUAIN            int    `xml:"Adresa_UIR>Kod_adresy"` // Adresa_UIR > Kod_adresy
}

Address by RUAIN

func (*Address) GetAddressLine

func (a *Address) GetAddressLine() string

GetAddressLine returns address line

func (*Address) GetAddressRows

func (a *Address) GetAddressRows() []string

GetAddressRows returns address formated in rows

type Error

type Error struct {
	XMLName xml.Name `xml:"Error"`
	Code    int      `xml:"Error_kod"`
	Message string   `xml:"Error_text"`
}

Error holds chybova_odpoved > E model

type ResponseBasic

type ResponseBasic struct {
	XMLName      xml.Name `xml:"Vypis_basic"`
	ICO          string   `xml:"ICO"` // ICO - Required
	DIC          string   `xml:"DIC"`
	BusinessName string   `xml:"Obchodni_firma"` // OF - ObchodniFirma, Required
	Address      Address  `xml:"Adresa_ARES"`    // AA - AdresaARES
}

ResponseBasic holds Odpoved > Vypis_basic model

type ResponseES

type ResponseES struct {
	XMLName      xml.Name `xml:"S"`
	ICO          string   `xml:"ico"` // ICO - Required
	BusinessName string   `xml:"ojm"` // Obchodní jméno
	Address      string   `xml:"jmn"` // Adresní řádek
}

ResponseStandard holds Ares_odpovedi > Odpoved > Zaznam

type ResponseStandard

type ResponseStandard struct {
	XMLName      xml.Name `xml:"Zaznam"`
	ICO          string   `xml:"ICO"`                      // ICO - Required
	BusinessName string   `xml:"Obchodni_firma"`           // OF - ObchodniFirma, Required
	Address      Address  `xml:"Identifikace>Adresa_ARES"` // AA - AdresaARES
}

ResponseStandard holds Ares_odpovedi > Odpoved > Zaznam

type ResponsesBasic

type ResponsesBasic struct {
	XMLName   xml.Name        `xml:"Ares_odpovedi"`
	Responses []ResponseBasic `xml:"Odpoved>Vypis_basic"`
	Errors    []Error         `xml:"Odpoved>Error"`
}

ResponsesBasic holds are:Ares_odpovedi model

func BasicQuery

func BasicQuery(ICO string) (responses ResponsesBasic, errCode int, err error)

BasicQuery sends a new query to ARES

type ResponsesES

type ResponsesES struct {
	XMLName   xml.Name     `xml:"Ares_odpovedi"`
	Responses []ResponseES `xml:"Odpoved>V>S"`
}

ResponsesES holds are:Ares_odpovedi model

func ESQuery

func ESQuery(name string) (responses ResponsesES, errCode int, err error)

type ResponsesStandard

type ResponsesStandard struct {
	XMLName   xml.Name           `xml:"Ares_odpovedi"`
	Responses []ResponseStandard `xml:"Odpoved>Zaznam"`
	Errors    []Error            `xml:"Odpoved>Error"`
}

ResponsesStandard holds are:Ares_odpovedi model

func StandardQuery

func StandardQuery(name string) (responses ResponsesStandard, errCode int, err error)

StandardQuery allows to serach for business by its business name

Jump to

Keyboard shortcuts

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