telebot

package
v0.0.0-...-8e3a394 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreVillagesInDB

func AreVillagesInDB(db *badger.DB) bool

AreVillagesInDB -- check if villages has been initialized(if exists)

func ClosestVillage

func ClosestVillage(db *badger.DB, lat float32, lon float32) string

ClosestVillage find closest village to point

func LoadVillagesToDB

func LoadVillagesToDB(db *badger.DB)

LoadVillagesToDB load to badgerDB

Types

type Gps

type Gps struct {
	Lat float32
	Lon float32
}

Gps struct with Latitude, Longtitude

type Village

type Village struct {
	Name  string
	Point Gps
}

Village name, gps point lat, lon

func ParseToVillage

func ParseToVillage(row []string) Village

ParseToVillage take slice of string splitted by delimiter and convert to Village struct

type VillageArr

type VillageArr struct {
	Arr []Village
}

VillageArr is there only, because json.Marshal

Jump to

Keyboard shortcuts

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