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

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