catalog

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

package catalog provides methods for creating lookup tables of tilepack.MbtilesReader instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCatalogFromFS

func NewCatalogFromFS(db_fs fs.FS) (map[string]tilepack.MbtilesReader, error)

NewCatalogFromFS return a lookup table of tilepack.MbtilesReader instances from a fs.FS instance. This method will match filenames (in 'db_fs') ending in `.*\.(sqlite|sqlite3|mbtiles|db)$`

func NewCatalogFromFSWithMatchFunc

func NewCatalogFromFSWithMatchFunc(db_fs fs.FS, match_func MatchFunc) (map[string]tilepack.MbtilesReader, error)

NewCatalogFromFS return a lookup table of tilepack.MbtilesReader instances from a fs.FS instance whose children return true when compared against the MatchFunction defined in 'match_func'

func NewCatalogFromFSWithRegexp

func NewCatalogFromFSWithRegexp(db_fs fs.FS, re *regexp.Regexp) (map[string]tilepack.MbtilesReader, error)

NewCatalogFromFS return a lookup table of tilepack.MbtilesReader instances from a fs.FS instance whose children match the regular expression defined in 're'.

Types

type MatchFunc

type MatchFunc func(string) (bool, error)

MatchFunc is a custom function to signal whether a given path is a valid MBTiles database path or filename.

Jump to

Keyboard shortcuts

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