Documentation ¶
Index ¶
- type GamesQuery
- func (q *GamesQuery) FilterPlatforms(platforms []string) *GamesQuery
- func (q *GamesQuery) FilterRegions(regions []string) *GamesQuery
- func (q *GamesQuery) FilterUIDs(serialNumbers []string) *GamesQuery
- func (q *GamesQuery) Get() GamesResult
- func (q *GamesQuery) Limit(limit int) *GamesQuery
- func (q *GamesQuery) Page(offset int) *GamesQuery
- type GamesResult
- type LanguagesQuery
- type PlatformsQuery
- type RegionsQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GamesQuery ¶
type GamesQuery struct {
// contains filtered or unexported fields
}
GamesQuery is used for getting games from database
func NewGamesQuery ¶
func NewGamesQuery(handle *gorm.DB, maxLimit int) *GamesQuery
NewGamesQuery return the new query used for retrieving games
func (*GamesQuery) FilterPlatforms ¶
func (q *GamesQuery) FilterPlatforms(platforms []string) *GamesQuery
FilterPlatforms filters games by matching platforms uids, if not called games on all platforms are returned
func (*GamesQuery) FilterRegions ¶
func (q *GamesQuery) FilterRegions(regions []string) *GamesQuery
FilterRegions filters games by matching their regions, if not called games from all regions are returned
func (*GamesQuery) FilterUIDs ¶
func (q *GamesQuery) FilterUIDs(serialNumbers []string) *GamesQuery
FilterUIDs filters games by matching UID (platform:serial_no), if not called all games are returned
func (*GamesQuery) Get ¶
func (q *GamesQuery) Get() GamesResult
Get retrives games and their total count
func (*GamesQuery) Limit ¶
func (q *GamesQuery) Limit(limit int) *GamesQuery
Limit sets the maximum amount of games being returned It may exceed max limit set by the App config
func (*GamesQuery) Page ¶
func (q *GamesQuery) Page(offset int) *GamesQuery
Page sets the multiplication of limit. Used for paging the results
type GamesResult ¶
GamesResult contains informations about games fetched from database
type LanguagesQuery ¶
type LanguagesQuery struct {
// contains filtered or unexported fields
}
LanguagesQuery is responsible for returning the languages information from database
func NewLanguagesQuery ¶
func NewLanguagesQuery(handle *gorm.DB) *LanguagesQuery
NewLanguagesQuery returns a query used for retrieving lanugages
type PlatformsQuery ¶
type PlatformsQuery struct {
// contains filtered or unexported fields
}
PlatformsQuery is responsible for returning the platforms information from database
func NewPlatformsQuery ¶
func NewPlatformsQuery(handle *gorm.DB) *PlatformsQuery
NewPlatformsQuery returns a query used for retrieving lanugages
func (*PlatformsQuery) FilterIndexed ¶
func (q *PlatformsQuery) FilterIndexed(indexed bool) *PlatformsQuery
FilterIndexed filters platforms that are either with index or without
func (*PlatformsQuery) First ¶
func (q *PlatformsQuery) First() models.Platform
First returns only first found platform
func (*PlatformsQuery) WithUID ¶
func (q *PlatformsQuery) WithUID(uid string) *PlatformsQuery
WithUID filters platforms to only return platform with specified UID
type RegionsQuery ¶
type RegionsQuery struct {
// contains filtered or unexported fields
}
RegionsQuery is responsible for returning the regions information from database
func NewRegionsQuery ¶
func NewRegionsQuery(handle *gorm.DB) *RegionsQuery
NewRegionsQuery returns a query used for retrieving lanugages