memory

package
v0.0.0-...-60e5973 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: AGPL-3.0 Imports: 6 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 entity.Person) ([]entity.Group, error)

GetTeams retrieves teams assigned to players.

func (*MemoryPlayerRepository) Update

func (r *MemoryPlayerRepository) Update(p *model.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 *model.Team) error

Add stores a new team in the repository.

func (*MemoryTeamRepository) Get

Get retrieves a team by ID.

func (*MemoryTeamRepository) GetPlayers

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

GetPlayers retrieves a team by ID.

func (*MemoryTeamRepository) Update

func (r *MemoryTeamRepository) Update(t *model.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