models

package
v0.0.0-...-b37488e Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupDB

func SetupDB() *gorp.DbMap

func SetupDB() *sql.DB {

Types

type User

type User struct {
	Id      int64 `db:"id"`
	Created int64
	Updated int64

	Email string `schema:"email",json:"email",db:"email"`
	Hash  string
}

func (*User) ComparePassword

func (user *User) ComparePassword(password string) error

Returns nil error on sucess

func (*User) PreInsert

func (i *User) PreInsert(s gorp.SqlExecutor) error

implement the PreInsert and PreUpdate hooks

func (*User) PreUpdate

func (i *User) PreUpdate(s gorp.SqlExecutor) error

func (*User) SetPassword

func (user *User) SetPassword(password string)

Jump to

Keyboard shortcuts

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