Documentation
¶
Index ¶
Constants ¶
This section is empty.
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. Matrix controller consists a slice of utils.Cache which contains data from multiple server
func (*Controller) Query ¶
func (c *Controller) Query(query *Query) (results []*Matrix, err *errors.Error)
Query queries a set of matrix response using provided Query
func (*Controller) ServerContent ¶
func (c *Controller) ServerContent(server string) ([]*Matrix, *errors.Error)
ServerContent gives matrices from utils.Cache of server
type Matrix ¶
type Matrix struct { StageID string `json:"stageId,omitempty"` ItemID string `json:"itemId,omitempty"` Quantity int `json:"quantity"` // cannot omitempty as it is zeroable Times int `json:"times"` // cannot omitempty as it is zeroable Start *int64 `json:"start,omitempty"` End *int64 `json:"end,omitempty"` }
Matrix specifies data structure for the matrix data type
type Query ¶
type Query struct { // StageID is the query stageId of the current response; empty represents stageId hasn't been used as one of the constraints StageID string `json:"stageId,omitempty"` // ItemID is the query itemId of the current response; empty represents itemId hasn't been used as one of the constraints ItemID string `json:"itemId,omitempty"` // Server is the server to query matrix of Server string `json:"server,omitempty"` }
Query describes a query on Matrix
Click to show internal directories.
Click to hide internal directories.