Documentation
¶
Overview ¶
Package eansearch is a Go module for EAN, GTIN and ISBN name lookup and validation
Index ¶
- Constants
- func BarcodeImage(ean string) ([]byte, error)
- func IssuingCountryLookup(ean string) (string, error)
- func SetToken(t string) error
- func VerifyChecksum(ean string) (bool, error)
- type Checksum
- type ChecksumOrError
- type Image
- type ImageOrError
- type Product
- func BarcodeLookup(ean string, lang uint) ([]Product, error)
- func BarcodePrefixSearch(prefix string, page uint, lang uint) ([]Product, bool, error)
- func CategorySearch(category uint, name string, page uint, lang uint) ([]Product, bool, error)
- func ISBNLookup(isbn string) ([]Product, error)
- func ProductSearch(name string, page uint, lang uint) ([]Product, bool, error)
- func SimilarProductSearch(name string, page uint, lang uint) ([]Product, bool, error)
- type ProductOrError
Constants ¶
View Source
const AnyLanguage uint = 99
View Source
const Danish uint = 2
View Source
const Dutch uint = 10
View Source
const English uint = 1
View Source
const Finish uint = 5
View Source
const French uint = 6
View Source
const German uint = 3
View Source
const Italian uint = 8
View Source
const MaxApiTries uint = 3
View Source
const Norwegian uint = 11
View Source
const Polish uint = 12
View Source
const Portuguese uint = 13
View Source
const Spanish uint = 4
View Source
const Swedish uint = 15
Variables ¶
This section is empty.
Functions ¶
func BarcodeImage ¶ added in v1.3.0
func IssuingCountryLookup ¶ added in v1.3.0
func SetToken ¶
SetToken initialises the API with the token, you can apply for at https://www.ean-search.org/ean-database-api.html
func VerifyChecksum ¶ added in v1.3.0
Types ¶
type ChecksumOrError ¶ added in v1.3.0
type ImageOrError ¶ added in v1.3.0
type Product ¶
type Product struct {
Ean string
Name string
CategoryID uint `json:",string"`
CategoryName string
IssuingCountry string
}
Product holds datasets returned by the API
func BarcodeLookup ¶
BarcodeLookup searches for a single EAN code
func BarcodePrefixSearch ¶
BarcodePrefixSearch find all EANs strating with a certain prefix
func CategorySearch ¶ added in v1.3.0
CategorySearch searches for products by category and name
func ISBNLookup ¶ added in v1.3.0
ISBNLookup searches for a single ISBN-10 or ISBN-13 code
func ProductSearch ¶
ProductSearch searches for products by name (exact)
type ProductOrError ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.