From 57374a598a5a55843a2ec741f99b0ec71dfc39ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 8 Jul 2024 02:49:29 +0200 Subject: [PATCH] Add structs for stats and output --- main.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/main.go b/main.go index 77d7425..7314e17 100644 --- a/main.go +++ b/main.go @@ -62,6 +62,22 @@ type FlakeMetadata struct { } `json:"locks"` } +type InputStats struct { + RepoName string `json:"repoName"` + RepoURL string `json:"repoURL"` + OldCommit string `json:"oldCommit"` + LatestCommit string `json:"latestCommit"` + Count int `json:"count"` +} + +type WaybarOutput struct { + Text string `json:"text"` + Alt string `json:"alt"` + Tooltip string `json:"tooltip"` + Class string `json:"class"` + Percentage string `json:"percentage"` +} + func LoadConfig() (*Config, error) { var c Config if path := os.Getenv("GFLAKESTAT_PATH"); path != "" {