Add structs for stats and output
This commit is contained in:
parent
9c21a0f10b
commit
57374a598a
16
main.go
16
main.go
@ -62,6 +62,22 @@ type FlakeMetadata struct {
|
|||||||
} `json:"locks"`
|
} `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) {
|
func LoadConfig() (*Config, error) {
|
||||||
var c Config
|
var c Config
|
||||||
if path := os.Getenv("GFLAKESTAT_PATH"); path != "" {
|
if path := os.Getenv("GFLAKESTAT_PATH"); path != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user