Documentation ¶
Index ¶
- func Add(c client.AmountClient, u ui.Interactor, ticketID int64, a float64, ...) error
- func Create(c client.TicketClient, u ui.Interactor, description string) error
- func EditAmounts(c client.AmountClient, u ui.Interactor, tIDs []int64, amountedAfter time.Time, ...) error
- func EditTimes(c client.TimeClient, u ui.Interactor, tIDs []int64, start time.Time, ...) error
- func ListTickets(c client.TicketClient, u ui.Interactor) error
- func ListTimes(c client.TimeClient, u ui.Interactor) error
- func Start(c client.TimeClient, u ui.Interactor, ticketID int64, t *time.Time) error
- func Stop(c client.TimeClient, u ui.Interactor, timeID int64, t *time.Time) error
- type Amount
- type LineErr
- type LineErrs
- type Ticket
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(c client.AmountClient, u ui.Interactor, ticketID int64, a float64, amountedAt time.Time) error
Add adds a new amount to a ticket
func Create ¶
func Create(c client.TicketClient, u ui.Interactor, description string) error
Create adds a new ticket to the user's list of tickets
func EditAmounts ¶
func EditAmounts(c client.AmountClient, u ui.Interactor, tIDs []int64, amountedAfter time.Time, amountedBefore time.Time) error
EditAmounts opens an editor with the amounts returned by user-entered query parameters and allows the user to edit the amounts
func EditTimes ¶
func EditTimes(c client.TimeClient, u ui.Interactor, tIDs []int64, start time.Time, end time.Time) error
EditTimes opens an editor with the times returned by user-entered query parameters and allows the user to edit the times
func ListTickets ¶
func ListTickets(c client.TicketClient, u ui.Interactor) error
ListTickets displays the tickets assigned to a user
func ListTimes ¶
func ListTimes(c client.TimeClient, u ui.Interactor) error
ListTimes lists the open times (without end time) associated with a user.
func Start ¶
func Start(c client.TimeClient, u ui.Interactor, ticketID int64, t *time.Time) error
Start creates a new time with a StartedAt value of the current time.
func Stop ¶
func Stop(c client.TimeClient, u ui.Interactor, timeID int64, t *time.Time) error
Stop sets a time's EndedAt value to the current time.
Types ¶
type Amount ¶
type Amount struct { ID int64 `json:"id,omitempty"` TicketID int64 `json:"ticket_id"` Description string `json:"ticket_description,omitempty"` Amount float64 `json:"amount"` AmountedAt time.Time `json:"amounted_at"` }
Amount is numerical value tied to a ticket at a specific time
type LineErrs ¶
type LineErrs struct {
LineErrors []LineErr
}
LineErrs holds a slice of LineErrs
type Ticket ¶
type Ticket struct { ID int64 `json:"id"` Description string `json:"description"` ClosedAt *time.Time `json:"closed_at"` DaysInWeek float32 `json:"days_in_week"` Priority int64 `json:"priority"` }
Ticket is an activity that a user can log time or amounts against
type Time ¶
type Time struct { ID int64 `json:"id,omitempty"` TicketID int64 `json:"ticket_id,omitempty"` Description string `json:"ticket_description,omitempty"` StartedAt *time.Time `json:"started_at,omitempty"` EndedAt *time.Time `json:"ended_at,omitempty"` }
Time is a block of time assigned to a ticket.