Documentation ¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetNames() []string
- func NullStrToStr(ns sql.NullString) string
- func RunMigrations(db *sql.DB) error
- type Querier
- func (q *Querier) AddUser(user *objects.User) error
- func (db *Querier) DropData()
- func (db *Querier) GetHandle() *sql.DB
- func (q *Querier) GetUserByEmail(userEmail string, user *objects.User) error
- func (q *Querier) GetUserByName(userName string, user *objects.User) error
- func (q *Querier) GetUsers(users *[]objects.User) error
- func (db *Querier) Migrate() error
- func (q *Querier) RemoveUserByEmail(user *objects.User) error
- func (q *Querier) RemoveUserByName(user *objects.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func NullStrToStr ¶
func NullStrToStr(ns sql.NullString) string
func RunMigrations ¶
RunMigrations runs DB migrations at startup
Types ¶
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
Querier facilitates querying appbert objects from DB
func (*Querier) GetUserByEmail ¶
GetUserByEmail returns a user given userEmail
func (*Querier) GetUserByName ¶
GetUserByName returns a user given userName
func (*Querier) RemoveUserByEmail ¶
RemoveUser removes user from database based on email