Documentation
¶
Index ¶
- Variables
- func Execute(cfg *config.Config) error
- func ExtractParsedTimeFromArgs(args []string, clientName string) (time.Time, time.Time, error)
- func ExtractTime(input string, client *models.Client) (time.Time, time.Time, error)
- func FilterSessionsByClient(sessions *[]models.Session, clientName string) *[]models.Session
- func GetClientIfExists(name string) error
- func GetRelativeSessionsFromArgs(args []string, clientName string) []models.Session
- func GetSessionByID(id string) (*models.Session, error)
- func GetSessionsWithTimeframe(timeframe ReportTimeframe) []models.Session
- func SortSessions(slice *[]models.Session, descending bool)
- func Sync(cmd *cobra.Command) error
- type ReportTimeframe
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Config *config.Config SessionRepository repositories.SessionRepository ClientRepository repositories.ClientRepository Puncher *puncher.Puncher Source *sync.SyncSource )
common instances
View Source
var (
NoAvailableDataError = errors.New("No available data")
)
Functions ¶
func ExtractTime ¶
func FilterSessionsByClient ¶
func GetClientIfExists ¶
func GetSessionsWithTimeframe ¶
func GetSessionsWithTimeframe(timeframe ReportTimeframe) []models.Session
func SortSessions ¶
Types ¶
type ReportTimeframe ¶
type ReportTimeframe string
const ( REPORT_TIMEFRAME_DAY ReportTimeframe = "day" REPORT_TIMEFRAME_WEEK ReportTimeframe = "week" REPORT_TIMEFRAME_MONTH ReportTimeframe = "month" REPORT_TIMEFRAME_YEAR ReportTimeframe = "year" )
func ExtractTimeframeFromFlags ¶
func ExtractTimeframeFromFlags() (*ReportTimeframe, error)
Click to show internal directories.
Click to hide internal directories.