Documentation
¶
Overview ¶
* Functions for querying the database. Each function should represent the most basic useful database operation. * * The functions in the package should only be accessed through the common package.
Index ¶
- Variables
- type DB
- func (db DB) AddListing(userid int, title, description, price string, lon, lat float64) error
- func (db DB) ChangePassword(email, newPassword string) (err error)
- func (db DB) GetEmail(sessionid string) (email string, err error)
- func (db DB) GetEmailFromSessionID(sessionid string) (email string, err error)
- func (db DB) GetSessionUserID(sessionid string) (userid int, err error)
- func (db DB) GetUserID(email string, password string) (userid int, err error)
- func (db DB) Logout(sessionid string) error
- func (db DB) NewSession(userid int) (sessionid string, err error)
- func (db DB) RegisterUser(email string) (password string, err error)
- func (db DB) ResetPassword(email string) (password string, err error)
- func (db DB) UpdateLocation(userid int, lon, lat float64) error
- func (db DB) UpdateSession(sessionid string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var UsernameInUse = errors.New("You have already registered with this email address.")
Errors
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (DB) AddListing ¶
func (DB) ChangePassword ¶
func (DB) GetEmailFromSessionID ¶
func (DB) GetSessionUserID ¶
func (DB) UpdateSession ¶
Click to show internal directories.
Click to hide internal directories.