2016-06-22 22:40:18 -07:00
|
|
|
package vain
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
// Storer defines the db interface.
|
|
|
|
type Storer interface {
|
2016-06-22 23:01:21 -07:00
|
|
|
NSForToken(ns namespace, tok Token) error
|
|
|
|
|
2016-06-22 22:40:18 -07:00
|
|
|
Package(path string) (Package, error)
|
2016-06-22 23:01:21 -07:00
|
|
|
AddPackage(p Package) error
|
|
|
|
RemovePackage(pth path) error
|
|
|
|
PackageExists(pth path) bool
|
2016-06-22 22:40:18 -07:00
|
|
|
Pkgs() []Package
|
2016-06-22 23:01:21 -07:00
|
|
|
|
|
|
|
Register(e Email) (Token, error)
|
|
|
|
Confirm(tok Token) (Token, error)
|
|
|
|
Forgot(e Email, window time.Duration) (Token, error)
|
2016-06-22 22:40:18 -07:00
|
|
|
}
|