Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ConvertLegacyRecords ¶
func ConvertLegacyRecords(r *LegacyReport) (records []TimeRecord, projects []Project)
Types ¶
type LegacyProject ¶
type LegacyProject struct { TimeRecords map[string]LegacyTimeRecord Name string ProjectTotal float32 ClockTime float32 Report string }
func (LegacyProject) String ¶
func (p LegacyProject) String() string
type LegacyReport ¶
type LegacyReport struct { ReportDate string Projects map[string]LegacyProject Notes []string UnmatchedLines []string TimeRecords []LegacyTimeRecord }
func ImportReportFromJSON ¶
func ImportReportFromJSON(r io.Reader) (*LegacyReport, error)
func (LegacyReport) String ¶
func (r LegacyReport) String() string
type LegacyTimeRecord ¶
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
func NewMongoDB ¶
func (*MongoDB) GetRecords ¶
func (d *MongoDB) GetRecords() []TimeRecord
func (*MongoDB) SaveRecords ¶
func (d *MongoDB) SaveRecords(records []TimeRecord) error
type Project ¶
func NewProject ¶
type RelDB ¶
type RelDB struct {
// contains filtered or unexported fields
}
func (*RelDB) GetRecords ¶
func (d *RelDB) GetRecords() []TimeRecord
func (*RelDB) SaveRecords ¶
func (d *RelDB) SaveRecords(records []TimeRecord) error
type TimeRecord ¶
type TimeRecord struct { ID util.UUID `bson:"_id"` Begin time.Time Duration time.Duration DurationString string Project string Notes string Tags []string }
func ConvertCSVRecords ¶
func ConvertCSVRecords(r io.Reader, project string) ([]TimeRecord, error)
func NewTimeRecord ¶
func NewTimeRecord() TimeRecord
func (*TimeRecord) SetDate ¶
func (r *TimeRecord) SetDate(date time.Time)
func (*TimeRecord) SetEndPartial ¶
func (r *TimeRecord) SetEndPartial(t time.Time, fraction float64) error
func (*TimeRecord) String ¶
func (r *TimeRecord) String() string
Click to show internal directories.
Click to hide internal directories.