Documentation ¶
Index ¶
- type GameBatchRequest
- type GameDetailsRequest
- type GameDetailsResponse
- type GameListRequest
- type GameProperties
- type GameSearchResult
- type Genre
- type ListType
- type LoginProfile
- type Model
- type Platform
- type Profile
- type ProfileCreds
- type ProfileGame
- type ProfileInfo
- type RefreshRequest
- type RefreshToken
- type SearchRequest
- type Social
- type SocialType
- type TokenPair
- type TypedGameListProperties
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameBatchRequest ¶
type GameDetailsRequest ¶
type GameDetailsRequest struct {
Id uint64 `json:"id"`
}
type GameDetailsResponse ¶
type GameDetailsResponse struct { Game TypedGameListProperties `json:"game"` Platforms []Platform `json:"platforms"` Genres []Genre `json:"genres"` }
type GameListRequest ¶
type GameProperties ¶
type GameProperties struct { Model Name string `gorm:"unique;uniqueIndex:,class:FULLTEXT" json:"name" binding:"required"` Platforms []Platform `gorm:"many2many:game_platforms" json:"-"` ImageURL string `json:"image_url" binding:"required,url"` YearReleased uint16 `json:"year_released" binding:"required,gte=1000"` Genres []Genre `gorm:"many2many:game_genres" json:"-"` }
func (*GameProperties) TableName ¶
func (*GameProperties) TableName() string
type GameSearchResult ¶
type Genre ¶
type LoginProfile ¶
type Platform ¶
type Profile ¶
type Profile struct { ProfileInfo Email string `gorm:"unique;not null" json:"email" binding:"required"` Password string `json:"password" binding:"gte=6,lte=70"` RefreshTokens []RefreshToken `gorm:"foreignKey:ProfileID" json:"-"` }
type ProfileCreds ¶
type ProfileGame ¶
type ProfileGame struct { Profile Profile `gorm:"foreignKey:ProfileID" json:"-"` ProfileID uint64 `gorm:"primaryKey" json:"-"` Game GameProperties `gorm:"foreignKey:GameID" json:"game"` GameID uint64 `gorm:"primaryKey" json:"-"` ListType ListType `gorm:"foreignKey:ListTypeID" json:"-"` ListTypeID uint64 `json:"list_type"` }
func (*ProfileGame) TableName ¶
func (*ProfileGame) TableName() string
type ProfileInfo ¶
type ProfileInfo struct { Model Nickname string `gorm:"varchar(20);unique;uniqueIndex:,class:FULLTEXT" json:"nickname" binding:"gte=2,lte=20"` Description string `gorm:"varchar(120)" json:"description" binding:"lte=120"` GamesListed uint `json:"games_listed"` Socials []Social `gorm:"foreignKey:ProfileID"` }
type RefreshRequest ¶
type RefreshRequest struct {
RefreshToken string `json:"refresh_token" binding:"required"`
}
type RefreshToken ¶
type RefreshToken struct { ID uint64 `gorm:"primaryKey;autoIncrement" json:"id"` CreatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` ProfileID uint64 `json:"-"` Token string `json:"-"` }
func (*RefreshToken) TableName ¶
func (*RefreshToken) TableName() string
type SearchRequest ¶
type SearchRequest struct {
Name string `json:"name"`
}
type Social ¶
type Social struct { ProfileID uint64 `gorm:"primaryKey" json:"-"` Type SocialType `gorm:"foreignKey:TypeID" json:"-"` TypeID uint64 `gorm:"primaryKey" json:"type" binding:"required"` Data string `gorm:"varchar(70)" json:"data" binding:"gte=2,lte=70"` }
type SocialType ¶
func (*SocialType) TableName ¶
func (*SocialType) TableName() string
type TypedGameListProperties ¶
type TypedGameListProperties struct { GameProperties ListTypeID uint64 `json:"user_list"` }
Click to show internal directories.
Click to hide internal directories.