Documentation ¶
Index ¶
- Variables
- type ActivityID
- type ExtendedPlanning
- type IssueID
- type ModifySpentTimeFunc
- type NewActivePlanning
- type NewPlanning
- type PlannedTime
- type Planning
- type PlanningID
- type PlanningReport
- type PlanningStatus
- type ProjectID
- type SpentTime
- type SpentTimeHistory
- type SpentTimeReport
- type SpentTimeStatus
- type Status
- type TrackerID
Constants ¶
This section is empty.
Variables ¶
var ( ErrTimeout = jsonrpc2.NewError(0, "TIMEOUT") ErrMaintenance = jsonrpc2.NewError(4, "MAINTENANCE") )
Global error codes
var ( ErrInvalidPlanningID = jsonrpc2.NewError(100, "INVALID_PLANNING_ID") ErrNoActivePlanning = jsonrpc2.NewError(101, "NO_ACTIVE_PLANNING") ErrInvalidUserID = jsonrpc2.NewError(102, "INVALID_USER_ID") ErrPlanningClosed = jsonrpc2.NewError(103, "PLANNING_CLOSED") ErrPlanningOutdated = jsonrpc2.NewError(104, "PLANNING_OUTDATED") ErrOutdatedReport = jsonrpc2.NewError(105, "OUTDATED_REPORT") ErrNegativeSpentTime = jsonrpc2.NewError(106, "NEGATIVE_SPENT_TIME") )
Application specific codes
Functions ¶
This section is empty.
Types ¶
type ExtendedPlanning ¶
ExtendedPlanning is Planning with additional information
type ModifySpentTimeFunc ¶
ModifySpentTimeFunc is function to modify SpentTime for user
type NewActivePlanning ¶
type NewActivePlanning struct { UserID ctxtg.UserID PlanningID PlanningID Time int64 }
NewActivePlanning represents new active planning for user
type NewPlanning ¶
type NewPlanning struct { UserID ctxtg.UserID ProjectID ProjectID TrackerID TrackerID IssueID IssueID IssueTitle string IssueURL string IssueEstimation int64 IssueDueDate int64 IssueDone int ActivityID ActivityID Estimation int64 }
NewPlanning is representation of new user plan for today
type PlannedTime ¶
type PlannedTime struct { ID int64 `db:"id"` PlanningID PlanningID `db:"planning_id"` Estimation int64 `db:"estimation"` Reason string `db:"reason"` CreatedAt int64 `db:"created_at"` }
PlannedTime represents expected time to spent on PlanningID by user
type Planning ¶
type Planning struct { ID PlanningID `db:"id"` UserID ctxtg.UserID `db:"user_id"` Status PlanningStatus `db:"-"` ProjectID ProjectID `db:"project_id"` TrackerID TrackerID `db:"tracker_id"` IssueID IssueID `db:"issue_id"` IssueTitle string `db:"issue_title"` IssueURL string `db:"issue_url"` IssueEstimation int64 `db:"issue_estim"` IssueDueDate int64 `db:"issue_due_date"` IssueDone int `db:"issue_done"` ActivityID ActivityID `db:"activity_id"` SpentOnline int `db:"spent_online"` SpentOffline int `db:"spent_offline"` Reported int64 `db:"reported"` CreatedAt int64 `db:"created_at"` }
Planning represents user plan for today
type PlanningReport ¶
type PlanningReport struct { PlanningID PlanningID Progress int Time int64 }
PlanningReport represents final report in the end of planning
type PlanningStatus ¶
type PlanningStatus string
PlanningStatus is type for open or closed planning statuses
const ( Open PlanningStatus = "OPEN" Closed PlanningStatus = "CLOSED" )
Available planning statuses
type SpentTime ¶
type SpentTime struct { UserID ctxtg.UserID PlanningID PlanningID PlanningCreatedAt int64 Started int64 Last int64 SpentOnline int }
SpentTime represents user's spent time on planning
type SpentTimeHistory ¶
type SpentTimeHistory struct { PlanningID PlanningID `db:"planning_id"` Spent int `db:"spent"` StartedAt int64 `db:"started_at"` EndedAt int64 `db:"ended_at"` Status SpentTimeStatus `db:"-"` }
SpentTimeHistory represents small amount of history
type SpentTimeReport ¶
type SpentTimeReport struct { UserID ctxtg.UserID PlanningID PlanningID Spent int Time int64 }
SpentTimeReport represents spent time on planning report
type SpentTimeStatus ¶
type SpentTimeStatus string
SpentTimeStatus is type for online or offline spent time status
const ( Online SpentTimeStatus = "ONLINE" Offline SpentTimeStatus = "OFFLINE" )
Available spent time statuses