add types package

This commit is contained in:
2023-01-26 23:51:11 -08:00
parent d55a352b7e
commit 0e40bbab31
2 changed files with 42 additions and 0 deletions

24
types/types.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"time"
)
type Month string
type Commit struct {
LOC int `json:"loc,omitempty"`
Message string `json:"message,omitempty"`
TimeStamp time.Time `json:"ts,omitempty"`
Author string `json:"author,omitempty"`
Repo string `json:"repo,omitempty"`
Path string `json:"path,omitempty"`
}
type DataSet map[time.Time]WorkDay
type WorkDay struct {
Day time.Time `json:"day"`
Count int `json:"count"`
Commits []Commit `json:"commits,omitempty"`
}