Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectBest ¶
func SelectBest( aiScores map[uuid.UUID]int, candidates []Candidate, lastByTea map[uuid.UUID]time.Time, now time.Time, ) (uuid.UUID, int)
SelectBest selects the best tea according to the scoring rules. Inputs: - aiScores: context-aware scores (0..15) provided by AI per tea ID (weather + day-of-week) - candidates: list of candidates with expiration/name - lastByTea: most recent consumption time per tea ID - now: current time Returns the ID of the best tea and its total score.
Types ¶
type Candidate ¶
type Candidate struct {
ID uuid.UUID
Name string
Expiration time.Time // earliest expiration among user records for this tea; zero if unknown
}
Candidate represents a tea candidate for Tea of the Day selection. It intentionally contains only the fields required for scoring to avoid importing API model packages and creating cycles.
Click to show internal directories.
Click to hide internal directories.