Documentation
¶
Index ¶
- type Attachment
- type Comment
- type CommentContainer
- type Component
- type CustomFieldOption
- type Fields
- type Issue
- type IssueLink
- type IssueLinkType
- type IssueRestriction
- type IssueType
- type IssuesResponse
- type Priority
- type Progress
- type Project
- type ProjectCategory
- type Resolution
- type SecurityLevel
- type Status
- type StatusCategory
- type TimeTracking
- type User
- type Version
- type Votes
- type Watches
- type Worklog
- type WorklogContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
Author *User `json:"author"`
Content string `json:"content"`
Created string `json:"created"`
Filename string `json:"filename"`
ID string `json:"id"`
MimeType string `json:"mimeType"`
Self string `json:"self"`
Size int `json:"size"`
Thumbnail string `json:"thumbnail"`
}
Attachment represents an attachment
type Comment ¶
type Comment struct {
Author *User `json:"author"`
Body any `json:"body"` // Can be string or ADF object
Created string `json:"created"`
ID string `json:"id"`
Self string `json:"self"`
UpdateAuthor *User `json:"updateAuthor"`
Updated string `json:"updated"`
}
Comment represents a comment
type CommentContainer ¶
type CommentContainer struct {
Comments []Comment `json:"comments"`
MaxResults int `json:"maxResults"`
Self string `json:"self"`
StartAt int `json:"startAt"`
Total int `json:"total"`
}
CommentContainer represents the comment container
type Component ¶
type Component struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Self string `json:"self"`
}
Component represents a component
type CustomFieldOption ¶
type CustomFieldOption struct {
ID string `json:"id"`
Self string `json:"self"`
Value string `json:"value"`
}
CustomFieldOption represents a custom field option value
type Fields ¶
type Fields struct {
AggregateProgress *Progress `json:"aggregateprogress"`
AggregateTimeEstimate *int `json:"aggregatetimeestimate"`
AggregateTimeOriginalEst *int `json:"aggregatetimeoriginalestimate"`
AggregateTimeSpent *int `json:"aggregatetimespent"`
Assignee *User `json:"assignee"`
Attachment []Attachment `json:"attachment"`
Comment *CommentContainer `json:"comment"`
Components []Component `json:"components"`
Created string `json:"created"`
Creator *User `json:"creator"`
Description any `json:"description"` // Can be string or ADF object
DueDate *string `json:"duedate"`
Environment any `json:"environment"` // Can be string or ADF object
FixVersions []Version `json:"fixVersions"`
IssueLinks []IssueLink `json:"issuelinks"`
IssueRestriction *IssueRestriction `json:"issuerestriction"`
IssueType *IssueType `json:"issuetype"`
Labels []string `json:"labels"`
LastViewed *string `json:"lastViewed"`
Priority *Priority `json:"priority"`
Progress *Progress `json:"progress"`
Project *Project `json:"project"`
Reporter *User `json:"reporter"`
Resolution *Resolution `json:"resolution"`
ResolutionDate *string `json:"resolutiondate"`
Security *SecurityLevel `json:"security"`
Status *Status `json:"status"`
StatusCategory *StatusCategory `json:"statusCategory"`
StatusCategoryChangeDate string `json:"statuscategorychangedate"`
Subtasks []Issue `json:"subtasks"`
Summary string `json:"summary"`
TimeEstimate *int `json:"timeestimate"`
TimeOriginalEstimate *int `json:"timeoriginalestimate"`
TimeSpent *int `json:"timespent"`
TimeTracking *TimeTracking `json:"timetracking"`
Updated string `json:"updated"`
Versions []Version `json:"versions"`
Votes *Votes `json:"votes"`
Watches *Watches `json:"watches"`
Worklog *WorklogContainer `json:"worklog"`
WorkRatio int `json:"workratio"`
// Custom fields - using map for flexibility since field IDs vary
CustomFields map[string]any `json:"-"` // Will be populated separately
}
Fields represents the fields section of a V3 issue
func (*Fields) GetCustomField ¶
GetCustomField retrieves a custom field value by its key (e.g., "customfield_12345")
func (*Fields) ListCustomFields ¶
ListCustomFields returns a slice of all custom field keys
func (*Fields) MarshalJSON ¶
MarshalJSON implements custom JSON marshaling for Fields to include custom fields
func (*Fields) SetCustomField ¶
SetCustomField sets a custom field value
func (*Fields) UnmarshalJSON ¶
UnmarshalJSON implements custom JSON unmarshaling for Fields to capture custom fields
type Issue ¶
type Issue struct {
Expand string `json:"expand"`
Fields *Fields `json:"fields"`
ID string `json:"id"`
Key string `json:"key"`
Self string `json:"self"`
}
Issue represents a Jira issue from the V3 API
func (*Issue) ConvertToGoJiraIssue ¶
ConvertToGoJiraIssue converts a V3 API Issue to a go-jira Issue
type IssueLink ¶
type IssueLink struct {
ID string `json:"id"`
InwardIssue *Issue `json:"inwardIssue"`
OutwardIssue *Issue `json:"outwardIssue"`
Self string `json:"self"`
Type *IssueLinkType `json:"type"`
}
IssueLink represents an issue link
type IssueLinkType ¶
type IssueLinkType struct {
ID string `json:"id"`
Inward string `json:"inward"`
Name string `json:"name"`
Outward string `json:"outward"`
Self string `json:"self"`
}
IssueLinkType represents an issue link type
type IssueRestriction ¶
type IssueRestriction struct {
IssueRestrictions map[string]any `json:"issuerestrictions"`
ShouldDisplay bool `json:"shouldDisplay"`
}
IssueRestriction represents issue restrictions
type IssueType ¶
type IssueType struct {
AvatarID int `json:"avatarId"`
Description string `json:"description"`
HierarchyLevel int `json:"hierarchyLevel"`
IconURL string `json:"iconUrl"`
ID string `json:"id"`
Name string `json:"name"`
Self string `json:"self"`
Subtask bool `json:"subtask"`
}
IssueType represents an issue type in the V3 API
type IssuesResponse ¶
type IssuesResponse struct {
Issues []Issue `json:"issues"`
Expand string `json:"expand"`
StartAt int `json:"startAt"`
MaxResults int `json:"maxResults"`
Total int `json:"total"`
NextPageToken string `json:"nextPageToken"`
IsLast bool `json:"isLast"`
}
IssuesResponse represents the response from the V3 search/jql API
type Priority ¶
type Priority struct {
IconURL string `json:"iconUrl"`
ID string `json:"id"`
Name string `json:"name"`
Self string `json:"self"`
}
Priority represents a priority in the V3 API
type Project ¶
type Project struct {
AvatarUrls map[string]string `json:"avatarUrls"`
ID string `json:"id"`
Key string `json:"key"`
Name string `json:"name"`
ProjectCategory *ProjectCategory `json:"projectCategory"`
ProjectTypeKey string `json:"projectTypeKey"`
Self string `json:"self"`
Simplified bool `json:"simplified"`
}
Project represents a project in the V3 API
type ProjectCategory ¶
type ProjectCategory struct {
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
Self string `json:"self"`
}
ProjectCategory represents a project category
type Resolution ¶
type Resolution struct {
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
Self string `json:"self"`
}
Resolution represents a resolution
type SecurityLevel ¶
type SecurityLevel struct {
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
Self string `json:"self"`
}
SecurityLevel represents a security level
type Status ¶
type Status struct {
Description string `json:"description"`
IconURL string `json:"iconUrl"`
ID string `json:"id"`
Name string `json:"name"`
Self string `json:"self"`
StatusCategory *StatusCategory `json:"statusCategory"`
}
Status represents a status in the V3 API
type StatusCategory ¶
type StatusCategory struct {
ColorName string `json:"colorName"`
ID int `json:"id"`
Key string `json:"key"`
Name string `json:"name"`
Self string `json:"self"`
}
StatusCategory represents a status category
type TimeTracking ¶
type TimeTracking struct {
OriginalEstimate string `json:"originalEstimate"`
OriginalEstimateSeconds int `json:"originalEstimateSeconds"`
RemainingEstimate string `json:"remainingEstimate"`
RemainingEstimateSeconds int `json:"remainingEstimateSeconds"`
TimeSpent string `json:"timeSpent"`
TimeSpentSeconds int `json:"timeSpentSeconds"`
}
TimeTracking represents time tracking information
type User ¶
type User struct {
AccountID string `json:"accountId"`
AccountType string `json:"accountType"`
Active bool `json:"active"`
AvatarUrls map[string]string `json:"avatarUrls"`
DisplayName string `json:"displayName"`
EmailAddress string `json:"emailAddress"`
Self string `json:"self"`
TimeZone string `json:"timeZone"`
}
User represents a user in the V3 API
type Version ¶
type Version struct {
Archived bool `json:"archived"`
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
ProjectID int `json:"projectId"`
ReleaseDate *string `json:"releaseDate"`
Released bool `json:"released"`
Self string `json:"self"`
StartDate *string `json:"startDate"`
UserReleaseDate *string `json:"userReleaseDate"`
UserStartDate *string `json:"userStartDate"`
}
Version represents a version
type Votes ¶
type Votes struct {
HasVoted bool `json:"hasVoted"`
Self string `json:"self"`
Votes int `json:"votes"`
}
Votes represents vote information
type Watches ¶
type Watches struct {
IsWatching bool `json:"isWatching"`
Self string `json:"self"`
WatchCount int `json:"watchCount"`
}
Watches represents watch information
type Worklog ¶
type Worklog struct {
Author *User `json:"author"`
Comment any `json:"comment"` // Can be string or ADF object
Created string `json:"created"`
ID string `json:"id"`
IssueID string `json:"issueId"`
Self string `json:"self"`
Started string `json:"started"`
TimeSpent string `json:"timeSpent"`
TimeSpentSeconds int `json:"timeSpentSeconds"`
UpdateAuthor *User `json:"updateAuthor"`
Updated string `json:"updated"`
}
Worklog represents a worklog entry