Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIssueNotFound = errors.New("Jira Issue not found")
var errUnknownProject = errors.New("Unknown Project")
View Source
var ErrNoConfigFile = errors.New("No config file. One will be created for you")
Functions ¶
func NewLogger ¶
func NewLogger(options LoggerOptions) *logrus.Entry
Types ¶
type Config ¶
type Config struct { Jira JiraSettings SQLConnection string MaxWorklogID int LastTimestamp int64 UserList []string DoneStatus []string // contains filtered or unexported fields }
Config holds info needed for connecting to Jira and SQL
func LoadConfig ¶
LoadConfig will load up a Config object based on configPath
type Issue ¶
type Issue struct { Expand string `json:"expand"` ID string `json:"id"` Self string `json:"self"` Key string `json:"key"` Fields struct { Summary string `json:"summary"` Created string `json:created` ResolutionDate *string `json:resolutiondate` StatusCategoryChangeDate *string `json:"statuscategorychangedate"` Issuetype struct { Self string `json:"self"` ID string `json:"id"` Description string `json:"description"` IconURL string `json:"iconUrl"` Name string `json:"name"` Subtask bool `json:"subtask"` AvatarID int `json:"avatarId"` } `json:"issuetype"` Parent struct { ID string `json:"id"` Key string `json:"key"` Self string `json:"self"` Fields struct { Summary string `json:"summary"` Status struct { Self string `json:"self"` Description string `json:"description"` IconURL string `json:"iconUrl"` Name string `json:"name"` ID string `json:"id"` StatusCategory struct { Self string `json:"self"` ID int `json:"id"` Key string `json:"key"` ColorName string `json:"colorName"` Name string `json:"name"` } `json:"statusCategory"` } `json:"status"` Priority struct { Self string `json:"self"` IconURL string `json:"iconUrl"` Name string `json:"name"` ID string `json:"id"` } `json:"priority"` Issuetype struct { Self string `json:"self"` ID string `json:"id"` Description string `json:"description"` IconURL string `json:"iconUrl"` Name string `json:"name"` Subtask bool `json:"subtask"` AvatarID int `json:"avatarId"` } `json:"issuetype"` } `json:"fields"` } `json:"parent"` Timespent int `json:"timespent"` Timeoriginalestimate int `json:"timeoriginalestimate"` Description struct { Version int `json:"version"` Type string `json:"type"` Content []struct { Type string `json:"type"` Content []struct { Type string `json:"type"` Text string `json:"text"` } `json:"content"` } `json:"content"` } `json:"description"` Progress struct { Progress int `json:"progress"` Total int `json:"total"` Percent int `json:"percent"` } `json:"progress"` Aggregateprogress struct { Progress int `json:"progress"` Total int `json:"total"` Percent int `json:"percent"` } `json:"aggregateprogress"` Aggregatetimespent int `json:"aggregatetimespent"` Aggregatetimeoriginalestimate int `json:"aggregatetimeoriginalestimate"` Priority struct { Self string `json:"self"` IconURL string `json:"iconUrl"` Name string `json:"name"` ID string `json:"id"` } `json:"priority"` Status struct { Self string `json:"self"` Description string `json:"description"` IconURL string `json:"iconUrl"` Name string `json:"name"` ID string `json:"id"` StatusCategory struct { Self string `json:"self"` ID int `json:"id"` Key string `json:"key"` ColorName string `json:"colorName"` Name string `json:"name"` } `json:"statusCategory"` } `json:"status"` Timetracking struct { OriginalEstimate string `json:"originalEstimate"` RemainingEstimate string `json:"remainingEstimate"` TimeSpent string `json:"timeSpent"` OriginalEstimateSeconds int `json:"originalEstimateSeconds"` RemainingEstimateSeconds int `json:"remainingEstimateSeconds"` TimeSpentSeconds int `json:"timeSpentSeconds"` } `json:"timetracking"` } `json:"fields"` }
type Jira ¶
type Jira struct { Config *Config // contains filtered or unexported fields }
func (*Jira) WorklogsUpdated ¶
func (j *Jira) WorklogsUpdated(timestamp int64) (UpdatedWorklogs, error)
type JiraReader ¶
type JiraSettings ¶
JiraSettings represent connection and credential information to Jira
type LoggerOptions ¶
type UpdatedWorklogs ¶
type Worker ¶
type Worker struct { Stopped bool // A flag determining the state of the worker Jobs []Job // contains filtered or unexported fields }
Worker will do its Action once every interval, making up for lost time that happened during the Action by only waiting the time left in the interval.
type Worklog ¶
type Worklog struct { Self string `json:"self"` Author struct { Self string `json:"self"` //Name string `json:"name"` //Key string `json:"key"` AccountID string `json:"accountId"` //EmailAddress string `json:"emailAddress"` AvatarUrls struct { Four8X48 string `json:"48x48"` Two4X24 string `json:"24x24"` One6X16 string `json:"16x16"` Three2X32 string `json:"32x32"` } `json:"avatarUrls"` DisplayName string `json:"displayName"` Active bool `json:"active"` TimeZone string `json:"timeZone"` AccountType string `json:"accountType"` } `json:"author"` UpdateAuthor struct { Self string `json:"self"` Name string `json:"name"` Key string `json:"key"` AccountID string `json:"accountId"` EmailAddress string `json:"emailAddress"` AvatarUrls struct { Four8X48 string `json:"48x48"` Two4X24 string `json:"24x24"` One6X16 string `json:"16x16"` Three2X32 string `json:"32x32"` } `json:"avatarUrls"` DisplayName string `json:"displayName"` Active bool `json:"active"` TimeZone string `json:"timeZone"` AccountType string `json:"accountType"` } `json:"updateAuthor"` Created string `json:"created"` Updated string `json:"updated"` Started string `json:"started"` TimeSpent string `json:"timeSpent"` TimeSpentSeconds int `json:"timeSpentSeconds"` ID string `json:"id"` IssueID string `json:"issueId"` }
type WorklogList ¶
type WorklogList struct {
IDs []int `json:"ids"`
}
Click to show internal directories.
Click to hide internal directories.