Versions in this module Expand all Collapse all v0 v0.4.0 Feb 17, 2025 Changes in this version + var ErrNotFound = errors.New("not found") + type Controller struct + func New(repo FightersRepository) *Controller + func (c *Controller) HealthCheck() *model.HealthStatus + func (c *Controller) SearchFighters(ctx context.Context, req *model.FightersRequest) ([]*model.Fighter, error) + func (c *Controller) SearchFightersCount(ctx context.Context, req *model.FightersRequest) (int32, error) + type FightersRepository interface + CreateNewFighter func(ctx context.Context, tx pgx.Tx, fighter model.Fighter) (int32, error) + CreateNewFighterStats func(ctx context.Context, tx pgx.Tx, stats model.FighterStats) error + FindFighter func(ctx context.Context, req model.Fighter) (int32, error) + SearchFighters func(ctx context.Context, req *model.FightersRequest) ([]*model.Fighter, error) + SearchFightersCount func(ctx context.Context, req *model.FightersRequest) (int32, error) + UpdateFighter func(ctx context.Context, tx pgx.Tx, fighter model.Fighter) (int32, error) + UpdateFighterStats func(ctx context.Context, tx pgx.Tx, stats model.FighterStats) error