Documentation ¶
Index ¶
- Variables
- func FindAllUsernames(exclude string) []string
- func IncrementPlusplus(name string, increment int) int
- func InsertMessageStats(requestMessage telegram.RequestMessage)
- func MigrateMessageStats(db *gorm.DB)
- func MigratePlusplus(db *gorm.DB)
- func MigrateStats(db *gorm.DB)
- func UpdateStats(user telegram.User)
- type MessageStats
- type Plusplus
- type Stats
- type WordCount
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func FindAllUsernames ¶
Finds all usernames for use in @all
func IncrementPlusplus ¶
Atomically increments a plusplus entry and returns the new value
func InsertMessageStats ¶
func InsertMessageStats(requestMessage telegram.RequestMessage)
func UpdateStats ¶
Is called when any new message arrives update updates that users stats
Types ¶
type MessageStats ¶
type Plusplus ¶
type Plusplus struct { gorm.Model Name string `gorm:"uniqueIndex;<-:create"` Value int `gorm:"index;<-"` }
Model for table plusplus
Click to show internal directories.
Click to hide internal directories.