json

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressLine

type AddressLine struct {
	PlaceID   interface{} `json:"place_id"`
	IsAddress bool        `json:"isaddress"`
}

type CountryInfo

type CountryInfo struct {
	CountryCode string            `json:"country_code"`
	Name        map[string]string `json:"name"`
}

type DumpEntry

type DumpEntry struct {
	Type    string          `json:"type"`
	Content json.RawMessage `json:"content"`
}
type Header struct {
	Version         string `json:"version"`
	DataTimestamp   string `json:"data_timestamp"`
	SortedByCountry bool   `json:"sorted_by_country"`
}

type RawPlace

type RawPlace struct {
	PlaceID      interface{}            `json:"place_id"`
	OsmType      string                 `json:"object_type"`
	OsmID        int64                  `json:"object_id"`
	OsmKey       string                 `json:"osm_key"`
	OsmValue     string                 `json:"osm_value"`
	Names        map[string]string      `json:"name"`
	Importance   float64                `json:"importance"`
	CountryCode  string                 `json:"country_code"`
	RankAddress  *int                   `json:"rank_address"`
	AddressType  string                 `json:"address_type"`
	Categories   []string               `json:"categories"`
	Extra        map[string]interface{} `json:"extra"`
	Address      map[string]interface{} `json:"address"`
	Postcode     string                 `json:"postcode"`
	HouseNumber  string                 `json:"housenumber"`
	Street       string                 `json:"street"`
	City         string                 `json:"city"`
	District     string                 `json:"district"`
	State        string                 `json:"state"`
	Country      string                 `json:"country"`
	Centroid     []float64              `json:"centroid"`
	Bbox         []float64              `json:"bbox"`
	AddressLines []AddressLine          `json:"addresslines"`
}

type Reader

type Reader struct {
	Header        *Header
	CountryNames  map[string]model.NameMap
	AddressCache  map[string]map[string]string // simplified for now
	Languages     map[string]struct{}
	CountryFilter map[string]struct{}
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) ReadAll

func (r *Reader) ReadAll(fn func(doc *model.PhotonDoc)) error

func (*Reader) ReadAllParallel

func (r *Reader) ReadAllParallel(workers int, fn func(doc *model.PhotonDoc)) error

func (*Reader) ReadHeader

func (r *Reader) ReadHeader() error

Jump to

Keyboard shortcuts

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