memory

package
v0.0.0-...-61e3c9a Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryPlayerRepository

type MemoryPlayerRepository struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MemoryPlayerRepository is an in-memory player repository.

func NewMemoryPlayerRepository

func NewMemoryPlayerRepository() *MemoryPlayerRepository

NewMemoryPlayerRepository intializes an in-memory player repository.

func (*MemoryPlayerRepository) Add

Add stores a new player in the repository.

func (*MemoryPlayerRepository) Get

Get retrieves a player by ID.

func (*MemoryPlayerRepository) GetTeams

func (r *MemoryPlayerRepository) GetTeams(p core.Person) ([]core.Group, error)

GetTeams retrieves teams assigned to players.

func (*MemoryPlayerRepository) Update

func (r *MemoryPlayerRepository) Update(p *player.Player) error

Update appends changes to player in the repository.

type MemoryTeamRepository

type MemoryTeamRepository struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MemoryTeamRepository is an in-memory team repository.

func NewMemoryTeamRepository

func NewMemoryTeamRepository() *MemoryTeamRepository

NewMemoryTeamRepository intializes an in-memory team repository.

func (*MemoryTeamRepository) Add

func (r *MemoryTeamRepository) Add(t *team.Team) error

Add stores a new team in the repository.

func (*MemoryTeamRepository) Get

func (r *MemoryTeamRepository) Get(g core.Group) (*team.Team, error)

Get retrieves a team by ID.

func (*MemoryTeamRepository) GetPlayers

func (r *MemoryTeamRepository) GetPlayers(p core.Group) ([]core.Person, error)

GetPlayers retrieves a team by ID.

func (*MemoryTeamRepository) Update

func (r *MemoryTeamRepository) Update(t *team.Team) error

Update appends changes to team in the repository.

Jump to

Keyboard shortcuts

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