jira: github.com/go-jira/jira Index | Files | Directories

package jira

import "github.com/go-jira/jira"

Index

Package Files

attachment.go component.go epic.go error.go fields.go httpClient.go issue.go jira.go project.go search.go serverinfo.go session.go users.go utils.go

Constants

const VERSION = "1.0.22"

func AddIssueWorklog Uses

func AddIssueWorklog(ua HttpClient, endpoint string, issue string, wp WorklogProvider) (*jiradata.Worklog, error)

func CreateComponent Uses

func CreateComponent(ua HttpClient, endpoint string, cp ComponentProvider) (*jiradata.Component, error)

func CreateIssue Uses

func CreateIssue(ua HttpClient, endpoint string, iup IssueUpdateProvider) (*jiradata.IssueCreateResponse, error)

func DeleteSession Uses

func DeleteSession(ua HttpClient, endpoint string) error

func EditIssue Uses

func EditIssue(ua HttpClient, endpoint string, issue string, iup IssueUpdateProvider) error

func EpicAddIssues Uses

func EpicAddIssues(ua HttpClient, endpoint string, epic string, eip EpicIssuesProvider) error

func EpicRemoveIssues Uses

func EpicRemoveIssues(ua HttpClient, endpoint string, eip EpicIssuesProvider) error

func EpicSearch Uses

func EpicSearch(ua HttpClient, endpoint string, epic string, sp SearchProvider) (*jiradata.SearchResults, error)

func GetAttachment Uses

func GetAttachment(ua HttpClient, endpoint string, id string) (*jiradata.Attachment, error)

func GetFields Uses

func GetFields(ua HttpClient, endpoint string) ([]jiradata.Field, error)

func GetIssue Uses

func GetIssue(ua HttpClient, endpoint string, issue string, iqg IssueQueryProvider) (*jiradata.Issue, error)

func GetIssueComment Uses

func GetIssueComment(ua HttpClient, endpoint string, issue string) (*jiradata.Comments, error)

https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0/#api/2/issue-getComments

func GetIssueCreateMetaIssueType Uses

func GetIssueCreateMetaIssueType(ua HttpClient, endpoint string, projectKey, issueTypeName string) (*jiradata.IssueType, error)

func GetIssueCreateMetaProject Uses

func GetIssueCreateMetaProject(ua HttpClient, endpoint string, projectKey string) (*jiradata.CreateMetaProject, error)

func GetIssueEditMeta Uses

func GetIssueEditMeta(ua HttpClient, endpoint string, issue string) (*jiradata.EditMeta, error)

func GetIssueLinkTypes Uses

func GetIssueLinkTypes(ua HttpClient, endpoint string) (*jiradata.IssueLinkTypes, error)

func GetIssueTransitions Uses

func GetIssueTransitions(ua HttpClient, endpoint string, issue string) (*jiradata.TransitionsMeta, error)

func GetIssueWorklog Uses

