Documentation ¶
Overview ¶
Package domain is a generated GoMock package.
Index ¶
- func GenerateWeekReport(now time.Time, sessionService *SessionService) (*weekData, error)
- func HourAndMinuteFromString(str string) (hour int, minute int, err error)
- func PrintByDay(ss *SessionService, since time.Duration)
- func PrintWithTime(ss *SessionService, since time.Duration)
- func Score(challenge string) int
- func SortDays(queryData Days)
- type Day
- type Days
- type MockSessionRepo
- type MockSessionRepoMockRecorder
- type Session
- type SessionRepo
- type SessionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateWeekReport ¶ added in v0.0.13
func GenerateWeekReport(now time.Time, sessionService *SessionService) (*weekData, error)
GenerateWeekReport generates the data of the entire week in a tabular format
func HourAndMinuteFromString ¶ added in v0.0.11
func PrintByDay ¶ added in v0.0.11
func PrintByDay(ss *SessionService, since time.Duration)
PrintByDay prints the data per day with items of each day in a table
func PrintWithTime ¶ added in v0.0.11
func PrintWithTime(ss *SessionService, since time.Duration)
Types ¶
type MockSessionRepo ¶
type MockSessionRepo struct {
// contains filtered or unexported fields
}
MockSessionRepo is a mock of SessionRepo interface.
func NewMockSessionRepo ¶
func NewMockSessionRepo(ctrl *gomock.Controller) *MockSessionRepo
NewMockSessionRepo creates a new mock instance.
func (*MockSessionRepo) EXPECT ¶
func (m *MockSessionRepo) EXPECT() *MockSessionRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSessionRepo) Query ¶ added in v0.0.10
func (m *MockSessionRepo) Query(duration time.Duration) ([]*Session, error)
Query mocks base method.
func (*MockSessionRepo) Save ¶
func (m *MockSessionRepo) Save(save *Session)
Save mocks base method.
type MockSessionRepoMockRecorder ¶
type MockSessionRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockSessionRepoMockRecorder is the mock recorder for MockSessionRepo.
func (*MockSessionRepoMockRecorder) Pop ¶
func (mr *MockSessionRepoMockRecorder) Pop() *gomock.Call
Pop indicates an expected call of Pop.
func (*MockSessionRepoMockRecorder) Query ¶ added in v0.0.10
func (mr *MockSessionRepoMockRecorder) Query(duration interface{}) *gomock.Call
Query indicates an expected call of Query.
func (*MockSessionRepoMockRecorder) Save ¶
func (mr *MockSessionRepoMockRecorder) Save(save interface{}) *gomock.Call
Save indicates an expected call of Save.
type Session ¶
type Session struct { Time time.Time // Time when the item was done Challenge string // Challenge is anxiety, flow or boredom }
Session represents a single work session.
type SessionRepo ¶
type SessionService ¶
type SessionService struct {
// contains filtered or unexported fields
}
func NewSessionService ¶
func NewSessionService(repo SessionRepo) *SessionService
func (*SessionService) Pop ¶
func (s *SessionService) Pop()
func (*SessionService) ReportForPreviousDays ¶ added in v0.0.10
func (s *SessionService) ReportForPreviousDays(daysBack time.Duration) (Days, error)
func (*SessionService) Save ¶
func (s *SessionService) Save(item *Session) error