From e5ab7ec5efc551a49b281110a9009431144013d4 Mon Sep 17 00:00:00 2001 From: agatha Date: Sun, 12 May 2024 14:13:24 -0400 Subject: [PATCH] add Record and Note types --- main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/main.go b/main.go index 8b541dc..f0831e8 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,18 @@ func init() { readingsFilename = filepath.Join(ketotrackDir, "readings.json") } +// Record holds a pointer to a Reading or Note. +type Record struct { + Reading *Reading `json:"reading,omitempty"` + Note *Note `json:"note,omitempty"` +} + +// Note holds a text note along with the time the note was taken. +type Note struct { + Time time.Time `json:"time"` + Text string `json:"text"` +} + // Reading holds the glucose and ketone level measurements along with the time the measurements were taken. type Reading struct { Time time.Time `json:"time"`