timeutils

package
v0.0.2-0...-17be355 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

data structure for shifts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetString

func GetString(j Job) string

GetString returns pretty string representation

Types

type Job

type Job struct {
	StartTime   string   `json:"starttime"`
	EndTime     string   `json:"endtime"`
	ID          string   `json:"id"`
	ProjectName string   `json:"name"`
	Tags        []string `json:"tags"`
	Description string   `json:"description"`
}

Job a single job unit structure

func (Job) EndJob

func (j Job) EndJob()

EndJob test

func (Job) StartJob

func (j Job) StartJob(args []string) Job

StartJob test

type Project

type Project struct {
	Name         string    `json:"name"`
	Company      string    `json:"company"`
	Tags         []string  `json:"tags"`
	Description  string    `json:"description"`
	SheduledTime time.Time `json:"sheduledTime"`
	TotalTime    time.Time `json:"totalTime"`
	Jobs         []Job     `json:"job"`
}

Project data structure

type Project2

type Project2 struct {
	Name         string    `json:"name"`
	Company      string    `json:"company"`
	Tags         []string  `json:"tags"`
	Description  string    `json:"description"`
	SheduledTime time.Time `json:"sheduledTime"`
	TotalTime    time.Time `json:"totalTime"`
	Jobs         []Job     `json:"job"`
}

Project a 2Project structure

type TimeStats

type TimeStats struct {
	// contains filtered or unexported fields
}

TimeStats represtents the overall hours stats

type TimeTable

type TimeTable struct {
	Name         string    `json:"name"`
	MonthlyHours int       `json:"monthlyhours"`
	WeeklyHours  int       `json:"weeklyhours"`
	DailyHours   int       `json:"dailyhours"`
	Workdays     bool      `json:"workdays"`
	RunningJob   string    `json:"runningjob"`
	Days         []day     `json:"days"`
	Projects     []Project `json:"projects"`
}

TimeTable the root file structure

func (TimeTable) AddProject

func (tt TimeTable) AddProject(name string)

AddProject adds new project if it not exists, by unique name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL