Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListSubmissionsParams ¶
type Repository ¶
type Repository struct { Seasons SeasonsRepository SeasonSubmissions SeasonSubmissionsRepository // contains filtered or unexported fields }
func New ¶
func New(db *pgxpool.Pool) *Repository
type SeasonSubmissionsRepository ¶
type SeasonSubmissionsRepository interface { List(seasonId int, params ListSubmissionsParams) ([]*models.Submission, int, error) Create(submission *models.Submission) (*models.Submission, error) }
SeasonSubmissionsRepository is the interface that a season submissions repository should conform to.
func NewSeasonSubmissionsRepository ¶
func NewSeasonSubmissionsRepository(db *pgxpool.Pool) SeasonSubmissionsRepository
NewSeasonSubmissionsRepository returns a new instance of a season submissions repository.
type SeasonsRepository ¶
type SeasonsRepository interface { // List returns a list of seasons. List(limit, offset int) ([]*models.Season, int, error) // Current returns the current season. Current() (*models.Season, error) // Create creates a new season. Create(season *models.Season) (*models.Season, error) Statistics(seasonId int) (*models.Statistics, []*models.Statistics, error) }
SeasonsRepository is the interface that a seasons repository should conform to.
func NewSeasonsRepository ¶
func NewSeasonsRepository(db *pgxpool.Pool) SeasonsRepository
NewSeasonsRepository returns a new instance of a seasonsRepository.
Click to show internal directories.
Click to hide internal directories.