Documentation
¶
Index ¶
Constants ¶
View Source
const ( MAGIC_NUMBER = 0x47656f44420a0004 SIZE_DATABASE_ENTRY = 14 SIZE_DATABASE_HEADER = 10 SIZE_TIMESTAMP = 6 VERSION_MAJOR = 1 VERSION_MINOR = 0 )
* Constants for the geographical database.
View Source
const ( JSON_STREAM_HEADER = iota JSON_STREAM_ENTRIES JSON_STREAM_TRAILER JSON_STREAM_EOF JSON_STREAM_ERROR )
* States for JSON serializer.
View Source
const ( JSON_INDENT_IN = 1 JSON_INDENT_NONE = 0 JSON_INDENT_OUT = -1 )
* Indentation direction.
View Source
const ( XML_STREAM_HEADER = iota XML_STREAM_ENTRIES XML_STREAM_TRAILER XML_STREAM_EOF XML_STREAM_ERROR )
* States for XML serializer.
View Source
const ( XML_INDENT_IN = 1 XML_INDENT_NONE = 0 XML_INDENT_OUT = -1 )
* Indentation direction.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { Append(loc *Location) error Close() Deduplicate() (uint32, error) LocationCount() uint32 ReadLocations(offset uint32, target []Location) (uint32, error) SerializeBinary() io.ReadSeekCloser SerializeCSV() io.ReadCloser SerializeJSON(pretty bool) io.ReadCloser SerializeXML(pretty bool) io.ReadCloser Sort() error }
* A database storing geographic data.
type Storage ¶
type Storage interface { ReadAt(buf []byte, offset int64) (int, error) Seek(offset int64, whence int) (int64, error) Truncate(size int64) error WriteAt(buf []byte, offset int64) (int, error) }
* Interface that a storage backing a database will have to implement. * Typically, this storage will be a file.
Click to show internal directories.
Click to hide internal directories.