common

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(name string) (string, error)

Returns the value of a given environment variable. Returns an empty string and an error if no value is set.

func LoadS3Object

func LoadS3Object(bucket, key string) ([]byte, error)

Loads body of a given S3 object.

Types

type GetTileEvent

type GetTileEvent struct {
	Zoom int `json:"zoom"`
	X    int `json:"x"`
	Y    int `json:"y"`
}

Input type for a get-tile event.

func (GetTileEvent) ToTile

func (event GetTileEvent) ToTile() (maptile.Tile, bool)

Converts a `GetTileEvent` into a `maptile.Tile` The second return value is `false` if one or more of `event.Zoom`, `event.X`, `event.Y` are negative, `true` otherwise. The first return value is undefined if the second one is `false`.

type NamedFeatureCollections added in v0.2.0

type NamedFeatureCollections map[string]*geojson.FeatureCollection

func LoadLayersJson added in v0.2.0

func LoadLayersJson(bytes []byte) (*NamedFeatureCollections, error)

Jump to

Keyboard shortcuts

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