geo

package
v0.0.0-...-6e49c5b Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB stores geo info to a redis store

func New

func New(db *sql.DB) *DB

New creates a new geo DB that uses the given redis pool and triggers db.Load in a separate goroutine. Check DB.Loaded() to determine when the datastore is fully loaded

func (*DB) LookupZip

func (db *DB) LookupZip(ctx context.Context, zip string) (*tz.Location, error)

LookupZip gets a latitude and longitude for a zipcode. If the result is found then ok is TRUE along with the results If no result is found then ok is FALSE

Jump to

Keyboard shortcuts

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