userdata

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

type DBConfig

type DBConfig struct {
	DBHost     string
	DBName     string
	DBPassword string
	DBPort     string
	DBUser     string
}

type UserData

type UserData struct {
	sync.RWMutex
	DBConfig         *DBConfig
	UserVotingConfig map[string]UserVotingConfig // [multisigaddr]
}

UserData stores the current snapshot of the user voting config.

func (*UserData) DBSetConfig

func (u *UserData) DBSetConfig(DBUser string, DBPassword string, DBHost string, DBPort string, DBName string)

DBSetConfig sets the database configuration.

func (*UserData) MySQLFetchUserVotingConfig

func (u *UserData) MySQLFetchUserVotingConfig() (map[string]UserVotingConfig, error)

MySQLFetchUserVotingConfig fetches the voting preferences of all users who have completed registration of the pool by submitting an address and generating a multisig ticket address.

type UserVotingConfig

type UserVotingConfig struct {
	Userid          int64
	MultiSigAddress string
	VoteBits        uint16
	VoteBitsVersion uint32
}

UserVotingConfig contains per-user voting preferences.

Jump to

Keyboard shortcuts

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