model

package
v0.0.0-...-e1e7ebf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Descriptor

type Descriptor struct {
	Title  LocalizedString
	System string
}

type Game

type Game struct {
	QilinID              string           `json:"qilin_id"`
	Title                string           `json:"title"`
	Developers           Link             `json:"developers"`
	Publishers           Link             `json:"publishers"`
	ReleaseDate          time.Time        `json:"release_date"`
	DisplayRemainingTime bool             `json:"display_remaining_time"`
	AchievementOnProd    bool             `json:"achievement_on_prod"`
	FeaturesCommon       []string         `json:"features_common"`
	FeaturesCtrl         string           `json:"features_ctrl"`
	Platforms            Platforms        `json:"platforms"`
	Requirements         GameRequirements `json:"requirements"`
	Languages            GameLangs        `json:"languages"`
	GenreMain            GameGenre        `json:"genre_main"`
	GenreAddition        []GameGenre      `json:"genre_addition"`
	Tags                 []GameTag        `json:"tags"`
	Previews             LocalizedString  `json:"previews"`
	Media                *Media           `json:"media"`
	Ratings              *Ratings         `json:"ratings"`
	Description          LocalizedString  `json:"description"`
	Tagline              LocalizedString  `json:"tagline"`
	Reviews              []GameReview     `json:"reviews"`
}

type GameGenre

type GameGenre struct {
	ID   string `json:"id"`
	Name LocalizedString
}

type GameLangs

type GameLangs struct {
	EN Langs `json:"en"`
	RU Langs `json:"ru"`
	FR Langs `json:"fr"`
	ES Langs `json:"es"`
	DE Langs `json:"de"`
	IT Langs `json:"it"`
	PT Langs `json:"pt"`
}

type GameRating

type GameRating struct {
	AgeRestrict         int32  `json:"age_restrict"`
	DisplayOnlineNotice bool   `json:"display_online_notice"`
	ShowAgeRestrict     bool   `json:"show_age_restrict"`
	Rating              string `json:"rating"`
}

type GameRequirements

type GameRequirements struct {
	Windows *PlatformRequirements `json:"windows"`
	MacOs   *PlatformRequirements `json:"mac_os"`
	Linux   *PlatformRequirements `json:"linux"`
}

type GameReview

type GameReview struct {
	PressName string `json:"press_name"`
	Link      string `json:"link"`
	Score     string `json:"score"`
	Quote     string `json:"quote"`
}

type GameTag

type GameTag struct {
	ID   string `json:"id"`
	Name LocalizedString
}

type Langs

type Langs struct {
	Voice     bool `json:"voice"`
	Interface bool `json:"interface"`
	Subtitles bool `json:"subtitles"`
}
type Link struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

type LocalizedString

type LocalizedString struct {
	// english
	EN string `json:"en"`

	// russian
	RU string `json:"ru,omitempty"`

	// other languages
	FR string `json:"fr,omitempty"`
	ES string `json:"es,omitempty"`
	DE string `json:"de,omitempty"`
	IT string `json:"it,omitempty"`
	PT string `json:"pt,omitempty"`
}

LocalizedString is helper object to hold localized string properties.

func (LocalizedString) GetValueOrDefault

func (p LocalizedString) GetValueOrDefault(lng string) string

func (*LocalizedString) Scan

func (p *LocalizedString) Scan(src interface{}) error

func (LocalizedString) Value

func (p LocalizedString) Value() (driver.Value, error)

type LocalizedStringArray

type LocalizedStringArray struct {
	// english
	EN []string `json:"en"`

	// russian
	RU []string `json:"ru,omitempty"`

	// other languages
	FR []string `json:"fr,omitempty"`
	ES []string `json:"es,omitempty"`
	DE []string `json:"de,omitempty"`
	IT []string `json:"it,omitempty"`
	PT []string `json:"pt,omitempty"`
}

func (LocalizedStringArray) GetValueOrDefault

func (p LocalizedStringArray) GetValueOrDefault(lng string) []string

func (*LocalizedStringArray) Scan

func (p *LocalizedStringArray) Scan(src interface{}) error

func (LocalizedStringArray) Value

func (p LocalizedStringArray) Value() (driver.Value, error)

type MachineRequirements

type MachineRequirements struct {
	System           string `json:"system"`
	Processor        string `json:"processor"`
	Graphics         string `json:"graphics"`
	Sound            string `json:"sound"`
	Ram              int32  `json:"ram"`
	RamDimension     string `json:"ram_dimension"`
	Storage          int32  `json:"storage"`
	StorageDimension string `json:"storage_dimension"`
	Other            string `json:"other"`
}

type Media

type Media struct {
	CoverImage     LocalizedString      `json:"cover_image"`
	CoverVideo     LocalizedString      `json:"cover_video"`
	Trailers       LocalizedStringArray `json:"trailers"`
	Screenshots    LocalizedStringArray `json:"screenshots"`
	Special        LocalizedString      `json:"special"`
	Friends        LocalizedString      `json:"friends"`
	CapsuleGeneric LocalizedString      `json:"capsule_generic"`
	CapsuleSmall   LocalizedString      `json:"capsule_small"`
}

type PersonalInformation

type PersonalInformation struct {
	Email     string      `json:"email"`
	FirstName string      `json:"first_name"`
	LastName  string      `json:"last_name"`
	BirthDate *time.Time  `json:"birth_date"`
	Address   UserAddress `json:"address"`
}

type PlatformRequirements

type PlatformRequirements struct {
	Minimal     MachineRequirements `json:"minimal"`
	Recommended MachineRequirements `json:"recommended"`
}

type Platforms

type Platforms struct {
	Windows bool `json:"windows"`
	MacOs   bool `json:"mac_os"`
	Linux   bool `json:"linux"`
}

type Ratings

type Ratings struct {
	PEGI GameRating `json:"pegi"`
	BBFC GameRating `json:"bbfc"`
	CERO GameRating `json:"cero"`
	ESRB GameRating `json:"esrb"`
	USK  GameRating `json:"usk"`
}

type Socials

type Socials struct {
	Facebook string
	Twitter  string
}

type User

type User struct {
	ID       bson.ObjectId       `json:"id" bson:"_id,omitempty"`
	Personal PersonalInformation `json:"personal"`
	Account  UserAccount         `json:"account"`
}

type UserAccount

type UserAccount struct {
	Nickname            string              `json:"nickname"`
	PrimaryLanguage     string              `json:"primary_language"`
	AdditionalLanguages []string            `json:"additional_languages"`
	Socials             []UserSocialAccount `json:"socials"`
}

type UserAddress

type UserAddress struct {
	Country    string `json:"country"`
	City       string `json:"city"`
	PostalCode string `json:"postal_code"`
	Region     string `json:"region"`
	Line1      string `json:"line_1"`
	Line2      string `json:"line_2"`
}

type UserSocialAccount

type UserSocialAccount struct {
	Provider string `json:"provider"` // Facebook, twitter, Vk, etc.
	ID       string `json:"id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL