Documentation
¶
Index ¶
- Constants
- Variables
- func DataKey(k string, t time.Time, lat, lng float64) []byte
- func ListKey(k string) []byte
- func PointKey(lat, lng float64, t time.Time, k string) []byte
- func ReadDataKey(dk []byte) (string, time.Time, float64, float64, error)
- func ReadPointKey(pk []byte) (s2.CellID, time.Time, string, error)
- func S2RadialAreaMeters(radius float64) float64
- func Uint64tob(v uint64) []byte
- type DataPoint
- type Indexer
- type Tx
Constants ¶
View Source
const Prefix = "TT"
Variables ¶
Functions ¶
func ReadDataKey ¶
ReadDataKey returns the key, time, lat, lng note that lat lng will have a small delta compared to the original values induced by the s2 cell
func ReadPointKey ¶
ReadPointKey returns cell, time, key
func S2RadialAreaMeters ¶
Types ¶
type Indexer ¶
type Indexer interface { Store(k string, v []byte, lat, lng float64, t time.Time) error StoreTx(tx Tx, k string, v []byte, lat, lng float64, t time.Time) error Get(k string) (*DataPoint, error) Keys() ([]string, error) GetAll(k string, count int) ([]DataPoint, error) RadiusSearch(lat, lng, radius float64) ([]DataPoint, error) RectSearch(urlat, urlng, bllat, bllng float64) ([]DataPoint, error) Begin() Tx }
Click to show internal directories.
Click to hide internal directories.