Documentation ¶
Index ¶
- func DisableLog()
- func GetDbMap(APISecret, baseURL, user, password, hostname, port, database string) *gorp.DbMap
- func GetUserCount(dbMap *gorp.DbMap) int64
- func GetUserCountActive(dbMap *gorp.DbMap) int64
- func GetUserMax(dbMap *gorp.DbMap) int64
- func InsertEmailChange(dbMap *gorp.DbMap, emailChange *EmailChange) error
- func InsertPasswordReset(dbMap *gorp.DbMap, passwordReset *PasswordReset) error
- func InsertUser(dbMap *gorp.DbMap, user *User) error
- func SetUserAPIToken(dbMap *gorp.DbMap, APISecret string, baseURL string, id int64) error
- func UseLogger(logger btclog.Logger)
- type EmailChange
- type PasswordReset
- type User
- func GetAllCurrentMultiSigScripts(dbMap *gorp.DbMap) ([]User, error)
- func GetUserByEmail(dbMap *gorp.DbMap, email string) (user *User)
- func GetUserById(dbMap *gorp.DbMap, id int64) (user *User, err error)
- func UpdateUserByID(dbMap *gorp.DbMap, id int64, multiSigAddr string, multiSigScript string, ...) (user *User)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func GetUserCount ¶
GetUserCount gives a count of all users
func GetUserCountActive ¶
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 ¶
InsertUser inserts a user into the DB
func SetUserAPIToken ¶
SetUserAPIToken generates and saves a unique API Token for a user.
Types ¶
type EmailChange ¶
type PasswordReset ¶
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 APIToken string VoteBits int64 VoteBitsVersion int64 }
func UpdateUserByID ¶
func UpdateUserByID(dbMap *gorp.DbMap, id int64, multiSigAddr string, multiSigScript string, poolPubKeyAddr string, userPubKeyAddr string, userFeeAddr string, height int64) (user *User)
UpdateUserByID updates a user, specified by id, in the DB with a new multiSigAddr, multiSigScript, multiSigScript, pool pubkey address, user pub key address, and fee address. Unchanged are the user's ID, email, username and password.
func (*User) HashPassword ¶
Click to show internal directories.
Click to hide internal directories.