Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSuchUser = errors.New("no such user")
ErrNoSuchUser is returned when a user lookup is performed on a non-existent user
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.0.0
Config contains the necessary config options to connect to an sqlite3 database.
type DB ¶ added in v1.0.0
A DB in an instance of a karmabot database.
func (*DB) GetLeaderboard ¶ added in v1.0.0
func (db *DB) GetLeaderboard(limit int) (Leaderboard, error)
GetLeaderboard returns the leaderboard with the top X users.
func (*DB) GetThrowback ¶ added in v1.4.5
GetThrowback returns a random karma operation on a specific user
func (*DB) GetTotalPoints ¶ added in v1.0.0
GetTotalPoints returns the amount of points given or taken for all users.
func (*DB) Init ¶ added in v1.0.0
Init initializes an sqlite3 database in order for karmabot to be able to use it
func (*DB) InsertPoints ¶ added in v1.0.0
InsertPoints inserts a Points object into the database.
Click to show internal directories.
Click to hide internal directories.