Documentation ¶
Index ¶
- Constants
- Variables
- func CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
- func CollectChangelogs(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func CollectIssues(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func CollectProjects(jiraApiClient *JiraApiClient, sourceId uint64) error
- func CollectRemoteLinks(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func CollectSprint(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
- func CollectUsers(jiraApiClient *JiraApiClient, sourceId uint64) error
- func ConvertBoard(sourceId uint64, boardId uint64) error
- func ConvertChangelogs(sourceId uint64, boardId uint64) error
- func ConvertIssueCommits(sourceId uint64, boardId uint64) error
- func ConvertIssues(sourceId uint64, boardId uint64) error
- func ConvertSprint(sourceId uint64, boardId uint64) error
- func ConvertUsers(sourceId uint64) error
- func ConvertWorklog(sourceId uint64, boardId uint64) error
- func EnrichIssues(source *models.JiraSource, boardId uint64) (err error)
- func EnrichRemotelinks(source *models.JiraSource, boardId uint64) (err error)
- type ChangelogItemResult
- type JiraApiAuthor
- type JiraApiBoard
- type JiraApiChangeLog
- type JiraApiChangelogItem
- type JiraApiChangelogsResponse
- type JiraApiClient
- type JiraApiIssue
- type JiraApiIssueFields
- type JiraApiIssuePriority
- type JiraApiIssueTimeTracking
- type JiraApiIssueType
- type JiraApiIssuesResponse
- type JiraApiLocation
- type JiraApiProject
- type JiraApiRemotelink
- type JiraApiRemotelinksResponse
- type JiraApiSprint
- type JiraApiSprintsResponse
- type JiraApiStatus
- type JiraApiStatusCategory
- type JiraApiUser
- type JiraApiWorklog
- type JiraPagination
- type JiraPaginationHandler
- type JiraSearchPaginationHandler
- type JiraUserApiRes
- type JiraUserProjectApiRes
- type SprintIssueBurndownConverter
Constants ¶
const ( Bug = "Bug" Story = "Story" Incident = "Incident" Requirement = "Requirement" )
issue types
const (
BashSize = 100
)
const (
BatchSize = 100
)
const (
Resolved = "5"
)
jira changelog to
Variables ¶
var (
UTCLocation, _ = time.LoadLocation("UTC")
)
Functions ¶
func CollectBoard ¶
func CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
func CollectChangelogs ¶
func CollectChangelogs( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ctx context.Context, ) error
func CollectIssues ¶
func CollectIssues( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, since time.Time, ctx context.Context, ) error
func CollectProjects ¶ added in v0.4.0
func CollectProjects( jiraApiClient *JiraApiClient, sourceId uint64, ) error
func CollectRemoteLinks ¶ added in v0.6.0
func CollectRemoteLinks( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ctx context.Context, ) error
func CollectSprint ¶ added in v0.4.0
func CollectSprint(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
func CollectUsers ¶ added in v0.4.0
func CollectUsers(jiraApiClient *JiraApiClient, sourceId uint64, ) error
func ConvertBoard ¶ added in v0.6.0
func ConvertChangelogs ¶ added in v0.6.0
func ConvertIssueCommits ¶ added in v0.6.0
func ConvertIssues ¶ added in v0.6.0
func ConvertSprint ¶ added in v0.6.0
func ConvertUsers ¶ added in v0.6.0
func ConvertWorklog ¶ added in v0.6.0
func EnrichIssues ¶
func EnrichIssues(source *models.JiraSource, boardId uint64) (err error)
func EnrichRemotelinks ¶ added in v0.6.0
func EnrichRemotelinks(source *models.JiraSource, boardId uint64) (err error)
Types ¶
type ChangelogItemResult ¶ added in v0.6.0
type ChangelogItemResult struct { SourceId uint64 `gorm:"primaryKey"` ChangelogId uint64 `gorm:"primaryKey"` Field string `gorm:"primaryKey"` FieldType string FieldId string From string FromString string To string ToString string IssueId uint64 `gorm:"index"` AuthorAccountId string AuthorDisplayName string Created time.Time }
type JiraApiAuthor ¶
type JiraApiBoard ¶
type JiraApiBoard struct { Id uint64 `json:"id"` Self string `json:"self"` Name string `json:"name"` Type string `json:"type"` Location *JiraApiLocation }
type JiraApiChangeLog ¶
type JiraApiChangeLog struct { Id string `json:"id,omitempty"` Author JiraApiAuthor `json:"author,omitempty"` Created core.Iso8601Time `json:"created,omitempty"` Items []JiraApiChangelogItem `json:"items,omitempty"` }
type JiraApiChangelogItem ¶
type JiraApiChangelogItem struct { Field string `json:"field,omitempty"` FieldType string `json:"fieldType,omitempty"` FieldId string `json:"fieldId,omitempty"` From string `json:"from,omitempty"` FromString string `json:"fromString,omitempty"` To string `json:"to,omitempty"` ToString string `json:"toString,omitempty"` }
type JiraApiChangelogsResponse ¶
type JiraApiChangelogsResponse struct { JiraPagination Values []JiraApiChangeLog `json:"values,omitempty"` }
type JiraApiClient ¶
func NewJiraApiClient ¶ added in v0.4.0
func NewJiraApiClient(endpoint string, auth string) *JiraApiClient
func NewJiraApiClientBySourceId ¶ added in v0.4.0
func NewJiraApiClientBySourceId(sourceId uint64) (*JiraApiClient, error)
func (*JiraApiClient) FetchPages ¶
func (jiraApiClient *JiraApiClient) FetchPages(scheduler *utils.WorkerScheduler, path string, query *url.Values, handler JiraPaginationHandler) error
func (*JiraApiClient) FetchWithoutPaginationHeaders ¶ added in v0.4.0
func (jiraApiClient *JiraApiClient) FetchWithoutPaginationHeaders( path string, query *url.Values, handler JiraSearchPaginationHandler, ) error
FetchWithoutPaginationHeaders uses pagination in a different way than FetchPages. We set the pagination params to what we want, and then we just keep making requests until the response array is empty. This is why we need to check the "next" variable on the handler, and the handler that is passed in needs to return a boolean to tell us whether or not to continue making requests. This is why we created JiraSearchPaginationHandler.
type JiraApiIssue ¶
type JiraApiIssueFields ¶ added in v0.6.0
type JiraApiIssueFields struct { Name string Summary string IssueType JiraApiIssueType Project JiraApiProject Worklog JiraApiWorklog Status JiraApiStatus Creator JiraApiUser Assignee *JiraApiUser Priority *JiraApiIssuePriority TimeTracking JiraApiIssueTimeTracking AggregateTimeEstimate int64 Parent *JiraApiIssue Sprint *JiraApiSprint ClosedSprints []JiraApiSprint Created core.Iso8601Time Updated *core.Iso8601Time ResolutionDate *core.Iso8601Time }
type JiraApiIssuePriority ¶ added in v0.6.0
type JiraApiIssueTimeTracking ¶ added in v0.6.0
type JiraApiIssueType ¶ added in v0.6.0
type JiraApiIssuesResponse ¶
type JiraApiIssuesResponse struct { JiraPagination Issues []JiraApiIssue `json:"issues"` }
type JiraApiLocation ¶
type JiraApiProject ¶ added in v0.6.0
type JiraApiRemotelink ¶ added in v0.6.0
type JiraApiRemotelink struct { Id uint64 Self string Application json.RawMessage Relationship string Object struct { Url string Title string Icon json.RawMessage Status json.RawMessage } }
type JiraApiRemotelinksResponse ¶ added in v0.6.0
type JiraApiRemotelinksResponse []json.RawMessage
need to store a origin json body into RawJson, by this approach, we dont need to Marshal it back to bytes
type JiraApiSprint ¶ added in v0.4.0
type JiraApiSprint struct { Id uint64 `json:"id"` Self string `json:"self"` State string `json:"state"` Name string `json:"name"` StartDate *time.Time `json:"startDate,omitempty"` EndDate *time.Time `json:"endDate,omitempty"` CompleteDate *time.Time `json:"completeDate,omitempty"` OriginBoardID uint64 `json:"originBoardId,omitempty"` }
type JiraApiSprintsResponse ¶ added in v0.6.0
type JiraApiSprintsResponse struct { MaxResults int `json:"maxResults"` StartAt int `json:"startAt"` Total int `json:"total"` IsLast bool `json:"isLast"` Values []JiraApiSprint `json:"values"` }
type JiraApiStatus ¶ added in v0.6.0
type JiraApiStatusCategory ¶ added in v0.6.0
type JiraApiUser ¶ added in v0.4.0
type JiraApiWorklog ¶ added in v0.6.0
type JiraApiWorklog struct { StartAt int `json:"startAt"` MaxResults int `json:"maxResults"` Total int `json:"total"` Worklogs []struct { Author struct { AccountID string `json:"accountId"` } `json:"author"` UpdateAuthor struct { AccountID string `json:"accountId"` } `json:"updateAuthor"` Updated core.Iso8601Time `json:"updated"` Started core.Iso8601Time `json:"started"` TimeSpent string `json:"timeSpent"` TimeSpentSeconds int `json:"timeSpentSeconds"` ID string `json:"id"` IssueID string `json:"issueId"` } `json:"worklogs"` }
type JiraPagination ¶
type JiraPaginationHandler ¶
type JiraSearchPaginationHandler ¶ added in v0.4.0
type JiraUserApiRes ¶ added in v0.4.0
type JiraUserApiRes []JiraApiUser
type JiraUserProjectApiRes ¶ added in v0.4.0
type JiraUserProjectApiRes []JiraApiProject
This has to be called JiraUserProjects since it is a different api call than JiraProjects. This call retreives all projects that the user has access to
type SprintIssueBurndownConverter ¶ added in v0.6.0
type SprintIssueBurndownConverter struct {
// contains filtered or unexported fields
}
func NewSprintIssueBurndownConverter ¶ added in v0.6.0
func NewSprintIssueBurndownConverter() *SprintIssueBurndownConverter
func (*SprintIssueBurndownConverter) FeedIn ¶ added in v0.6.0
func (c *SprintIssueBurndownConverter) FeedIn(sourceId uint64, cl ChangelogItemResult)
func (*SprintIssueBurndownConverter) Save ¶ added in v0.6.0
func (c *SprintIssueBurndownConverter) Save() error
func (*SprintIssueBurndownConverter) UpdateSprintIssue ¶ added in v0.6.0
func (c *SprintIssueBurndownConverter) UpdateSprintIssue() error
Source Files ¶
- jira_api_client.go
- jira_board_collector.go
- jira_board_converter.go
- jira_changelog_collector.go
- jira_changelog_converter.go
- jira_issue_collector.go
- jira_issue_commit_converter.go
- jira_issue_converter.go
- jira_issue_enricher.go
- jira_project_collector.go
- jira_remotelink_collector.go
- jira_remotelink_enricher.go
- jira_sprint_collector.go
- jira_sprint_converter.go
- jira_sprint_issue_burndown_converter.go
- jira_user_collector.go
- jira_user_converter.go
- jira_worklog_collector.go
- jira_worklog_converter.go