Documentation
¶
Index ¶
Constants ¶
View Source
const (
MaxSiteStatsAmount = 3
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller consists instance for a type of data. SiteStat controller consists a slice of utils.Cache which contains data from multiple server
func (*Controller) Query ¶
func (c *Controller) Query(query *Query) (results []StageTime, err *errors.Error)
Query queries a set of siteStats response using provided Query
func (*Controller) ServerContent ¶
func (c *Controller) ServerContent(server string) ([]StageTime, *errors.Error)
ServerContent gives matrices from utils.Cache of server
type Query ¶
type Query struct { // Server is the server to query matrix of Server string `json:"server,omitempty"` }
Query describes a query on SiteStat
type RemoteResponse ¶
type RemoteResponse struct {
TotalStageTimesRecent24H []StageTime `json:"totalStageTimes_24h,omitempty"`
}
type SiteStat ¶
type SiteStat struct { Stage *stage.Stage `json:"stage,omitempty"` Item *item.Item `json:"item,omitempty"` Quantity int `json:"quantity"` // cannot omitempty as it is zeroable Times int `json:"times"` // cannot omitempty as it is zeroable RecentTimes int `json:"recentTimes"` // cannot omitempty as it is zeroable }
SiteStat specifies data structure for the site stats data type
Click to show internal directories.
Click to hide internal directories.