cache

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "cache",
	Short: "command to manage the cache",
	Long:  "command to manage the cache",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		RequireCache = true
		if cmd.HasParent() {

			pcmd := cmd.Parent()
			if pcmd.PersistentPreRunE != nil {
				if err := pcmd.PersistentPreRunE(pcmd, args); err != nil {
					return err
				}
			}
		}
		return nil
	},
}
View Source
var Config *config.Config

the config from the main app

View Source
var RequireCache bool
View Source
var SeedPurgeCmd = &cobra.Command{
	Use:     "seed",
	Aliases: []string{"purge"},
	Short:   "seed or purge tiles from the cache",
	Long:    "command to seed or purge tiles from the cache",
	Example: "tegola cache seed --bounds lng,lat,lng,lat",
}
View Source
var TileListCmd = &cobra.Command{
	Use:     "tile-list filename|-",
	Short:   "operate on a list of tile names separated by new lines",
	Example: "tile-list my-tile-list.txt",
	PreRunE: tileListValidate,
	RunE:    tileListCommand,
}
View Source
var TileNameCmd = &cobra.Command{
	Use:     "tile-name z/x/y",
	Short:   "operate on a single tile formatted according to --format",
	Example: "tile-name 0/0/0",
	PreRunE: tileNameValidate,
	RunE:    tileNameCommand,
}

Functions

func IsMinMaxZoomExplicit

func IsMinMaxZoomExplicit(cmd *cobra.Command) bool

func IsValidLat

func IsValidLat(f64 float64) bool

func IsValidLatString

func IsValidLatString(lat string) (float64, bool)

func IsValidLng

func IsValidLng(f64 float64) bool

func IsValidLngString

func IsValidLngString(lng string) (float64, bool)

Types

type ErrTileNameFormat

type ErrTileNameFormat string

func (ErrTileNameFormat) Error

func (e ErrTileNameFormat) Error() string

type Format

type Format struct {
	X, Y, Z uint
	Sep     string
}

func NewFormat

func NewFormat(format string) (Format, error)

func (Format) Parse

func (f Format) Parse(val string) (z, x, y uint, err error)

func (Format) ParseTile

func (f Format) ParseTile(val string) (tile *slippy.Tile, err error)

func (Format) String

func (f Format) String() string

type MapTile

type MapTile struct {
	MapName string
	Tile    *slippy.Tile
}

type TileChannel

type TileChannel struct {
	// contains filtered or unexported fields
}

func (*TileChannel) Channel

func (tc *TileChannel) Channel() <-chan *slippy.Tile

func (*TileChannel) Close

func (tc *TileChannel) Close()

func (*TileChannel) Err

func (tc *TileChannel) Err() (e error)

Jump to

Keyboard shortcuts

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