Documentation ¶
Index ¶
- Constants
- func DBClear()
- func DBClose()
- func DBDefaultData()
- func FillCupData(cup *Cup)
- func HandleArgs()
- func HttpHandler() (h *rest.ResourceHandler)
- type Config
- type Cup
- type Game
- type GokerContext
- type Score
- type User
- func (u *User) Delete(w rest.ResponseWriter, r *rest.Request)
- func (u *User) Get(w rest.ResponseWriter, r *rest.Request)
- func (u *User) GetAll(w rest.ResponseWriter, r *rest.Request)
- func (u *User) GetCups(w rest.ResponseWriter, r *rest.Request)
- func (u *User) Post(w rest.ResponseWriter, r *rest.Request)
- func (u *User) Put(w rest.ResponseWriter, r *rest.Request)
- type UserCup
- type UserGame
Constants ¶
View Source
const GameTypeCashGame = "cashgame"
View Source
const GameTypeSitAndGo = "sitandgo"
Variables ¶
This section is empty.
Functions ¶
func DBDefaultData ¶
func DBDefaultData()
Init default database by dropping recreating tables with default data
func FillCupData ¶
func FillCupData(cup *Cup)
func HandleArgs ¶
func HandleArgs()
func HttpHandler ¶
func HttpHandler() (h *rest.ResourceHandler)
Types ¶
type Config ¶
type Config struct { Database struct { Name string User string Password string } App struct { Host string Port int UrlPrefix string } }
Configuration flag data
type Cup ¶
type Cup struct { Id int64 `json:"id"` Name string `json:"name" sql:"size:255"` Type string `json:"type" sql:"not null"` OwnerId int64 `json:"-"` Owner User Users []User Games []Game CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func DBGetCupsForUser ¶
type Game ¶
type Game struct { Id int64 `json:"id"` Type string `json:"type" sql:"not null"` CupId int64 `json:"cupId"` Cup Cup `json:"-"` Users []User Scores []Score }
func DBGetGamesForUser ¶
type User ¶
type User struct { Id int64 `json:"id"` Login string `json:"login" sql:"size:255;unique"` Password string `json:"-" sql:"size:255"` Email string `json:"email" sql:"type:varchar(100)"` Name string `json:"name" sql:"size:255"` Cups []Cup `json:"-"` Games []Game `json:"-"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt time.Time `json:"-"` }
func DBGetUsersForCup ¶
func DBGetUsersForGame ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.