-
Notifications
You must be signed in to change notification settings - Fork 5
/
tile.go
23 lines (20 loc) · 836 Bytes
/
tile.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package veldt
import (
"github.com/unchartedsoftware/veldt/binning"
)
// Tile represents an interface for generating tile data.
type Tile interface {
// Parse parses a tile request for future creation
// parameter 1 (map[string]interface{}) Any parameters specifying the how this tile
// is to be created
Parse(map[string]interface{}) error
// Create creates a tile.
// parameter 1 (string): A dataset ID (typically called uri)
// parameter 2 (*binning.TileCoord): the coordinates of the requested tile
// parameter 3 (Query): A query to specify which data should be included in the
// tile - essentially a filter
Create(string, *binning.TileCoord, Query) ([]byte, error)
}
// TileCtor represents a function that instantiates and returns a new tile
// data type.
type TileCtor func() (Tile, error)