bbolt

package
v0.0.0-...-12b612f Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStorage = errors.New("storage error")

Functions

func OperationStorageError

func OperationStorageError(op string) error

Types

type Storage

type Storage struct {
	*bbolt.DB
	// contains filtered or unexported fields
}

Storage cold storage.

func NewROStorage

func NewROStorage(path string, logger log.Logger) (*Storage, func() error, error)

NewROStorage returns a read only storage using bboltdb.

func NewStorage

func NewStorage(path string, logger log.Logger) (*Storage, func() error, error)

NewStorage returns a cold storage using bboltdb.

func (*Storage) Index

func (s *Storage) Index(fc geojson.FeatureCollection, icoverer *s2.RegionCoverer, ocoverer *s2.RegionCoverer,
	warningCellsCover int, fileName, version string) error

func (*Storage) LoadAllFeatures

func (s *Storage) LoadAllFeatures(add func(*insideout.FeatureStorage, uint32) error) error

LoadAllFeatures loads FeatureStorage from DB into idx only useful to fill in memory shapeindex.

func (*Storage) LoadCellStorage

func (s *Storage) LoadCellStorage(id uint32) (*insideout.CellsStorage, error)

LoadCellStorage loads cell storage from.

func (*Storage) LoadFeature

func (s *Storage) LoadFeature(id uint32) (*insideout.Feature, error)

LoadFeature loads one feature from the DB.

func (*Storage) LoadFeaturesCells

func (s *Storage) LoadFeaturesCells(add func([]s2.CellUnion, []s2.CellUnion, uint32)) error

LoadFeaturesCells loads CellsStorage from DB into idx only useful to fill in memory tree indexes.

func (*Storage) LoadIndexInfos

func (s *Storage) LoadIndexInfos() (*insideout.IndexInfos, error)

LoadIndexInfos loads index infos from the DB.

func (*Storage) LoadMapInfos

func (s *Storage) LoadMapInfos() (*insideout.MapInfos, bool, error)

LoadMapInfos loads map infos from the DB if any.

func (*Storage) StabDB

func (s *Storage) StabDB(lat, lng float64, stopOnInsideFound bool) (insideout.IndexResponse, error)

Jump to

Keyboard shortcuts

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