storage

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateStats added in v0.1.3

func UpdateStats(test database.TestResult)

Types

type HistoryRepository

type HistoryRepository interface {
	Save(result database.TestResult) error
	GetHistory() (database.History, error)
}

type JSONRepository

type JSONRepository struct{}

func (*JSONRepository) GetHistory

func (r *JSONRepository) GetHistory() (database.History, error)

func (*JSONRepository) Save

func (r *JSONRepository) Save(test database.TestResult) error

Save saves test result to $CONFIG_PATH/couik/history.json

type Stats added in v0.1.3

type Stats struct {
	BestWPM       float64   `json:"best_wpm"`
	CurrentStreak int       `json:"current_streak"`
	LastTestDate  time.Time `json:"last_test_date"`
	TotalTests    int       `json:"total_tests"`
}

user personal best

func LoadPRs added in v0.1.3

func LoadPRs() Stats

Jump to

Keyboard shortcuts

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