models

package
v0.0.0-...-30e327d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDbMap

func GetDbMap(user, password, hostname, port, database string) *gorp.DbMap

func GetUserCount

func GetUserCount(dbMap *gorp.DbMap) int64

GetUserCount gives a count of all users

func GetUserCountActive

func GetUserCountActive(dbMap *gorp.DbMap) int64

GetUserCountActive gives a count of all users who have submitted an address

func InsertEmailChange

func InsertEmailChange(dbMap *gorp.DbMap, emailChange *EmailChange) error

func InsertPasswordReset

func InsertPasswordReset(dbMap *gorp.DbMap, passwordReset *PasswordReset) error

func InsertUser

func InsertUser(dbMap *gorp.DbMap, user *User) error

Types

type EmailChange

type EmailChange struct {
	Id       int64 `db:"EmailChangeID"`
	UserId   int64
	NewEmail string
	Token    string
	Created  int64
	Expires  int64
}

type PasswordReset

type PasswordReset struct {
	Id      int64 `db:"PasswordResetID"`
	UserId  int64
	Token   string
	Created int64
	Expires int64
}

type User

type User struct {
	Id               int64 `db:"UserId"`
	Email            string
	Username         string
	Password         []byte
	MultiSigAddress  string
	MultiSigScript   string
	PoolPubKeyAddr   string
	UserPubKeyAddr   string
	UserFeeAddr      string
	HeightRegistered int64
	EmailVerified    int64
	EmailToken       string
}

func GetAllCurrentMultiSigScripts

func GetAllCurrentMultiSigScripts(dbMap *gorp.DbMap) ([]User, error)

func GetUserByEmail

func GetUserByEmail(dbMap *gorp.DbMap, email string) (user *User)

func GetUserById

func GetUserById(dbMap *gorp.DbMap, id int64) (user *User)

func UpdateUserById

func UpdateUserById(dbMap *gorp.DbMap, id int64, msa string, mss string, ppka string, upka string, ufa string, height int64) (user *User)

func (*User) HashPassword

func (user *User) HashPassword(password string)

Jump to

Keyboard shortcuts

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