Documentation
¶
Index ¶
- Constants
- Variables
- type BaseRepo
- type Car
- type PitInfo
- func (p *PitInfo) GetAveragePitTimeLoss(ctx context.Context) (float64, error)
- func (p *PitInfo) GetPitTimeLoss(ctx context.Context, raceClass entities.RaceClass, trackID uuid.UUID, ...) (*entities.PitTimeLoss, error)
- func (p *PitInfo) GetServiceDurations(ctx context.Context, raceClass entities.RaceClass) (entities.PitServiceDurations, error)
- type Setup
- func (s *Setup) Count(ctx context.Context, opts ...postgresdb.ExecOption) (int64, error)
- func (s *Setup) Create(ctx context.Context, setup *entities.Setup, opts ...postgresdb.ExecOption) error
- func (s *Setup) GetList(ctx context.Context, userID uuid.UUID, opts ...postgresdb.ExecOption) (entities.SetupList, error)
- func (s *Setup) IncrementDownload(ctx context.Context, id uuid.UUID, opts ...postgresdb.ExecOption) error
- func (s *Setup) ListGroupedSetups(ctx context.Context, userID uuid.UUID, orderBy query.OrderBy) ([]entities.SetupGroup, error)
- func (s *Setup) ListUserAIGenerated(ctx context.Context, setupID, userID uuid.UUID) (entities.SetupList, error)
- func (s *Setup) RecordVote(ctx context.Context, setupID, userID uuid.UUID, upvote bool, ...) error
- func (s *Setup) Update(ctx context.Context, setup *entities.Setup, opts ...postgresdb.ExecOption) (int64, error)
- type SetupFile
- type Strategy
- func (s *Strategy) Count(ctx context.Context, opts ...postgresdb.ExecOption) (int64, error)
- func (s *Strategy) Create(ctx context.Context, strategy *entities.SavedStrategy, ...) error
- func (s *Strategy) GetByID(ctx context.Context, id uuid.UUID) (*entities.SavedStrategy, error)
- func (s *Strategy) GetStrategyCalculation(ctx context.Context, id uuid.UUID) (*entities.RaceStrategy, error)
- func (s *Strategy) List(ctx context.Context, opts ...postgresdb.ExecOption) (entities.StrategyList, error)
- func (s *Strategy) RemoveRecalculatedStrategy(ctx context.Context, id uuid.UUID, opts ...postgresdb.ExecOption) error
- func (s *Strategy) StoreRecalculatedStrategy(ctx context.Context, strat *entities.SavedStrategy, ...) error
- func (s *Strategy) StoreStrategyCalculation(ctx context.Context, strat *entities.RaceStrategy, ...) error
- func (s *Strategy) Update(ctx context.Context, strategy *entities.SavedStrategy, ...) error
- type Track
- type TrackLayout
Constants ¶
View Source
const (
ForeignKeyConstraint_SetupLayoutID = "setups_layout_id_fkey"
)
View Source
const (
PostgresRaiseExceptionErrorCode = "P0001"
)
Variables ¶
View Source
var (
ErrTrackAndLayoutMismatch error = fmt.Errorf("The specified layout_id does not belong to the given track_id")
)
Functions ¶
This section is empty.
Types ¶
type PitInfo ¶
type PitInfo struct {
BaseRepo
}
func NewPitInfo ¶
func (*PitInfo) GetAveragePitTimeLoss ¶
func (*PitInfo) GetPitTimeLoss ¶
func (*PitInfo) GetServiceDurations ¶
type Setup ¶
type Setup struct {
BaseRepo
}
func (*Setup) Count ¶
func (s *Setup) Count(ctx context.Context, opts ...postgresdb.ExecOption) (int64, error)
func (*Setup) Create ¶
func (s *Setup) Create(ctx context.Context, setup *entities.Setup, opts ...postgresdb.ExecOption) error
func (*Setup) GetList ¶
func (s *Setup) GetList( ctx context.Context, userID uuid.UUID, opts ...postgresdb.ExecOption, ) (entities.SetupList, error)
func (*Setup) IncrementDownload ¶
func (s *Setup) IncrementDownload(ctx context.Context, id uuid.UUID, opts ...postgresdb.ExecOption) error
func (*Setup) ListGroupedSetups ¶
func (*Setup) ListUserAIGenerated ¶
func (*Setup) RecordVote ¶
func (s *Setup) RecordVote( ctx context.Context, setupID, userID uuid.UUID, upvote bool, opts ...postgresdb.ExecOption, ) error
type SetupFile ¶
type SetupFile struct {
BaseRepo
}
func NewSetupFile ¶
func (*SetupFile) List ¶
func (sf *SetupFile) List( ctx context.Context, setupID uuid.UUID, opts ...postgresdb.ExecOption, ) ([]entities.SetupFile, error)
func (*SetupFile) Store ¶
func (sf *SetupFile) Store(ctx context.Context, file entities.SetupFile, opts ...postgresdb.ExecOption) error
type Strategy ¶
type Strategy struct { BaseRepo // contains filtered or unexported fields }
func NewStrategy ¶
func (*Strategy) Count ¶
func (s *Strategy) Count(ctx context.Context, opts ...postgresdb.ExecOption) (int64, error)
func (*Strategy) Create ¶
func (s *Strategy) Create(ctx context.Context, strategy *entities.SavedStrategy, opts ...postgresdb.ExecOption) error
func (*Strategy) GetStrategyCalculation ¶
func (*Strategy) List ¶
func (s *Strategy) List( ctx context.Context, opts ...postgresdb.ExecOption, ) (entities.StrategyList, error)
func (*Strategy) RemoveRecalculatedStrategy ¶
func (s *Strategy) RemoveRecalculatedStrategy(ctx context.Context, id uuid.UUID, opts ...postgresdb.ExecOption) error
func (*Strategy) StoreRecalculatedStrategy ¶
func (s *Strategy) StoreRecalculatedStrategy( ctx context.Context, strat *entities.SavedStrategy, opts ...postgresdb.ExecOption, ) error
func (*Strategy) StoreStrategyCalculation ¶
func (s *Strategy) StoreStrategyCalculation( ctx context.Context, strat *entities.RaceStrategy, opts ...postgresdb.ExecOption, ) error
func (*Strategy) Update ¶
func (s *Strategy) Update(ctx context.Context, strategy *entities.SavedStrategy, opts ...postgresdb.ExecOption) error
type TrackLayout ¶
type TrackLayout struct {
BaseRepo
}
func NewTrackLayout ¶
func NewTrackLayout(dbpool *pgxpool.Pool) *TrackLayout
func (*TrackLayout) Get ¶
func (t *TrackLayout) Get(ctx context.Context) (entities.TrackLayoutList, error)
func (*TrackLayout) GetByID ¶
func (t *TrackLayout) GetByID(ctx context.Context, id uuid.UUID) (*entities.TrackLayout, error)
func (*TrackLayout) GetTrackDefault ¶
Click to show internal directories.
Click to hide internal directories.