Documentation
¶
Index ¶
- func FormatDuration(seconds float64) string
- type Client
- func (c *Client) CreateTimeEntry(workspaceId int, entry data.TimeEntry) (*data.TimeEntry, error)
- func (c *Client) GetCurrentTimerEntry() (*data.TimeEntryItem, error)
- func (c *Client) GetHistory(from, to *time.Time) ([]data.TimeEntryItem, error)
- func (c *Client) GetProjectIdByName(workspaceId int, projectName string) (int, error)
- func (c *Client) GetProjects(workspaceId int) ([]data.Project, error)
- func (c *Client) GetProjectsLookupMap(workspaceId int) (map[int]string, error)
- func (c *Client) GetWorkspaces() ([]data.Workspace, error)
- func (c *Client) NewTimeEntry(description string, workspaceID int, projectID int, billable bool) data.TimeEntry
- func (c *Client) StopTimeEntry(workspaceId int, entryId int) (*data.TimeEntryItem, error)
- func (c *Client) UpdateTimeEntry(workspaceId int, entryId int, entry data.TimeEntry) (*data.TimeEntryItem, error)
- type ProjectService
- type SevenPaceClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
Types ¶
type Client ¶ added in v0.4.0
type Client struct {
BaseURL string
HTTPClient *http.Client
AuthToken string
Cache *cache.CacheService
}
func NewAPIClient ¶
func (*Client) CreateTimeEntry ¶ added in v0.4.0
func (*Client) GetCurrentTimerEntry ¶ added in v0.4.0
func (c *Client) GetCurrentTimerEntry() (*data.TimeEntryItem, error)
func (*Client) GetHistory ¶ added in v0.4.0
func (*Client) GetProjectIdByName ¶ added in v0.4.0
func (*Client) GetProjects ¶ added in v0.4.0
func (*Client) GetProjectsLookupMap ¶ added in v0.4.0
func (*Client) GetWorkspaces ¶ added in v0.4.0
func (*Client) NewTimeEntry ¶ added in v0.7.0
func (*Client) StopTimeEntry ¶ added in v0.4.0
func (*Client) UpdateTimeEntry ¶ added in v0.18.0
type ProjectService ¶ added in v0.12.0
type SevenPaceClient ¶ added in v0.19.0
type SevenPaceClient struct {
BaseURL string
HTTPClient *http.Client
Domain string
Username string
Password string
ActivityTypeID string
}
SevenPaceClient talks to an on-prem 7pace Timetracker REST API using NTLM (Windows/Negotiate) authentication.
func NewSevenPaceClient ¶ added in v0.19.0
func NewSevenPaceClient(cfg utils.SevenPaceConfig) *SevenPaceClient
NewSevenPaceClient builds a client from the given 7pace configuration. The HTTP transport is wrapped with an NTLM negotiator so that Basic-auth credentials set on each request are used to perform the NTLM handshake.
func (*SevenPaceClient) CreateWorkLog ¶ added in v0.19.0
func (c *SevenPaceClient) CreateWorkLog(workLog data.SevenPaceWorkLog) (*data.SevenPaceWorkLog, error)
CreateWorkLog posts a single worklog to 7pace Timetracker.
Click to show internal directories.
Click to hide internal directories.