Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PitParameters ¶
type PitParameters interface {
// GetServiceDurations returns the service duration matrix for a specified
// race class in a map by pit service name.
GetServiceDurations(context.Context, entities.RaceClass) (entities.PitServiceDurations, error)
// GetPitTimeLoss returns the time loss for a race class on a specified track
// and layout, that the car will lose decelerating, driving down the pit road
// and accelerating again, as opposed to simply driving on the race track past
// the pits.
GetPitTimeLoss(context.Context, entities.RaceClass, uuid.UUID, *uuid.UUID) (*entities.PitTimeLoss, error)
// GetAveragePitTimeLoss returns the average time loss for all race calssess
// in all track and layout combinations.
GetAveragePitTimeLoss(context.Context) (float64, error)
// GetAllServiceDurations returns the service duration matrix for all race
// classes in a nested map by race class and pit service name.
GetAllServiceDurations(context.Context) (map[entities.RaceClass]entities.PitServiceDurations, error)
}
type Setup ¶
type Setup interface {
Count(context.Context, ...postgresdb.ExecOption) (int64, error)
Create(context.Context, *entities.Setup, ...postgresdb.ExecOption) error
Update(context.Context, *entities.Setup, ...postgresdb.ExecOption) (int64, error)
GetList(context.Context, uuid.UUID, ...postgresdb.ExecOption) (entities.SetupList, error)
ListUserAIGenerated(context.Context, uuid.UUID, uuid.UUID) (entities.SetupList, error)
IncrementDownload(context.Context, uuid.UUID, ...postgresdb.ExecOption) error
RecordVote(context.Context, uuid.UUID, uuid.UUID, bool, ...postgresdb.ExecOption) error
ListGroupedSetups(context.Context, uuid.UUID, query.OrderBy) ([]entities.SetupGroup, error)
}
type SetupStorage ¶
type SetupStorage interface {
Store(context.Context, entities.SetupFile, ...postgresdb.ExecOption) error
List(context.Context, uuid.UUID, ...postgresdb.ExecOption) ([]entities.SetupFile, error)
}
type Strategy ¶
type Strategy interface {
Count(context.Context, ...postgresdb.ExecOption) (int64, error)
Create(context.Context, *entities.SavedStrategy, ...postgresdb.ExecOption) error
Update(context.Context, *entities.SavedStrategy, ...postgresdb.ExecOption) error
GetByID(context.Context, uuid.UUID) (*entities.SavedStrategy, error)
List(context.Context, ...postgresdb.ExecOption) (entities.StrategyList, error)
StoreRecalculatedStrategy(context.Context, *entities.SavedStrategy, ...postgresdb.ExecOption) error
RemoveRecalculatedStrategy(context.Context, uuid.UUID, ...postgresdb.ExecOption) error
StoreStrategyCalculation(context.Context, *entities.RaceStrategy, ...postgresdb.ExecOption) error
GetStrategyCalculation(context.Context, uuid.UUID) (*entities.RaceStrategy, error)
}
type TrackLayout ¶
Click to show internal directories.
Click to hide internal directories.