knowledge

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2016 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package knowledge provides known and commonly required information about the user. This is useful for plugins to retrieve information such as a user's last known location.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoLocation = errors.New("no previous location")

ErrNoLocation is returned when a location is expected but none can be found.

Functions

func GetAddress

func GetAddress(db *sqlx.DB, u *dt.User, msg string) (*dt.Address, error)

GetAddress returns an address for a given user's message, automatically looking up previously seen addresses named "home" and "office". This enables the user to, for example, ask that a package be sent to the office.

func GetLocation

func GetLocation(db *sqlx.DB, u *dt.User) (*dt.Location, string,
	error)

GetLocation returns the last known location of a user. If the location isn't recent, ask the user to confirm.

Types

This section is empty.

Jump to

Keyboard shortcuts

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