Documentation ¶
Index ¶
- Variables
- func ApplyPresences(client *redis.Client, guildID int64, presences []*discordgo.Presence) error
- func Dir(useLocal bool, name string) http.FileSystem
- func FS(useLocal bool) http.FileSystem
- func FSByte(useLocal bool, name string) ([]byte, error)
- func FSMustByte(useLocal bool, name string) []byte
- func FSMustString(useLocal bool, name string) string
- func FSString(useLocal bool, name string) (string, error)
- func GetChannelMessageStats(client *redis.Client, raw []string, guildID int64) (map[string]*ChannelStats, error)
- func HandleGuildCreate(evt *eventsystem.EventData)
- func HandleMemberAdd(evt *eventsystem.EventData)
- func HandleMemberRemove(evt *eventsystem.EventData)
- func HandleMessageCreate(evt *eventsystem.EventData)
- func HandlePresenceUpdate(evt *eventsystem.EventData)
- func HandleReady(evt *eventsystem.EventData)
- func HandleStatsHtml(w http.ResponseWriter, r *http.Request, isPublicAccess bool) (web.TemplateData, error)
- func HandleStatsJson(w http.ResponseWriter, r *http.Request, isPublicAccess bool) interface{}
- func HandleStatsSettings(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func MarkGuildAsToBeChecked(guildID int64)
- func ProcessTempStats(full bool)
- func RegisterPlugin()
- func UpdateGuildStats(client *redis.Client, guildID int64) error
- func UpdateOldStats()
- func UpdateStatsLoop()
- type ChannelStats
- type FormData
- type FullStats
- type Plugin
- type ServerStatsConfig
Constants ¶
This section is empty.
Variables ¶
var (
ServerStatsPeriodStore *models.StatsPeriodStore
)
Functions ¶
func ApplyPresences ¶
func Dir ¶
func Dir(useLocal bool, name string) http.FileSystem
Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.
func FS ¶
func FS(useLocal bool) http.FileSystem
FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSByte ¶
FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSMustByte ¶
FSMustByte is the same as FSByte, but panics if name is not present.
func FSMustString ¶
FSMustString is the string version of FSMustByte.
func GetChannelMessageStats ¶
func HandleGuildCreate ¶
func HandleGuildCreate(evt *eventsystem.EventData)
func HandleMemberAdd ¶
func HandleMemberAdd(evt *eventsystem.EventData)
func HandleMemberRemove ¶
func HandleMemberRemove(evt *eventsystem.EventData)
func HandleMessageCreate ¶
func HandleMessageCreate(evt *eventsystem.EventData)
func HandlePresenceUpdate ¶
func HandlePresenceUpdate(evt *eventsystem.EventData)
func HandleReady ¶
func HandleReady(evt *eventsystem.EventData)
func HandleStatsHtml ¶
func HandleStatsHtml(w http.ResponseWriter, r *http.Request, isPublicAccess bool) (web.TemplateData, error)
Somewhat dirty - should clean up this mess sometime
func HandleStatsJson ¶
func HandleStatsJson(w http.ResponseWriter, r *http.Request, isPublicAccess bool) interface{}
func HandleStatsSettings ¶
func HandleStatsSettings(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func MarkGuildAsToBeChecked ¶
func MarkGuildAsToBeChecked(guildID int64)
func ProcessTempStats ¶
func ProcessTempStats(full bool)
ProcessTempStats moves stats from redis to postgres batched up
func RegisterPlugin ¶
func RegisterPlugin()
func UpdateGuildStats ¶
Updates the stats on a specific guild, removing expired stats
func UpdateOldStats ¶
func UpdateOldStats()
func UpdateStatsLoop ¶
func UpdateStatsLoop()
Types ¶
type ChannelStats ¶
type FullStats ¶
type FullStats struct { ChannelsHour map[string]*ChannelStats `json:"channels_hour"` JoinedDay int `json:"joined_day"` LeftDay int `json:"left_day"` Online int `json:"online_now"` TotalMembers int `json:"total_members_now"` }
func RetrieveFullStats ¶
type ServerStatsConfig ¶
type ServerStatsConfig struct { configstore.GuildConfigModel Public bool IgnoreChannels string ParsedChannels []string `gorm:"-"` }
func (*ServerStatsConfig) GetName ¶
func (c *ServerStatsConfig) GetName() string
func (*ServerStatsConfig) PostFetch ¶
func (s *ServerStatsConfig) PostFetch()
Directories ¶
Path | Synopsis |
---|---|
IMPORTANT! This is auto generated code by https://github.com/src-d/go-kallax Please, do not touch the code below, and if you do, do it under your own risk.
|
IMPORTANT! This is auto generated code by https://github.com/src-d/go-kallax Please, do not touch the code below, and if you do, do it under your own risk. |