Documentation ¶
Index ¶
- Constants
- func NewOAuthClient(jiraBaseURL *url.URL, consumerKey string, privateKey *rsa.PrivateKey, ...) *http.Client
- type AvatarURLs
- type Client
- type ErrAPI
- type ErrFieldNotSet
- type Error
- type Issue
- type IssueList
- type IssueResolution
- type IssueService
- func (service *IssueService) Get(issueIdOrKey string) (*Issue, *http.Response, error)
- func (service *IssueService) PerformTransition(issueIdOrKey string, transition interface{}) (*http.Response, error)
- func (service *IssueService) Search(opts *SearchOptions) ([]*Issue, *http.Response, error)
- func (service *IssueService) Update(issueIdOrKey string, body interface{}) (*http.Response, error)
- type IssueStatus
- type L
- type M
- type MyselfService
- type Project
- type ProjectService
- type RemoteIssueLink
- type RemoteIssueLinkService
- func (service *RemoteIssueLinkService) Create(issueIdOrKey string, link *RemoteIssueLink) (*http.Response, error)
- func (service *RemoteIssueLinkService) Delete(issueIdOrKey string, globalId string) (*http.Response, error)
- func (service *RemoteIssueLinkService) Get(issueIdOrKey string, globalId string) (*RemoteIssueLink, *http.Response, error)
- func (service *RemoteIssueLinkService) List(issueIdOrKey string) ([]*RemoteIssueLink, *http.Response, error)
- func (service *RemoteIssueLinkService) Update(issueIdOrKey string, link *RemoteIssueLink) (*http.Response, error)
- type SearchOptions
- type User
- type Version
- type VersionService
Constants ¶
const ( LibraryVersion = "0.0.1" DefaultMaxPendingRequests = 10 )
Variables ¶
This section is empty.
Functions ¶
func NewOAuthClient ¶
Types ¶
type AvatarURLs ¶ added in v0.4.0
type Client ¶
type Client struct { // Base URL of the Jira API that is to be used to form API requests. BaseURL *url.URL // User-Agent header to be set for every request. UserAgent string // Me service. Myself *MyselfService // Project service. Projects *ProjectService // Issue service. Issues *IssueService // Remote Issue Link service. RemoteIssueLinks *RemoteIssueLinkService // Version service. Versions *VersionService // contains filtered or unexported fields }
func (*Client) NewRequest ¶
func (*Client) SetOptMaxPendingRequests ¶
SetOptMaxPendingRequests can be used to set a custom queue size for the requests that are to be sent to JIRA.
It only makes sense to call this method from an option function. Calling it later on will have no effect whatsoever.
type ErrFieldNotSet ¶
type ErrFieldNotSet struct {
// contains filtered or unexported fields
}
func (*ErrFieldNotSet) Error ¶
func (err *ErrFieldNotSet) Error() string
type Issue ¶
type Issue struct { Id string `json:"id,omitempty"` Self string `json:"self,omitempty"` Key string `json:"key,omitempty"` Fields struct { Summary string `json:"summary,omitempty"` IssueType struct { Id string `json:"id,omitempty"` Self string `json:"self,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Subtask bool `json:"subtask,omitempty"` IconURL string `json:"iconUrl,omitempty"` } `json:"issuetype,omitempty"` Parent *Issue `json:"parent,omitempty"` Subtasks []*Issue `json:"subtasks,omitempty"` Assignee *User `json:"assignee,omitempty"` FixVersions []*Version `json:"fixVersions,omitempty"` Labels []string `json:"labels,omitempty"` Status *IssueStatus `json:"status,omitempty"` Resolution *IssueResolution `json:"resolution,omitempty"` } `json:"fields,omitempty"` }
Issue represents the issue resource as produces by the REST API.
type IssueList ¶
type IssueList struct { Expand string `json:"expand,omitempty"` StartAt int `json:"startAt,omitempty"` MaxResults int `json:"maxResults,omitempty"` Total int `json:"total,omitempty"` Issues []*Issue `json:"issues,omitempty"` }
IssueList represents a list of issues, what a surprise.
type IssueResolution ¶ added in v0.1.1
type IssueResolution struct { Id string `json:"id,omitempty"` Self string `json:"self,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
IssueResolution represents an issue resolution, e.g. "Cannot Reproduce".
type IssueService ¶
type IssueService struct {
// contains filtered or unexported fields
}
func (*IssueService) PerformTransition ¶
func (service *IssueService) PerformTransition( issueIdOrKey string, transition interface{}, ) (*http.Response, error)
PerformTransition performs the requested transition for the chosen issue.
func (*IssueService) Search ¶
func (service *IssueService) Search(opts *SearchOptions) ([]*Issue, *http.Response, error)
type IssueStatus ¶
type IssueStatus struct { Id string `json:"id,omitempty"` Self string `json:"self,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` IconURL string `json:"iconUrl,omitempty"` }
IssueStatus represents an issue status, e.g. "Scheduled".
type MyselfService ¶
type MyselfService struct {
// contains filtered or unexported fields
}
type Project ¶ added in v0.4.0
type Project struct { Self string `json:"self"` Id string `json:"id"` Key string `json:"key"` Name string `json:"name"` AvatarURLs *AvatarURLs `json:"avatarUrls,omitempty"` }
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
func (*ProjectService) List ¶ added in v0.4.0
func (service *ProjectService) List() ([]*Project, *http.Response, error)
func (*ProjectService) ListVersions ¶
type RemoteIssueLink ¶
type RemoteIssueLink struct { GlobalId string `json:"globalId,omitempty"` Relationship string `json:"relationship,omitempty"` Object struct { URL string `json:"url,omitempty"` Title string `json:"title,omitempty"` Summary string `json:"summary,omitempty"` Icon struct { URL string `json:"url16x16,omitempty"` Title string `json:"title,omitempty"` } `json:"icon,omitempty"` Status struct { Resolved bool `json:"resolved"` Icon struct { URL string `json:"url16x16,omitempty"` Title string `json:"title,omitempty"` Link string `json:"link,omitempty"` } `json:"icon,omitempty"` } `json:"status,omitempty"` } `json:"object,omitempty"` Application struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` } `json:"application,omitempty"` }
RemoteIssueLink represents a JIRA issue remote link.
type RemoteIssueLinkService ¶
type RemoteIssueLinkService struct {
// contains filtered or unexported fields
}
func (*RemoteIssueLinkService) Create ¶
func (service *RemoteIssueLinkService) Create( issueIdOrKey string, link *RemoteIssueLink, ) (*http.Response, error)
Create creates a new remote issue link for the given issue. Global ID needs to be filled in if the remote issue link is to be updated in the future.
func (*RemoteIssueLinkService) Delete ¶
func (service *RemoteIssueLinkService) Delete( issueIdOrKey string, globalId string, ) (*http.Response, error)
Delete deletes the remote issue link identified by the given issue ID or key and global ID.
func (*RemoteIssueLinkService) Get ¶
func (service *RemoteIssueLinkService) Get( issueIdOrKey string, globalId string, ) (*RemoteIssueLink, *http.Response, error)
Get returns the remote issue link identified by the given issue ID or key and global ID.
func (*RemoteIssueLinkService) List ¶
func (service *RemoteIssueLinkService) List( issueIdOrKey string, ) ([]*RemoteIssueLink, *http.Response, error)
List returns the remote issue links associated with the given issue.
func (*RemoteIssueLinkService) Update ¶
func (service *RemoteIssueLinkService) Update( issueIdOrKey string, link *RemoteIssueLink, ) (*http.Response, error)
Update updates the remote issue link identified by the given issue ID. Global ID needs to be filled in for this API call to succeed.
type SearchOptions ¶
type User ¶
type User struct { Self string `json:"self,omitempty"` Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` EmailAddress string `json:"emailAddress,omitempty"` AvatarURLs *AvatarURLs `json:"avatarUrls,omitempty"` DisplayName string `json:"displayName,omitempty"` Active bool `json:"active,omitempty"` TimeZone string `json:"timeZone,omitempty"` Groups struct { Size int `json:"size,omitempty"` Items []struct { Name string `json:"name,omitempty"` Self string `json:"self,omitempty"` } `json:"items,omitempty"` } `json:"groups,omitempty"` }
type Version ¶
type Version struct { Id string `json:"id,omitempty"` Self string `json:"self,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Project string `json:"project,omitempty"` ProjectId int `json:"projectId,omitempty"` Released bool `json:"released,omitempty"` Archived bool `json:"archived,omitempty"` StartDate string `json:"startDate,omitempty"` UserStartDate string `json:"userStartDate,omitempty"` }
type VersionService ¶
type VersionService struct {
// contains filtered or unexported fields
}