mock

package
v0.0.0-...-c65cdf0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDB

type MockDB struct {
	Users   []*models.User
	UserIds []*models.UserId
	Games   []*models.Game
}

func NewMockDB

func NewMockDB() (*MockDB, error)

func (*MockDB) AddGame

func (m *MockDB) AddGame(g *models.Game) error

func (*MockDB) AddUser

func (m *MockDB) AddUser(u *models.User) error

func (*MockDB) AddUserId

func (m *MockDB) AddUserId(uid *models.UserId) error

func (*MockDB) ChangeGame

func (m *MockDB) ChangeGame(gameNew *models.Game, _ *models.GameMove) error

func (*MockDB) GetAllGames

func (m *MockDB) GetAllGames() ([]*models.Game, error)

func (*MockDB) GetGame

func (m *MockDB) GetGame(gameid string) (*models.Game, error)

func (*MockDB) GetUserIdFromUserId

func (m *MockDB) GetUserIdFromUserId(userid string) (*models.UserId, error)

func (*MockDB) GetUserIdFromUserName

func (m *MockDB) GetUserIdFromUserName(username string) (*models.UserId, error)

func (*MockDB) InviteUser

func (m *MockDB) InviteUser(userid string, gameid string) error

func (*MockDB) JoinUser

func (m *MockDB) JoinUser(userid string, gameid string) error

Jump to

Keyboard shortcuts

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