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 Cloud
- func (c *Cloud) CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
- func (c *Cloud) CollectChangelogs(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func (c *Cloud) CollectIssues(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func (c *Cloud) CollectProjects(jiraApiClient *JiraApiClient, sourceId uint64) error
- func (c *Cloud) CollectRemoteLinks(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func (c *Cloud) CollectSprint(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
- func (c *Cloud) CollectUsers(jiraApiClient *JiraApiClient, sourceId uint64) error
- type Collector
- type JiraApiAuthor
- type JiraApiBoard
- type JiraApiChangeLog
- type JiraApiChangelogItem
- type JiraApiChangelogsResponse
- type JiraApiClient
- func (jiraApiClient *JiraApiClient) FetchPages(path string, query *url.Values, handler JiraPaginationHandler) error
- func (jiraApiClient *JiraApiClient) FetchWithoutPaginationHeaders(path string, query *url.Values, handler JiraSearchPaginationHandler) error
- func (jiraApiClient *JiraApiClient) GetJiraServerInfo() (*models.JiraServerInfo, int, error)
- func (jiraApiClient *JiraApiClient) GetMyselfInfo() (*models.ApiMyselfResponse, error)
- 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 ServerVersion8
- func (v8 *ServerVersion8) CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
- func (v8 *ServerVersion8) CollectChangelogs(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func (v8 *ServerVersion8) CollectIssues(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func (v8 *ServerVersion8) CollectProjects(jiraApiClient *JiraApiClient, sourceId uint64) error
- func (v8 *ServerVersion8) CollectRemoteLinks(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, ...) error
- func (v8 *ServerVersion8) CollectSprint(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
- func (v8 *ServerVersion8) CollectUsers(jiraApiClient *JiraApiClient, sourceId uint64) error
- func (v8 *ServerVersion8) FetchPages(path string, query *url.Values, handler JiraSearchPaginationHandler) error
- func (v8 *ServerVersion8) FetchWithoutPaginationHeaders(path string, query *url.Values, handler JiraSearchPaginationHandler) error
- func (v8 *ServerVersion8) Get(path string, handler JiraSearchPaginationHandler) error
- type SprintIssuesConverter
Constants ¶
View Source
const (
BatchSize = 100
)
Variables ¶
View Source
var ErrNotFoundResource = errors.New("not found the resource")
Functions ¶
func CollectBoard ¶
func CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
func CollectChangelogs ¶
func CollectChangelogs( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, rateLimitPerSecondInt int, ctx context.Context, collector changelogCollector, ) error
func CollectIssues ¶
func CollectIssues( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, since time.Time, rateLimitPerSecondInt int, 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, rateLimitPerSecondInt int, ctx context.Context, collector remoteLinkCollector, ) 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 Cloud ¶ added in v0.9.0
type Cloud struct { }
func (*Cloud) CollectBoard ¶ added in v0.9.0
func (c *Cloud) CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
func (*Cloud) CollectChangelogs ¶ added in v0.9.0
func (c *Cloud) CollectChangelogs( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, rateLimitPerSecondInt int, ctx context.Context, ) error
func (*Cloud) CollectIssues ¶ added in v0.9.0
func (*Cloud) CollectProjects ¶ added in v0.9.0
func (c *Cloud) CollectProjects(jiraApiClient *JiraApiClient, sourceId uint64) error
func (*Cloud) CollectRemoteLinks ¶ added in v0.9.0
func (c *Cloud) CollectRemoteLinks(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, rateLimitPerSecondInt int, ctx context.Context) error
func (*Cloud) CollectSprint ¶ added in v0.9.0
func (c *Cloud) CollectSprint(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
func (*Cloud) CollectUsers ¶ added in v0.9.0
func (c *Cloud) CollectUsers(jiraApiClient *JiraApiClient, sourceId uint64) error
type Collector ¶ added in v0.9.0
type Collector interface { CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error CollectChangelogs( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, rateLimitPerSecondInt int, ctx context.Context, ) error CollectIssues( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, since time.Time, rateLimitPerSecondInt int, ctx context.Context, ) error CollectProjects(jiraApiClient *JiraApiClient, sourceId uint64) error CollectRemoteLinks( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, rateLimitPerSecondInt int, ctx context.Context, ) error CollectSprint(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error CollectUsers(jiraApiClient *JiraApiClient, sourceId uint64) error }
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, proxy string, scheduler *utils.WorkerScheduler) *JiraApiClient
func NewJiraApiClientBySourceId ¶ added in v0.4.0
func NewJiraApiClientBySourceId(sourceId uint64, scheduler *utils.WorkerScheduler) (*JiraApiClient, error)
func (*JiraApiClient) FetchPages ¶
func (jiraApiClient *JiraApiClient) FetchPages(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.
func (*JiraApiClient) GetJiraServerInfo ¶ added in v0.7.0
func (jiraApiClient *JiraApiClient) GetJiraServerInfo() (*models.JiraServerInfo, int, error)
func (*JiraApiClient) GetMyselfInfo ¶ added in v0.7.0
func (jiraApiClient *JiraApiClient) GetMyselfInfo() (*models.ApiMyselfResponse, error)
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 ServerVersion8 ¶ added in v0.9.0
type ServerVersion8 struct {
// contains filtered or unexported fields
}
func NewServerVersion8 ¶ added in v0.9.0
func NewServerVersion8(db *gorm.DB, client *JiraApiClient) *ServerVersion8
func (*ServerVersion8) CollectBoard ¶ added in v0.9.0
func (v8 *ServerVersion8) CollectBoard(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
func (*ServerVersion8) CollectChangelogs ¶ added in v0.9.0
func (v8 *ServerVersion8) CollectChangelogs( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, rateLimitPerSecondInt int, ctx context.Context, ) error
func (*ServerVersion8) CollectIssues ¶ added in v0.9.0
func (v8 *ServerVersion8) CollectIssues( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, since time.Time, rateLimitPerSecondInt int, ctx context.Context, ) error
func (*ServerVersion8) CollectProjects ¶ added in v0.9.0
func (v8 *ServerVersion8) CollectProjects(jiraApiClient *JiraApiClient, sourceId uint64) error
func (*ServerVersion8) CollectRemoteLinks ¶ added in v0.9.0
func (v8 *ServerVersion8) CollectRemoteLinks( jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64, rateLimitPerSecondInt int, ctx context.Context, ) error
func (*ServerVersion8) CollectSprint ¶ added in v0.9.0
func (v8 *ServerVersion8) CollectSprint(jiraApiClient *JiraApiClient, source *models.JiraSource, boardId uint64) error
func (*ServerVersion8) CollectUsers ¶ added in v0.9.0
func (v8 *ServerVersion8) CollectUsers(jiraApiClient *JiraApiClient, sourceId uint64) error
func (*ServerVersion8) FetchPages ¶ added in v0.9.0
func (v8 *ServerVersion8) FetchPages(path string, query *url.Values, handler JiraSearchPaginationHandler) error
func (*ServerVersion8) FetchWithoutPaginationHeaders ¶ added in v0.9.0
func (v8 *ServerVersion8) FetchWithoutPaginationHeaders(path string, query *url.Values, handler JiraSearchPaginationHandler) error
func (*ServerVersion8) Get ¶ added in v0.9.0
func (v8 *ServerVersion8) Get(path string, handler JiraSearchPaginationHandler) error
type SprintIssuesConverter ¶ added in v0.7.0
type SprintIssuesConverter struct {
// contains filtered or unexported fields
}
func NewSprintIssueConverter ¶ added in v0.7.0
func NewSprintIssueConverter() *SprintIssuesConverter
func (*SprintIssuesConverter) FeedIn ¶ added in v0.7.0
func (c *SprintIssuesConverter) FeedIn(sourceId uint64, cl ChangelogItemResult)
func (*SprintIssuesConverter) UpdateSprintIssue ¶ added in v0.7.0
func (c *SprintIssuesConverter) UpdateSprintIssue() error
Source Files ¶
- interfaces.go
- jira_api_client.go
- jira_board_collector.go
- jira_board_converter.go
- jira_changelog_collector.go
- jira_changelog_converter.go
- jira_cloud_api_client.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_server_api_client.go
- jira_sprint_collector.go
- jira_sprint_converter.go
- jira_sprint_issues_converter.go
- jira_user_collector.go
- jira_user_converter.go
- jira_worklog_collector.go
- jira_worklog_converter.go
Click to show internal directories.
Click to hide internal directories.