sqlstore

package
v0.0.0-...-12f1d27 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestDB

func TestDB(t *testing.T, databaseURL string) (*sql.DB, func(...string))

TestDB func

Types

type LobbyRepository

type LobbyRepository struct {
	// contains filtered or unexported fields
}

LobbyRepository struct

func (*LobbyRepository) CheckStatus

func (r *LobbyRepository) CheckStatus(token string) (string, error)

CheckStatus func

func (*LobbyRepository) ChooseSpyPlayersInLobby

func (r *LobbyRepository) ChooseSpyPlayersInLobby(l *model.Lobby) error

ChooseSpyPlayersInLobby func

func (*LobbyRepository) ConnectUserToLobby

func (r *LobbyRepository) ConnectUserToLobby(l *model.Lobby) error

ConnectUserToLobby func

func (*LobbyRepository) Create

func (r *LobbyRepository) Create(l *model.Lobby) error

Create func

func (*LobbyRepository) FindByToken

func (r *LobbyRepository) FindByToken(token string) (*model.Lobby, error)

FindByToken func

func (*LobbyRepository) StartGame

func (r *LobbyRepository) StartGame(l *model.Lobby) error

StartGame func

func (*LobbyRepository) WonForPeaceful

func (r *LobbyRepository) WonForPeaceful(l *model.Lobby) (string, error)

WonForPeaceful func

func (*LobbyRepository) WonForSpy

func (r *LobbyRepository) WonForSpy(l *model.Lobby) (string, error)

WonForSpy func

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store struct

func New

func New(db *sql.DB) *Store

New func

func (*Store) Lobby

func (s *Store) Lobby() store.LobbyRepository

Lobby func

func (*Store) User

func (s *Store) User() store.UserRepository

User func

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

UserRepository struct

func (*UserRepository) Create

func (r *UserRepository) Create(u *model.User) error

Create func

func (*UserRepository) Find

func (r *UserRepository) Find(id int) (*model.User, error)

Find func

func (*UserRepository) FindByLogin

func (r *UserRepository) FindByLogin(login string) (*model.User, error)

FindByLogin func

Jump to

Keyboard shortcuts

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