franchise

package
v0.0.0-...-5888283 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FranchiseUpdate

type FranchiseUpdate struct {
	NBALeagueID        string
	NBATeamID          int
	Name               string
	Nickname           string
	City               string
	State              string
	Country            string
	StartYear          int
	EndYear            int
	Years              int
	Games              int
	Wins               int
	Losses             int
	PlayoffAppearances int
	DivisionTitles     int
	ConferenceTitles   int
	LeagueTitles       int
	Active             bool
}

type Handler

type Handler interface {
	Routes() chi.Router
	List(w http.ResponseWriter, r *http.Request)
	Get(w http.ResponseWriter, r *http.Request)
	UpdateFranchises(w http.ResponseWriter, r *http.Request)
}

func NewHandler

func NewHandler(logger *slog.Logger, franchiseService Service) Handler

type Service

type Service interface {
	UpdateFranchises(ctx context.Context, logger *slog.Logger) ([]api.Franchise, error)
}

func NewService

func NewService(franchiseStore Store, teamService team.Service, teamSeasonService team_season.Service, nbaClient nba.Client) Service

type Store

type Store interface {
	UpdateFranchises(ctx context.Context, franchises []FranchiseUpdate) ([]api.Franchise, error)
}

Jump to

Keyboard shortcuts

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