func GetIssueWorklog(ua HttpClient, endpoint string, issue string) (*jiradata.Worklogs, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/worklog-getIssueWorklog

func GetProjectComponents Uses

func GetProjectComponents(ua HttpClient, endpoint string, project string) (*jiradata.Components, error)

func GetProjectVersions Uses

func GetProjectVersions(ua HttpClient, endpoint string, project string) (*jiradata.Versions, error)

func GetSession Uses

func GetSession(ua HttpClient, endpoint string) (*jiradata.CurrentUser, error)

func IssueAddComment Uses

func IssueAddComment(ua HttpClient, endpoint string, issue string, cp CommentProvider) (*jiradata.Comment, error)

func IssueAddVote Uses

func IssueAddVote(ua HttpClient, endpoint string, issue string) error

func IssueAddWatcher Uses

func IssueAddWatcher(ua HttpClient, endpoint string, issue, user string) error

func IssueAssign Uses

func IssueAssign(ua HttpClient, endpoint string, issue, name string) error

func IssueAssignAccountID Uses

func IssueAssignAccountID(ua HttpClient, endpoint string, issue, acctId string) error

func IssueAttachFile Uses

func IssueAttachFile(ua HttpClient, endpoint string, issue, filename string, contents io.Reader) (*jiradata.ListOfAttachment, error)

func IssueRemoveVote Uses

func IssueRemoveVote(ua HttpClient, endpoint string, issue string) error

func IssueRemoveWatcher Uses

func IssueRemoveWatcher(ua HttpClient, endpoint string, issue, user string) error

func LinkIssues Uses

func LinkIssues(ua HttpClient, endpoint string, lip LinkIssueProvider) error

func NewSession Uses

func NewSession(ua HttpClient, endpoint string, ap AuthProvider) (*jiradata.AuthSuccess, error)

func RankIssues Uses

func RankIssues(ua HttpClient, endpoint string, rrp RankRequestProvider) error

func RemoveAttachment Uses

func RemoveAttachment(ua HttpClient, endpoint string, id string) error
func Search(ua HttpClient, endpoint string, sp SearchProvider, opts ...SearchOpt) (*jiradata.SearchResults, error)

func ServerInfo Uses

func ServerInfo(ua HttpClient, endpoint string) (*jiradata.ServerInfo, error)

func TransitionIssue Uses

func TransitionIssue(ua HttpClient, endpoint string, issue string, iup IssueUpdateProvider) error

func URLJoin Uses

func URLJoin(endpoint string, paths ...string) string

func UserSearch Uses

func UserSearch(ua HttpClient, endpoint string, opts *UserSearchOptions) ([]*jiradata.User, error)

type AuthOptions Uses

type AuthOptions struct {
    Username string
    Password string
}

func (*AuthOptions) ProvideAuthParams Uses

func (a *AuthOptions) ProvideAuthParams() *jiradata.AuthParams

type AuthProvider Uses

type AuthProvider interface {
    ProvideAuthParams() *jiradata.AuthParams
}

type CommentProvider Uses

type CommentProvider interface {
    ProvideComment() *jiradata.Comment
}

type ComponentProvider Uses

type ComponentProvider interface {
    ProvideComponent() *jiradata.Component
}

type EpicIssuesProvider Uses

type EpicIssuesProvider interface {
    ProvideEpicIssues() *jiradata.EpicIssues
}

type HttpClient Uses

type HttpClient interface {
    Delete(url string) (*http.Response, error)
    Do(*http.Request) (*http.Response, error)
    GetJSON(url string) (*http.Response, error)
    Post(url, bodyType string, body io.Reader) (*http.Response, error)
    Put(url, bodyType string, body io.Reader) (*http.Response, error)
}

type IssueOptions Uses

type IssueOptions struct {
    Fields        []string `json:"fields,omitempty" yaml:"fields,omitempty"`
    Expand        []string `json:"expand,omitempty" yaml:"expand,omitempty"`
    Properties    []string `json:"properties,omitempty" yaml:"properties,omitempty"`
    FieldsByKeys  bool     `json:"fieldsByKeys,omitempty" yaml:"fieldsByKeys,omitempty"`
    UpdateHistory bool     `json:"updateHistory,omitempty" yaml:"updateHistory,omitempty"`
}

func (*IssueOptions) ProvideIssueQueryString Uses

func (o *IssueOptions) ProvideIssueQueryString() string

type IssueQueryProvider Uses

type IssueQueryProvider interface {
    ProvideIssueQueryString() string
}

type IssueUpdateProvider Uses

type IssueUpdateProvider interface {
    ProvideIssueUpdate() *jiradata.IssueUpdate
}

type Jira Uses

type Jira struct {
    Endpoint string     `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
    UA       HttpClient `json:"-" yaml:"-"`
}

func NewJira Uses

func NewJira(endpoint string) *Jira

func (*Jira) AddIssueWorklog Uses

func (j *Jira) AddIssueWorklog(issue string, wp WorklogProvider) (*jiradata.Worklog, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/worklog-addWorklog

func (*Jira) CreateComponent Uses

func (j *Jira) CreateComponent(cp ComponentProvider) (*jiradata.Component, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/component-createComponent

func (*Jira) CreateIssue Uses

func (j *Jira) CreateIssue(iup IssueUpdateProvider) (*jiradata.IssueCreateResponse, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-createIssue

func (*Jira) DeleteSession Uses

func (j *Jira) DeleteSession() error

https://docs.atlassian.com/jira/REST/cloud/#auth/1/session-logout

func (*Jira) EditIssue Uses

func (j *Jira) EditIssue(issue string, iup IssueUpdateProvider) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-editIssue

func (*Jira) EpicAddIssues Uses

func (j *Jira) EpicAddIssues(epic string, eip EpicIssuesProvider) error

https://docs.atlassian.com/jira-software/REST/latest/#agile/1.0/epic-moveIssuesToEpic

func (*Jira) EpicRemoveIssues Uses

func (j *Jira) EpicRemoveIssues(eip EpicIssuesProvider) error

https://docs.atlassian.com/jira-software/REST/latest/#agile/1.0/epic-removeIssuesFromEpic

func (*Jira) EpicSearch Uses

func (j *Jira) EpicSearch(epic string, sp SearchProvider) (*jiradata.SearchResults, error)

https://docs.atlassian.com/jira-software/REST/latest/#agile/1.0/epic-getIssuesForEpic

func (*Jira) GetAttachment Uses

func (j *Jira) GetAttachment(id string) (*jiradata.Attachment, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/attachment-getAttachment

func (*Jira) GetFields Uses

func (j *Jira) GetFields() ([]jiradata.Field, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/field-getFields

func (*Jira) GetIssue Uses

func (j *Jira) GetIssue(issue string, iqg IssueQueryProvider) (*jiradata.Issue, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getIssue

func (*Jira) GetIssueComment Uses

func (j *Jira) GetIssueComment(issue string) (*jiradata.Comments, error)

func (*Jira) GetIssueCreateMetaIssueType Uses

func (j *Jira) GetIssueCreateMetaIssueType(projectKey, issueTypeName string) (*jiradata.IssueType, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getCreateIssueMeta

func (*Jira) GetIssueCreateMetaProject Uses

func (j *Jira) GetIssueCreateMetaProject(projectKey string) (*jiradata.CreateMetaProject, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getCreateIssueMeta

func (*Jira) GetIssueEditMeta Uses

func (j *Jira) GetIssueEditMeta(issue string) (*jiradata.EditMeta, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getEditIssueMeta

func (*Jira) GetIssueLinkTypes Uses

func (j *Jira) GetIssueLinkTypes() (*jiradata.IssueLinkTypes, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issueLinkType-getIssueLinkTypes

func (*Jira) GetIssueTransitions Uses

func (j *Jira) GetIssueTransitions(issue string) (*jiradata.TransitionsMeta, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getTransitions

func (*Jira) GetIssueWorklog Uses

func (j *Jira) GetIssueWorklog(issue string) (*jiradata.Worklogs, error)

func (*Jira) GetProjectComponents Uses

func (j *Jira) GetProjectComponents(project string) (*jiradata.Components, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/project-getProjectComponents

func (*Jira) GetProjectVersions Uses

func (j *Jira) GetProjectVersions(project string) (*jiradata.Versions, error)

https://developer.atlassian.com/cloud/jira/platform/rest/v2#api-api-2-project-projectIdOrKey-versions-get

func (*Jira) GetSession Uses

func (j *Jira) GetSession() (*jiradata.CurrentUser, error)

https://docs.atlassian.com/jira/REST/cloud/#auth/1/session-currentUser

func (*Jira) IssueAddComment Uses

func (j *Jira) IssueAddComment(issue string, cp CommentProvider) (*jiradata.Comment, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/comment-addComment

func (*Jira) IssueAddVote Uses

func (j *Jira) IssueAddVote(issue string) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-addVote

func (*Jira) IssueAddWatcher Uses

func (j *Jira) IssueAddWatcher(issue, user string) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-addWatcher

func (*Jira) IssueAssign Uses

func (j *Jira) IssueAssign(issue, name string) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-assign

func (*Jira) IssueAttachFile Uses

func (j *Jira) IssueAttachFile(issue, filename string, contents io.Reader) (*jiradata.ListOfAttachment, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue/{issueIdOrKey}/attachments-addAttachment

func (*Jira) IssueRemoveVote Uses

func (j *Jira) IssueRemoveVote(issue string) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-removeVote

func (*Jira) IssueRemoveWatcher Uses

func (j *Jira) IssueRemoveWatcher(issue, user string) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-addWatcher

func (*Jira) LinkIssues Uses

func (j *Jira) LinkIssues(lip LinkIssueProvider) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issueLink-linkIssues

func (*Jira) NewSession Uses

func (j *Jira) NewSession(ap AuthProvider) (*jiradata.AuthSuccess, error)

https://docs.atlassian.com/jira/REST/cloud/#auth/1/session-login

func (*Jira) RankIssues Uses

func (j *Jira) RankIssues(rrp RankRequestProvider) error

https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/issue-rankIssues

func (*Jira) RemoveAttachment Uses

func (j *Jira) RemoveAttachment(id string) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/attachment-removeAttachment

func (*Jira) Search Uses

func (j *Jira) Search(sp SearchProvider, opts ...SearchOpt) (*jiradata.SearchResults, error)

https://docs.atlassian.com/jira/REST/cloud/#api/2/search-searchUsingSearchRequest

func (*Jira) TransitionIssue Uses

func (j *Jira) TransitionIssue(issue string, iup IssueUpdateProvider) error

https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-doTransition

type LinkIssueProvider Uses

type LinkIssueProvider interface {
    ProvideLinkIssueRequest() *jiradata.LinkIssueRequest
}

type RankRequestProvider Uses

type RankRequestProvider interface {
    ProvideRankRequest() *jiradata.RankRequest
}

type SearchOpt Uses

type SearchOpt func(*searchConfig)

func WithAutoPagination Uses

func WithAutoPagination() SearchOpt

type SearchOptions Uses

type SearchOptions struct {
    Assignee    string `yaml:"assignee,omitempty" json:"assignee,omitempty"`
    Query       string `yaml:"query,omitempty" json:"query,omitempty"`
    QueryFields string `yaml:"query-fields,omitempty" json:"query-fields,omitempty"`
    Project     string `yaml:"project,omitempty" json:"project,omitempty"`
    Component   string `yaml:"component,omitempty" json:"component,omitempty"`
    IssueType   string `yaml:"issue-type,omitempty" json:"issue-type,omitempty"`
    Watcher     string `yaml:"watcher,omitempty" json:"watcher,omitempty"`
    Reporter    string `yaml:"reporter,omitempty" json:"reporter,omitempty"`
    Status      string `yaml:"status,omitempty" json:"status,omitempty"`
    Sort        string `yaml:"sort,omitempty" json:"sort,omitempty"`
    MaxResults  int    `yaml:"max-results,omitempty" json:"max-results,omitempty"`
}

func (*SearchOptions) ProvideSearchRequest Uses

func (o *SearchOptions) ProvideSearchRequest() *jiradata.SearchRequest

type SearchProvider Uses

type SearchProvider interface {
    ProvideSearchRequest() *jiradata.SearchRequest
}

type UserProvider Uses

type UserProvider interface {
    ProvideUser() *jiradata.User
}

type UserSearchOptions Uses

type UserSearchOptions struct {
    Query      string `yaml:"query,omitempty" json:"query,omitempty"`
    Username   string `yaml:"username,omitempty" json:"username,omitempty"`
    AccountID  string `yaml:"accountId,omitempty" json:"accountId,omitempty"`
    StartAt    int    `yaml:"startAt,omitempty" json:"startAt,omitempty"`
    MaxResults int    `yaml:"max-results,omitempty" json:"max-results,omitempty"`
    Property   string `yaml:"property,omitempty" json:"property,omitempty"`
}

type WorklogProvider Uses

type WorklogProvider interface {
    ProvideWorklog() *jiradata.Worklog
}

Directories

PathSynopsis
jiracli
jiracmd
jiradata
schemas

Package jira imports 11 packages (graph) and is imported by 16 packages. Updated 2020-03-30. Refresh now. Tools for package owners.