Documentation ¶
Index ¶
- type ProjectDeleteRequest
- type ProjectWeekRequest
- type TimeData
- func (c *TimeData) AddInitialProjectTimeEntries(profileId int, accountId int, start time.Time, end time.Time, projectId int, ...) error
- func (c *TimeData) DeleteProjectForDates(profileId int, accountId int, projectId int, taskId int, start time.Time, ...) error
- func (c *TimeData) GetTimeEntriesForRange(profileId int, accountId int, start time.Time, end time.Time) ([]*TimeEntry, error)
- func (c *TimeData) SaveOrUpdateTimeEntries(entries []*TimeEntry) error
- func (c *TimeData) UpdateTimeEntries(entries []*TimeEntry) error
- type TimeEntry
- type TimeEntryRangeRequest
- type TimeEntryRequest
- type TimeEntryResponse
- type TimeRangeResponse
- type TimeResource
- func (c *TimeResource) AddInitialProjectTimeEntries(profileId int, accountId int, start time.Time, end time.Time, projectId int, ...) *api.Error
- func (c *TimeResource) DeleteProjectForDates(profileId int, accountId int, projectId int, taskId int, start time.Time, ...) *api.Error
- func (c *TimeResource) GetTimeEntriesForRange(profileId int, accountId int, start time.Time, end time.Time) ([]*TimeEntry, *api.Error)
- func (c *TimeResource) SaveOrUpdateTimeEntries(entries []*TimeEntry) *api.Error
- func (c *TimeResource) UpdateTimeEntries(entries []*TimeEntry) *api.Error
- type TimeRouter
- type TimeService
- type TimeStore
- type Timesheet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectDeleteRequest ¶
type ProjectWeekRequest ¶
type TimeData ¶
type TimeData struct {
// contains filtered or unexported fields
}
ProfileData implements database operations for user profiles
func (*TimeData) AddInitialProjectTimeEntries ¶
func (c *TimeData) AddInitialProjectTimeEntries(profileId int, accountId int, start time.Time, end time.Time, projectId int, taskId int) error
Add 0.0 values for all the days between start and end for the project/task
func (*TimeData) DeleteProjectForDates ¶
func (*TimeData) GetTimeEntriesForRange ¶
func (*TimeData) SaveOrUpdateTimeEntries ¶
func (*TimeData) UpdateTimeEntries ¶
type TimeEntry ¶
type TimeEntry struct { Day time.Time `json:"-"` Hours float64 `json:"-"` AccountId int `json:"-" db:"account_id"` ProfileId int `json:"-" db:"profile_id"` ProjectId int `json:"-" db:"project_id"` TaskId int `json:"-" db:"task_id"` ClientName string `json:"-" db:"client_name"` ProjectName string `json:"-" db:"project_name"` TaskName string `json:"-" db:"task_name"` }
type TimeEntryRangeRequest ¶
type TimeEntryRangeRequest struct {
Entries []TimeEntryRequest
}
type TimeEntryRequest ¶
type TimeEntryResponse ¶
type TimeEntryResponse struct { Day string `json:"day"` Hours float64 `json:"hours"` ProjectId int `json:"projectId"` TaskId int `json:"taskId"` ClientName string `json:"clientName"` ProjectName string `json:"projectName"` TaskName string `json:"taskName"` }
func NewTimeEntryResponse ¶
func NewTimeEntryResponse(entry *TimeEntry) *TimeEntryResponse
type TimeRangeResponse ¶
type TimeRangeResponse struct { Start string `json:"start"` End string `json:"end"` TimeEntries []*TimeEntryResponse `json:"entries"` }
func NewTimeRange ¶
type TimeResource ¶
type TimeResource struct {
// contains filtered or unexported fields
}
func (*TimeResource) AddInitialProjectTimeEntries ¶
func (*TimeResource) DeleteProjectForDates ¶
func (*TimeResource) GetTimeEntriesForRange ¶
func (*TimeResource) SaveOrUpdateTimeEntries ¶
func (c *TimeResource) SaveOrUpdateTimeEntries(entries []*TimeEntry) *api.Error
func (*TimeResource) UpdateTimeEntries ¶
func (c *TimeResource) UpdateTimeEntries(entries []*TimeEntry) *api.Error
type TimeRouter ¶
type TimeRouter struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(store TimeStore, profileRouter *profile.ProfileRouter) *TimeRouter
func (*TimeRouter) Router ¶
func (a *TimeRouter) Router() *chi.Mux
type TimeService ¶
type TimeService interface { GetTimeEntriesForRange(profileId int, accountId int, start time.Time, end time.Time) ([]*TimeEntry, *api.Error) SaveOrUpdateTimeEntries(entries []*TimeEntry) *api.Error UpdateTimeEntries(entries []*TimeEntry) *api.Error AddInitialProjectTimeEntries(profileId int, accountId int, start time.Time, end time.Time, projectId int, taskId int) *api.Error DeleteProjectForDates(profileId int, accountId int, projectId int, taskId int, start time.Time, end time.Time) *api.Error }
func NewTimeService ¶
func NewTimeService(store TimeStore) TimeService
type TimeStore ¶
type TimeStore interface { GetTimeEntriesForRange(profileId int, accountId int, start time.Time, end time.Time) ([]*TimeEntry, error) SaveOrUpdateTimeEntries(entries []*TimeEntry) error UpdateTimeEntries(entries []*TimeEntry) error AddInitialProjectTimeEntries(profileId int, accountId int, start time.Time, end time.Time, projectId int, taskId int) error DeleteProjectForDates(profileId int, accountId int, projectId int, taskId int, start time.Time, end time.Time) error }
func NewTimeStore ¶
Click to show internal directories.
Click to hide internal directories.