Documentation ¶ Index ¶ Constants Variables type Game type Games func (g Games) FetchAll() []*Game func (g Games) GameByCode(code string, logger *slog.Logger) (*Game, error) type Service func NewService(logger *slog.Logger) Service Constants ¶ View Source const ( YGO = "YGO" POC = "POC" VG = "VG" OPC = "OPC" WS = "WS" ) Constants for active game codes. Variables ¶ View Source var ErrGameNotFound = errors.New("game not found") Functions ¶ This section is empty. Types ¶ type Game ¶ type Game struct { Title string Image string Code string Endpoint string ImageEndpoint string } type Games ¶ type Games map[string]*Game func (Games) FetchAll ¶ func (g Games) FetchAll() []*Game func (Games) GameByCode ¶ func (g Games) GameByCode(code string, logger *slog.Logger) (*Game, error) type Service ¶ type Service interface { Fetch(ctx context.Context, code string) (*Game, error) FetchAll(ctx context.Context) ([]*Game, error) } func NewService ¶ func NewService(logger *slog.Logger) Service Source Files ¶ View all Source files codes.go game.go service.go Click to show internal directories. Click to hide internal directories.