Documentation ¶
Index ¶
- Variables
- func NewErrorLogger(l *narada.Log, ctx context.Context, msg string) func(error) error
- func NewLoggedError(l *narada.Log, ctx context.Context, err error, msg interface{}) error
- func NewServerError(msg string) error
- type Duration
- type EntityID
- type Issue
- type IssueID
- type NamedID
- type NewIssue
- type Project
- type ProjectID
- type Report
- type ReportsTotal
- type Timestamp
- type TrackerConfig
- type TrackerCredentials
- type TrackerID
- type User
- type UserID
- type UserKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMaintenance = jsonrpc2.NewError(4, "MAINTENANCE") ErrNotFound = jsonrpc2.NewError(404, "NOT_FOUND") ErrInvalidRequest = jsonrpc2.NewError(101, "TRACKER_VALIDATION_ERROR") ErrInvalidCredentials = jsonrpc2.NewError(102, "INVALID_CREDENTIALS") ErrInvalidTrackerURL = jsonrpc2.NewError(104, "INVALID_TRACKER_URL") ErrProjectNotFound = jsonrpc2.NewError(106, "PROJECT_NOT_FOUND") ErrIssueNotFound = jsonrpc2.NewError(107, "ISSUE_NOT_FOUND") )
Service specific API errors
Functions ¶
func NewErrorLogger ¶
NewErrorLogger creates a curries version of NewLoggedError with context and message set
func NewLoggedError ¶
NewLoggedError logs the error and replaces it with an API error
func NewServerError ¶
NewServerError creates new JSON RPC error with given message
Types ¶
type Issue ¶
type Issue struct { ID IssueID Type NamedID URL string Title string Estimate Duration DueDate Timestamp Spent Duration Done uint8 }
Issue - TG issue
type NewIssue ¶
type NewIssue struct { ProjectID ProjectID Assignee UserID Type EntityID Title string Estimate uint64 }
NewIssue - set of parameters for new issue
type Project ¶
type Project struct { ID ProjectID Title string Description string IssueTypes []NamedID ActivityTypes []NamedID }
Project - TG project entity
type ReportsTotal ¶
type ReportsTotal uint64
ReportsTotal - total amount of reported time in seconds
type TrackerConfig ¶
type TrackerConfig struct { ID TrackerID URL string Credentials TrackerCredentials }
TrackerConfig - TG tracker configuration
type TrackerCredentials ¶
TrackerCredentials - TG tracker credentials
Click to show internal directories.
Click to hide internal directories.