Documentation ¶
Index ¶
- type Container
- type ContainerMySQLRepo
- func (r *ContainerMySQLRepo) Create(container model.Container) (err error)
- func (r *ContainerMySQLRepo) ExistsByID(id uuid.UUID) (exists bool, err error)
- func (r *ContainerMySQLRepo) ResolveByIDs(ids []uuid.UUID) (containers []model.Container, err error)
- func (r *ContainerMySQLRepo) ResolveByPlayerID(playerID uuid.UUID) (containers []model.Container, err error)
- func (r *ContainerMySQLRepo) ResolvePage(pageNum int, pageSize int) (page *model.Page, err error)
- func (r *ContainerMySQLRepo) Shutdown()
- func (r *ContainerMySQLRepo) Startup()
- func (r *ContainerMySQLRepo) TxBulkUpdate(tx *sqlx.Tx, containers []model.Container) (err error)
- type Player
- type PlayerMySQLRepo
- func (r *PlayerMySQLRepo) Create(player model.Player) (err error)
- func (r *PlayerMySQLRepo) ExistsByID(id uuid.UUID) (exists bool, err error)
- func (r *PlayerMySQLRepo) ResolveByID(id uuid.UUID) (player *model.Player, err error)
- func (r *PlayerMySQLRepo) ResolvePage(pageNum int, pageSize int) (page *model.Page, err error)
- func (r *PlayerMySQLRepo) Shutdown()
- func (r *PlayerMySQLRepo) Startup()
- func (r *PlayerMySQLRepo) TxUpdate(tx *sqlx.Tx, player model.Player) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface { Startup() Shutdown() ExistsByID(id uuid.UUID) (exists bool, err error) Create(container model.Container) (err error) ResolveByIDs(ids []uuid.UUID) (containers []model.Container, err error) ResolveByPlayerID(playerID uuid.UUID) (containers []model.Container, err error) ResolvePage(pageNum int, pageSize int) (page *model.Page, err error) TxBulkUpdate(tx *sqlx.Tx, containers []model.Container) (err error) }
Container is the Container repository interface
type ContainerMySQLRepo ¶
ContainerMySQLRepo is the repository for Containers implemented with MySQL backend
func (*ContainerMySQLRepo) Create ¶
func (r *ContainerMySQLRepo) Create(container model.Container) (err error)
Create creates a new Container
func (*ContainerMySQLRepo) ExistsByID ¶
func (r *ContainerMySQLRepo) ExistsByID(id uuid.UUID) (exists bool, err error)
ExistsByID checks whether a Container exists by its ID
func (*ContainerMySQLRepo) ResolveByIDs ¶
func (r *ContainerMySQLRepo) ResolveByIDs(ids []uuid.UUID) (containers []model.Container, err error)
ResolveByIDs resolves Containers by their IDs
func (*ContainerMySQLRepo) ResolveByPlayerID ¶
func (r *ContainerMySQLRepo) ResolveByPlayerID(playerID uuid.UUID) (containers []model.Container, err error)
ResolveByPlayerID resolves Containers by their Player IDs
func (*ContainerMySQLRepo) ResolvePage ¶
ResolvePage resolves a Page of Containers based on page and page size parameters
func (*ContainerMySQLRepo) Shutdown ¶
func (r *ContainerMySQLRepo) Shutdown()
Shutdown cleans up everything and shuts down
func (*ContainerMySQLRepo) Startup ¶
func (r *ContainerMySQLRepo) Startup()
Startup perform startup functions
func (*ContainerMySQLRepo) TxBulkUpdate ¶
TxBulkUpdate transactionally updates multiple containers with the transaction object passed from elsewhere
type Player ¶
type Player interface { Startup() Shutdown() ExistsByID(id uuid.UUID) (exists bool, err error) Create(player model.Player) (err error) ResolveByID(id uuid.UUID) (player *model.Player, err error) ResolvePage(pageNum int, pageSize int) (page *model.Page, err error) TxUpdate(tx *sqlx.Tx, player model.Player) (err error) }
Player is the Player repository interface
type PlayerMySQLRepo ¶
PlayerMySQLRepo is the repository for Players implemented with MySQL backend
func (*PlayerMySQLRepo) Create ¶
func (r *PlayerMySQLRepo) Create(player model.Player) (err error)
Create creates a new Player
func (*PlayerMySQLRepo) ExistsByID ¶
func (r *PlayerMySQLRepo) ExistsByID(id uuid.UUID) (exists bool, err error)
ExistsByID checks whether a Player exists by its ID
func (*PlayerMySQLRepo) ResolveByID ¶
ResolveByID resolves a Player by its ID
func (*PlayerMySQLRepo) ResolvePage ¶
ResolvePage resolves a Page of Players based on page and page size parameters
func (*PlayerMySQLRepo) Shutdown ¶
func (r *PlayerMySQLRepo) Shutdown()
Shutdown cleans up everything and shuts down
func (*PlayerMySQLRepo) Startup ¶
func (r *PlayerMySQLRepo) Startup()
Startup performs startup functions