Documentation ¶
Index ¶
- func AddRespec(respec *types.Respec)
- func DeleteDB(dbFileName string) error
- func GetChannel(channelID, APIID string) *types.Channel
- func GetChannelLastMessage(channel *types.Channel) *types.Message
- func GetGlobalRespec() []*types.Respec
- func GetGlobalStats() types.PairList
- func GetGlobalUsers() []*types.User
- func GetLastMessage(user *types.User, channel *types.Channel) *types.Message
- func GetLastRespecTime(user *types.User, channel *types.Channel) *time.Time
- func GetLocalRespec(channel *types.Channel) []*types.Respec
- func GetLocalStats(channel *types.Channel) types.PairList
- func GetServer(serverID, APIID string) *types.Server
- func GetServerLosers(server *types.Server) []*types.User
- func GetServerRespec(server *types.Server) []*types.Respec
- func GetServerRespecCap(server *types.Server) int
- func GetServerRulingClass(server *types.Server) []*types.User
- func GetServerStats(server *types.Server) types.PairList
- func GetServerTopUser(server *types.Server) *types.User
- func GetServerUsers(server *types.Server) []*types.User
- func GetTotalRespec() int
- func GetTotalServerRespec(server *types.Server) int
- func GetUser(UserID, APIID string) *types.User
- func GetUserLastMessages(user *types.User, channel *types.Channel, amount int) []*types.Message
- func GetUserLocalRespec(user *types.User, channel *types.Channel) int
- func GetUserServerRespec(user *types.User, server *types.Server) int
- func IsMessageUnique(message *types.Message) bool
- func IsMultiPosting(message *types.Message) bool
- func NewChannel(channel *types.Channel)
- func NewMessage(message *types.Message)
- func NewServer(server *types.Server)
- func NewUser(user *types.User) error
- func Purge() error
- func Setup(dbFileName string) error
- func UpdateChannel(channel *types.Channel)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChannel ¶
GetChannel Get the channel identified by the channel ID in the given API
func GetChannelLastMessage ¶
GetChannelLastMessage Get the last message posted in the given channel
func GetGlobalRespec ¶
GetGlobalRespec Gets the respec of every user in every server
func GetGlobalStats ¶
GetGlobalStats Gets a list of users and their scores in all servers and channels
func GetGlobalUsers ¶
GetGlobalUsers Gets a list of all users from the database
func GetLastMessage ¶
GetLastMessage Get the last message by the given user posted in the given channel
func GetLastRespecTime ¶
GetLastRespecTime Get's the time.Time of the last time a given users respec was updated in the given channel
func GetLocalRespec ¶
GetLocalRespec Gets the respec of every user in the given channel
func GetLocalStats ¶
GetLocalStats Gets a list of users and their scores in the given channel
func GetServerLosers ¶
GetServerLosers Get a list of users with a negative score in the given server
func GetServerRespec ¶
GetServerRespec Gets the respec of every user in the given server
func GetServerRespecCap ¶
GetServerRespecCap Gets the soft respec cap in the given server (max of (7/16 of total respec) or (100))
func GetServerRulingClass ¶
GetServerRulingClass Gets a list of users who hold the top 50% of respec in the given server
func GetServerStats ¶
GetServerStats Gets a list of users and their scores in the given server
func GetServerTopUser ¶
GetServerTopUser Gets the top user in the given server
func GetServerUsers ¶
GetServerUsers Gets a list of all users in the given server from the database
func GetTotalRespec ¶
func GetTotalRespec() int
GetTotalRespec Gets the total positive respec in every server combined
func GetTotalServerRespec ¶
GetTotalServerRespec Gets the total positive respec in the given server
func GetUserLastMessages ¶
GetUserLastMessages Get the last 'amount' messages by the given user posted in the given channel
func GetUserLocalRespec ¶
GetUserLocalRespec Gets the total respec of a given user in the given channel
func GetUserServerRespec ¶
GetUserServerRespec Gets the total respec of a given user in the given server
func IsMessageUnique ¶
IsMessageUnique Check if the author of the given message has posted the same thing in their last 25 posts
func IsMultiPosting ¶
IsMultiPosting Check if the last 3 posts in the channel are by the author of the given message
func NewChannel ¶
NewChannel Insert the channel into the database. Fills the 'Key' field
func NewMessage ¶
NewMessage Insert the given message into the database. Fills the 'Key' field
func Purge ¶
func Purge() error
Purge Delete all files related to this app in the userdata directory
func Setup ¶
Setup Create a directory in userdata to store the database file and any other files generated by this program
func UpdateChannel ¶
UpdateChannel Updates and channel information to the stored channel in database
Types ¶
This section is empty.