Documentation ¶
Index ¶
- type GameStorage
- func (storage GameStorage) FindAllGamesForUser(user model.User) (model.Games, error)
- func (storage GameStorage) FindAllOpenGamesForUser(user model.User) (model.Games, error)
- func (storage GameStorage) FindOne(gameId string) (model.Game, error)
- func (storage GameStorage) Insert(game *model.Game) error
- func (storage GameStorage) JoinGame(game *model.Game, joiningUser model.User) error
- func (storage GameStorage) Turn(game *model.Game, player model.User, position int) (model.Turn, error)
- type UserStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameStorage ¶
type GameStorage struct {
// contains filtered or unexported fields
}
func NewGameStorage ¶
func NewGameStorage(session *mgo.Session, databaseName string) *GameStorage
func (GameStorage) FindAllGamesForUser ¶
func (GameStorage) FindAllOpenGamesForUser ¶
type UserStorage ¶
type UserStorage struct {
// contains filtered or unexported fields
}
func NewUserStorage ¶
func NewUserStorage(session *mgo.Session, databaseName string) *UserStorage
func (UserStorage) FindByUsername ¶
func (storage UserStorage) FindByUsername(username string) (model.User, error)
Click to show internal directories.
Click to hide internal directories.