Documentation ¶
Index ¶
- type BoltDB
- func (r *BoltDB) AllIssues() ([]types.ParentIssue, error)
- func (r *BoltDB) AllWorkLogs() ([]types.WorklogItem, error)
- func (r *BoltDB) Close()
- func (r *BoltDB) IssueAccuracy(start time.Time, stop time.Time) ([]types.IssueAccuracy, error)
- func (r *BoltDB) IssuesGroupedBy(groupBy string, start time.Time, stop time.Time) ([]types.IssueChartData, error)
- func (r *BoltDB) NonResolvedIssues() ([]types.ParentIssue, error)
- func (r *BoltDB) UpdateIssue(issue *types.ParentIssue) error
- func (r *BoltDB) WorklogsGroupBy(groupBy string, start time.Time, stop time.Time) ([]types.WorklogGroupByChart, error)
- func (r *BoltDB) WorklogsPerDev(start time.Time, stop time.Time) ([]map[string]string, error)
- func (r *BoltDB) WorklogsPerDevWeek() ([]types.WorklogsPerDevWeek, error)
- func (r *BoltDB) Write(wi *types.WorklogItem, pi *types.ParentIssue) error
- type Repo
- type SQL
- func (s *SQL) AllIssues() ([]types.ParentIssue, error)
- func (s *SQL) AllWorkLogs() ([]types.WorklogItem, error)
- func (s *SQL) Close()
- func (s *SQL) IssueAccuracy(start time.Time, stop time.Time) ([]types.IssueAccuracy, error)
- func (s *SQL) IssuesGroupedBy(groupBy string, start time.Time, stop time.Time) ([]types.IssueChartData, error)
- func (s *SQL) NonResolvedIssues() ([]types.ParentIssue, error)
- func (s *SQL) UpdateIssue(issue *types.ParentIssue) error
- func (s *SQL) WorklogsGroupBy(groupBy string, start time.Time, stop time.Time) ([]types.WorklogGroupByChart, error)
- func (s *SQL) WorklogsPerDev(start time.Time, stop time.Time) ([]map[string]string, error)
- func (s *SQL) WorklogsPerDevWeek() ([]types.WorklogsPerDevWeek, error)
- func (s *SQL) Write(w *types.WorklogItem, pi *types.ParentIssue) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltDB ¶
type BoltDB struct {
// contains filtered or unexported fields
}
BoltDB is a repository with BoltDB as the backend
func NewBoltDBRepo ¶
NewBoltDBRepo will create a new BoltDB repository
func (*BoltDB) AllIssues ¶
func (r *BoltDB) AllIssues() ([]types.ParentIssue, error)
AllIssues will return all of the issues from boltDB
func (*BoltDB) AllWorkLogs ¶
func (r *BoltDB) AllWorkLogs() ([]types.WorklogItem, error)
AllWorkLogs will return all of the work logs from boltDB
func (*BoltDB) IssueAccuracy ¶
func (*BoltDB) IssuesGroupedBy ¶
func (r *BoltDB) IssuesGroupedBy(groupBy string, start time.Time, stop time.Time) ([]types.IssueChartData, error)
IssuesGroupedBy will return issues group by the given groupBy value going back weeksBack. This data will be used for charting
func (*BoltDB) NonResolvedIssues ¶
func (r *BoltDB) NonResolvedIssues() ([]types.ParentIssue, error)
NonResolvedIssues gets all issue keys that are not resolved yet
func (*BoltDB) UpdateIssue ¶
func (r *BoltDB) UpdateIssue(issue *types.ParentIssue) error
UpdateIssue will update the resolved information for the given issue
func (*BoltDB) WorklogsGroupBy ¶
func (*BoltDB) WorklogsPerDev ¶
func (*BoltDB) WorklogsPerDevWeek ¶
func (r *BoltDB) WorklogsPerDevWeek() ([]types.WorklogsPerDevWeek, error)
func (*BoltDB) Write ¶
func (r *BoltDB) Write(wi *types.WorklogItem, pi *types.ParentIssue) error
Write will add the worklogItem to BoltDB
type Repo ¶
type Repo interface { Write(w *types.WorklogItem, pi *types.ParentIssue) error NonResolvedIssues() ([]types.ParentIssue, error) //UpdateResolutionDate(issueKey string, resolvedDate time.Time) error UpdateIssue(*types.ParentIssue) error Close() AllIssues() ([]types.ParentIssue, error) IssuesGroupedBy(groupBy string, start time.Time, stop time.Time) ([]types.IssueChartData, error) IssueAccuracy(start time.Time, stop time.Time) ([]types.IssueAccuracy, error) AllWorkLogs() ([]types.WorklogItem, error) WorklogsGroupBy(groupBy string, start time.Time, stop time.Time) ([]types.WorklogGroupByChart, error) WorklogsPerDev(start time.Time, stop time.Time) ([]map[string]string, error) WorklogsPerDevWeek() ([]types.WorklogsPerDevWeek, error) }
Repo is the interface that handles writing Jira Worklog items
type SQL ¶
SQL is the SQL Server repository
func NewSQLRepo ¶
func NewSQLRepo(cfg *jiraworklog.Config) (*SQL, error)
NewSQLRepo will create a new repository using a SQL database as storage
func (*SQL) AllIssues ¶
func (s *SQL) AllIssues() ([]types.ParentIssue, error)
AllIssues will return all issues from SQL server
func (*SQL) AllWorkLogs ¶
func (s *SQL) AllWorkLogs() ([]types.WorklogItem, error)
AllWorkLogs will return all of the work logs from SQL server
func (*SQL) IssueAccuracy ¶
IssueAccuracy will return how accurate a developers estimate is vs actual time logged
func (*SQL) IssuesGroupedBy ¶
func (s *SQL) IssuesGroupedBy(groupBy string, start time.Time, stop time.Time) ([]types.IssueChartData, error)
IssuesGroupedBy will return issues group by the given groupBy value going back daysBack. This data will be used for charting
func (*SQL) NonResolvedIssues ¶
func (s *SQL) NonResolvedIssues() ([]types.ParentIssue, error)
NonResolvedIssues gets all issue keys that are not resolved yet
func (*SQL) UpdateIssue ¶
func (s *SQL) UpdateIssue(issue *types.ParentIssue) error
UpdateIssue will update the resolved information for the given issue
func (*SQL) WorklogsGroupBy ¶
func (*SQL) WorklogsPerDev ¶
func (*SQL) WorklogsPerDevWeek ¶
func (s *SQL) WorklogsPerDevWeek() ([]types.WorklogsPerDevWeek, error)
func (*SQL) Write ¶
func (s *SQL) Write(w *types.WorklogItem, pi *types.ParentIssue) error
Write will add the worklogItem to SQL server