reports

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DriverRallyReport

func DriverRallyReport(rallyId int64, store *database.Store, config *configuration.Config) error

func ExportClassReport

func ExportClassReport(rallyID int64, store *database.Store, cfg *configuration.Config) error

ExportClassReport generates class tables for a single rally (rallyIDStr) AND championship totals across all rallies, then writes class_report.md.

func ExportDriverSummaries

func ExportDriverSummaries(store *database.Store, config *configuration.Config) error

func ExportReport

func ExportReport(rallyId int64, store *database.Store, config *configuration.Config) error

Types

type ChampDriverRow

type ChampDriverRow struct {
	UserID      int64
	UserName    string
	TotalPoints int64
	Pos         int64
}

type ChampSection

type ChampSection struct {
	ClassName string
	Rows      []ChampDriverRow
}

type ClassPointsRow

type ClassPointsRow struct {
	RallyID  int64
	ClassID  int64
	UserID   int64
	UserName string
	Time3    time.Duration
	Pos      int64
	Points   int64
}

type ClassReportData

type ClassReportData struct {
	Rally        RallySection
	Championship []ChampSection
}

type ClassTable

type ClassTable struct {
	ClassName string
	Rows      []ClassPointsRow
}

type DriverReport

type DriverReport struct {
	Stages  []database.StageSummary
	Overall []SummaryRow
}

type DriverReportConfig

type DriverReportConfig struct {
	Overall   []database.RallyOverall
	Finishers []database.RallyOverall
	Config    RallyConfig
}

type RallyConfig

type RallyConfig struct {
	WinnerTime   time.Duration
	TotalDrivers int
	AvgTime      time.Duration
	AvgPenalty   float64
	AvgSuper     float64
}

type RallySection

type RallySection struct {
	RallyID int64
	Classes []ClassTable
}

type ReportData

type ReportData struct {
	Rally        []ScoreRecord
	Championship []SeasonsStandings
}

type ScoreRecord

type ScoreRecord struct {
	Raw    database.RallyOverall
	Points int64
}

ScoreRecord holds the raw data and the assigned points for each record.

type SeasonsStandings

type SeasonsStandings struct {
	UserId   int64
	UserName string
	Points   int64
}

type SummaryRow

type SummaryRow struct {
	Metric      string
	DriverValue string
	FieldAvg    string
	RankText    string
}

Jump to

Keyboard shortcuts

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