jira

package module
v2.4.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

PkgGoDev GoReportCard GitHub Actions CI Status GitHub Actions CodeQL Status Codebeat badge

InstallationCompatibilityUsage exampleBuild StatusLicense


go-jira is a Go package for working with Jira REST API.

Currently, this package support only getting data from API (i.e., you cannot create or modify data using this package).

Note, that this is beta software, so it's entirely possible that there will be some significant bugs. Please report bugs so that we are aware of the issues.

Installation

Make sure you have a working Go 1.15+ workspace (instructions), then:

go get -d pkg.re/essentialkaos/go-jira.v2

For update to latest stable release, do:

go get -d -u pkg.re/essentialkaos/go-jira.v2

Compatibility

Version 6.x 7.x 8.x cloud
1.x Full Partial Partial No
2.x Full Full Full No

Usage example

package main

import (
  "fmt"
  "pkg.re/essentialkaos/go-jira.v2"
)

func main() {
  api, err := jira.NewAPI("https://jira.domain.com", "john", "MySuppaPAssWOrd")
  api.SetUserAgent("MyApp", "1.2.3")

  if err != nil {
    fmt.Printf("Error: %v\n", err)
    return
  }

  issue, err := api.GetIssue(
    "SAS-1956", jira.IssueParams{
      Expand: []string{"changelog"},
    },
  )

  if err != nil {
    fmt.Printf("Error: %v\n", err)
    return
  }

  fmt.Println("%-v\n", issue)
}

Build Status

Branch Status
master (Stable) CI
develop (Unstable) CI

License

Apache License, Version 2.0

Documentation

Index

Constants

View Source
const (
	PERMISSION_ADMINISTER                        = "ADMINISTER"
	PERMISSION_ASSIGN_ISSUE                      = "ASSIGN_ISSUE"
	PERMISSION_ASSIGNABLE_USER                   = "ASSIGNABLE_USER"
	PERMISSION_ATTACHMENT_DELETE_ALL             = "ATTACHMENT_DELETE_ALL"
	PERMISSION_ATTACHMENT_DELETE_OWN             = "ATTACHMENT_DELETE_OWN"
	PERMISSION_BROWSE                            = "BROWSE"
	PERMISSION_BULK_CHANGE                       = "BULK_CHANGE"
	PERMISSION_CLOSE_ISSUE                       = "CLOSE_ISSUE"
	PERMISSION_COMMENT_DELETE_ALL                = "COMMENT_DELETE_ALL"
	PERMISSION_COMMENT_DELETE_OWN                = "COMMENT_DELETE_OWN"
	PERMISSION_COMMENT_EDIT_ALL                  = "COMMENT_EDIT_ALL"
	PERMISSION_COMMENT_EDIT_OWN                  = "COMMENT_EDIT_OWN"
	PERMISSION_COMMENT_ISSUE                     = "COMMENT_ISSUE"
	PERMISSION_CREATE_ATTACHMENT                 = "CREATE_ATTACHMENT"
	PERMISSION_CREATE_ISSUE                      = "CREATE_ISSUE"
	PERMISSION_CREATE_SHARED_OBJECTS             = "CREATE_SHARED_OBJECTS"
	PERMISSION_DELETE_ISSUE                      = "DELETE_ISSUE"
	PERMISSION_EDIT_ISSUE                        = "EDIT_ISSUE"
	PERMISSION_LINK_ISSUE                        = "LINK_ISSUE"
	PERMISSION_MANAGE_GROUP_FILTER_SUBSCRIPTIONS = "MANAGE_GROUP_FILTER_SUBSCRIPTIONS"
	PERMISSION_MANAGE_WATCHER_LIST               = "MANAGE_WATCHER_LIST"
	PERMISSION_MODIFY_REPORTER                   = "MODIFY_REPORTER"
	PERMISSION_MOVE_ISSUE                        = "MOVE_ISSUE"
	PERMISSION_PROJECT_ADMIN                     = "PROJECT_ADMIN"
	PERMISSION_RESOLVE_ISSUE                     = "RESOLVE_ISSUE"
	PERMISSION_SCHEDULE_ISSUE                    = "SCHEDULE_ISSUE"
	PERMISSION_SET_ISSUE_SECURITY                = "SET_ISSUE_SECURITY"
	PERMISSION_SYSTEM_ADMIN                      = "SYSTEM_ADMIN"
	PERMISSION_USE                               = "USE"
	PERMISSION_USER_PICKER                       = "USER_PICKER"
	PERMISSION_VIEW_VERSION_CONTROL              = "VIEW_VERSION_CONTROL"
	PERMISSION_VIEW_VOTERS_AND_WATCHERS          = "VIEW_VOTERS_AND_WATCHERS"
	PERMISSION_VIEW_WORKFLOW_READONLY            = "VIEW_WORKFLOW_READONLY"
	PERMISSION_WORK_ISSUE                        = "WORK_ISSUE"
	PERMISSION_WORKLOG_DELETE_ALL                = "WORKLOG_DELETE_ALL"
	PERMISSION_WORKLOG_DELETE_OWN                = "WORKLOG_DELETE_OWN"
	PERMISSION_WORKLOG_EDIT_ALL                  = "WORKLOG_EDIT_ALL"
	PERMISSION_WORKLOG_EDIT_OWN                  = "WORKLOG_EDIT_OWN"
)

User permissions

View Source
const (
	ROLE_ACTOR_USER  = "atlassian-user-role-actor"
	ROLE_ACTOR_GROUP = "atlassian-group-role-actor"
)

Roles actors

View Source
const (
	// NAME is package name
	NAME = "Go-Jira"

	// VERSION is package version
	VERSION = "2.4.2"
)

Variables

View Source
var (
	ErrInitEmptyURL      = errors.New("URL can't be empty")
	ErrInitEmptyUser     = errors.New("User can't be empty")
	ErrInitEmptyPassword = errors.New("Password can't be empty")
	ErrNoPerms           = errors.New("User does not have permission to use Jira")
	ErrInvalidInput      = errors.New("Input is invalid")
	ErrWrongLinkID       = errors.New("LinkId is not a valid number, or the remote issue link with the given id does not belong to the given issue")
	ErrNoAuth            = errors.New("Calling user is not authenticated")
	ErrNoContent         = errors.New("There is no content with the given ID, or the calling user does not have permission to view the content")
	ErrGenReponse        = errors.New("Error occurs while generating the response")
)

API errors

Functions

This section is empty.

Types

type API

type API struct {
	Client *fasthttp.Client // Client is client for http requests
	// contains filtered or unexported fields
}

API is Jira API struct

func NewAPI

func NewAPI(url, username, password string) (*API, error)

NewAPI create new API struct

func (*API) DeleteIssueProperty

func (api *API) DeleteIssueProperty(issueIDOrKey, propKey string) error

DeleteIssueProperty removes the property from the issue identified by the key or by the id. Ths user removing the property is required to have permissions to edit the issue. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4937

func (*API) DeleteProjectProperty

func (api *API) DeleteProjectProperty(projectIDOrKey, propKey string) error

DeleteProjectProperty removes the property from the project identified by the key or by the id. Ths user removing the property is required to have permissions to administer the project. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e962

func (*API) GetAutocompleteData

func (api *API) GetAutocompleteData() (*AutocompleteData, error)

GetAutocompleteData returns the auto complete data required for JQL searches https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1819

func (*API) GetAutocompleteSuggestions

func (api *API) GetAutocompleteSuggestions(params SuggestionParams) ([]Suggestion, error)

GetAutocompleteSuggestions returns auto complete suggestions for JQL search https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1840

func (*API) GetColumns

func (api *API) GetColumns() ([]*Column, error)

GetColumns returns the default system columns for issue navigator. Admin permission will be required. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3809

func (*API) GetConfiguration

func (api *API) GetConfiguration() (*Configuration, error)

GetConfiguration returns the information if the optional features in JIRA are enabled or disabled. If the time tracking is enabled, it also returns the detailed information about time tracking configuration. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3775

func (*API) GetCreateMeta

func (api *API) GetCreateMeta(params CreateMetaParams) ([]*Project, error)

GetCreateMeta returns the meta data for creating issues. This includes the available projects, issue types and fields, including field types and whether or not those fields are required. Projects will not be returned if the user does not have permission to create issues in that project. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4330

func (*API) GetDashboard

func (api *API) GetDashboard(dashboardID string) (*Dashboard, error)

GetDashboard returns a single dashboard https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1621

func (*API) GetDashboards

func (api *API) GetDashboards(params DashboardParams) (*DashboardCollection, error)

GetDashboards returns a list of all dashboards, optionally filtering them https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1593

func (*API) GetFields

func (api *API) GetFields() ([]*Field, error)

GetFields returns a list of all fields, both System and Custom https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5959

func (*API) GetFilter

func (api *API) GetFilter(filterID string, params ExpandParameters) (*Filter, error)

GetFilter returns a filter given an id https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2491

func (*API) GetFilterDefaultScope

func (api *API) GetFilterDefaultScope() (string, error)

GetFilterDefaultScope returns the default share scope of the logged-in user https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2616

func (*API) GetFilterFavourites

func (api *API) GetFilterFavourites(params ExpandParameters) ([]*Filter, error)

GetFilterFavourites returns the favourite filters of the logged-in user https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2597

func (*API) GetGroup

func (api *API) GetGroup(params GroupParams) (*Group, error)

GetGroup returns representation for the requested group. Allows to get list of active users belonging to the specified group and its subgroups if "users" expand option is provided. You can page through users list by using indexes in expand param. For example to get users from index 10 to index 15 use "users[10:15]" expand value. This will return 6 users (if there are at least 16 users in this group). Indexes are 0-based and inclusive. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2890

func (*API) GetIssue

func (api *API) GetIssue(issueIDOrKey string, params IssueParams) (*Issue, error)

GetIssue returns a full representation of the issue for the given issue key https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4164

func (*API) GetIssueComment

func (api *API) GetIssueComment(issueIDOrKey, commentID string, params ExpandParameters) (*Comment, error)

GetIssueComment returns comment for an issue https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3987

func (*API) GetIssueComments

func (api *API) GetIssueComments(issueIDOrKey string, params ExpandParameters) (*CommentCollection, error)

GetIssueComments returns all comments for an issue https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3930

func (api *API) GetIssueLink(linkID string) (*Link, error)

GetIssueLink returns an issue link with the specified id https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3334

func (*API) GetIssueLinkType

func (api *API) GetIssueLinkType(linkTypeID string) (*LinkType, error)

GetIssueLinkType returns for a given issue link type id all information about this issue link type https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5004

func (*API) GetIssueLinkTypes

func (api *API) GetIssueLinkTypes() ([]*LinkType, error)

GetIssueLinkTypes returns a list of available issue link types, if issue linking is enabled. Each issue link type has an id, a name and a label for the outward and inward link relationship. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4959

func (*API) GetIssueMeta

func (api *API) GetIssueMeta(issueIDOrKey string) (*IssueMeta, error)

GetIssueMeta returns the meta data for editing an issue https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4364

func (*API) GetIssueProperties

func (api *API) GetIssueProperties(issueIDOrKey string) ([]*Property, error)

GetIssueProperties returns the keys of all properties for the issue identified by the key or by the id https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4856

func (*API) GetIssueProperty

func (api *API) GetIssueProperty(issueIDOrKey, propKey string) (*Property, error)

GetIssueProperty returns the value of the property with a given key from the issue identified by the key or by the id. The user who retrieves the property is required to have permissions to read the issue. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4911

func (api *API) GetIssueRemoteLink(issueIDOrKey, linkID string) (*RemoteLink, error)

GetIssueRemoteLink returns remote issue link with the given id on the issue https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4478

func (api *API) GetIssueRemoteLinks(issueIDOrKey string, params RemoteLinkParams) ([]*RemoteLink, error)

GetIssueRemoteLinks returns sub-resource representing the remote issue links on the issue https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4385

func (*API) GetIssueTransitions

func (api *API) GetIssueTransitions(issueIDOrKey string, params TransitionsParams) ([]*Transition, error)

GetIssueTransitions returns a list of the transitions possible for this issue by the current user, along with fields that are required and their types https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4051

func (*API) GetIssueType

func (api *API) GetIssueType(issueTypeID string) (*IssueType, error)

GetIssueType returns a full representation of the issue type that has the given id https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5585

func (*API) GetIssueTypeAlternatives

func (api *API) GetIssueTypeAlternatives(issueTypeID string) ([]*IssueType, error)

GetIssueTypeAlternatives returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated. The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5754

func (*API) GetIssueTypes

func (api *API) GetIssueTypes() ([]*IssueType, error)

GetIssueTypes returns a list of all issue types visible to the user https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5567

func (*API) GetIssueVotes

func (api *API) GetIssueVotes(issueIDOrKey string) (*VotesInfo, error)

GetIssueVotes returns sub-resource representing the voters on the issue https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4143

func (*API) GetIssueWatchers

func (api *API) GetIssueWatchers(issueIDOrKey string) (*WatchersInfo, error)

GetIssueWatchers returns the list of watchers for the issue with the given key https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4232

func (*API) GetIssueWorklog

func (api *API) GetIssueWorklog(issueIDOrKey, worklogID string) (*Worklog, error)

GetIssueWorklog returns a specific worklog https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4611

func (*API) GetIssueWorklogs

func (api *API) GetIssueWorklogs(issueIDOrKey string) (*WorklogCollection, error)

GetIssueWorklogs returns all work logs for an issue https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4232

func (*API) GetMyPermissions

func (api *API) GetMyPermissions(params PermissionsParams) (map[string]*Permission, error)

GetMyPermissions returns all permissions in the system and whether the currently logged in user has them. You can optionally provide a specific context to get permissions for (projectKey OR projectId OR issueKey OR issueId) https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5925

func (*API) GetMyself

func (api *API) GetMyself() (*User, error)

GetMyself returns currently logged user https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1107

func (*API) GetPriorities

func (api *API) GetPriorities() ([]*Priority, error)

GetPriorities returns a list of all issue priorities https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2804

func (*API) GetPriority

func (api *API) GetPriority(priorityID string) (*Priority, error)

GetPriority returns an issue priority https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2822

func (*API) GetProject

func (api *API) GetProject(projectIDOrKey string, params ExpandParameters) (*Project, error)

GetProject returns a full representation of a project https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3509

func (*API) GetProjectAvatars

func (api *API) GetProjectAvatars(projectIDOrKey string) (*Avatars, error)

GetProjectAvatars returns all avatars which are visible for the currently logged in user. The avatars are grouped into system and custom. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3555

func (*API) GetProjectCategories

func (api *API) GetProjectCategories() ([]*ProjectCategory, error)

GetProjectCategories returns all project categories https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1411

func (*API) GetProjectCategory

func (api *API) GetProjectCategory(categoryID string) (*ProjectCategory, error)

GetProjectCategory returns a representation of a project category https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1459

func (*API) GetProjectComponents

func (api *API) GetProjectComponents(projectIDOrKey string) ([]*Component, error)

GetProjectComponents returns a full representation of a the specified project's components https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3757

func (*API) GetProjectProperties

func (api *API) GetProjectProperties(projectIDOrKey string) ([]*Property, error)

GetProjectProperties returns the keys of all properties for the project identified by the key or by the id https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e881

func (*API) GetProjectProperty

func (api *API) GetProjectProperty(projectIDOrKey, propKey string) (*Property, error)

GetProjectProperty returns the value of the property with a given key from the project identified by the key or by the id. The user who retrieves the property is required to have permissions to read the project. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e936

func (*API) GetProjectRole

func (api *API) GetProjectRole(projectIDOrKey, roleID string) (*Role, error)

GetProjectRole return details on a given project role https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e936

func (*API) GetProjectRoles

func (api *API) GetProjectRoles(projectIDOrKey string) (map[string]string, error)

GetProjectRoles returns a list of roles in this project with links to full details https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4690

func (*API) GetProjectStatuses

func (api *API) GetProjectStatuses(projectIDOrKey string) ([]*IssueType, error)

GetProjectStatuses returns all issue types with valid status values for a project https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3534

func (*API) GetProjectVersion

func (api *API) GetProjectVersion(projectIDOrKey string, params VersionParams) (*VersionCollection, error)

GetProjectVersion returns all versions for the specified project https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3723

func (*API) GetProjectVersions

func (api *API) GetProjectVersions(projectIDOrKey string, params ExpandParameters) ([]*Version, error)

GetProjectVersions returns the keys of all properties for the project identified by the key or by the id

func (*API) GetProjects

func (api *API) GetProjects(params ExpandParameters) ([]*Project, error)

GetProjects returns all projects which are visible for the currently logged in user. If no user is logged in, it returns the list of projects that are visible when using anonymous access. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3484

func (*API) GetResolution

func (api *API) GetResolution(resolutionID string) (*Resolution, error)

GetResolution returns a resolution https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e860

func (*API) GetResolutions

func (api *API) GetResolutions() ([]*Resolution, error)

GetResolutions returns a list of all resolutions https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e842

func (*API) GetRole

func (api *API) GetRole(roleID string) (*Role, error)

GetRole returns a specific ProjectRole available in JIRA https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2786

func (*API) GetRoles

func (api *API) GetRoles() ([]*Role, error)

GetRoles returns all the ProjectRoles available in JIRA. Currently this list is global. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2767

func (*API) GetScreenFields

func (api *API) GetScreenFields(screenID string) ([]*ScreenField, error)

GetScreenFields returns available fields for screen. i.e ones that haven't already been added https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3189

func (*API) GetScreenTabFields

func (api *API) GetScreenTabFields(screenID, tabID string, params ScreenParams) ([]*ScreenField, error)

GetScreenTabFields returns all fields for a given tab https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3103

func (*API) GetScreenTabs

func (api *API) GetScreenTabs(screenID string, params ScreenParams) ([]*ScreenTab, error)

GetScreenTabs returns a list of all tabs for the given screen https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e3036

func (*API) GetSecurityLevel

func (api *API) GetSecurityLevel(levelID string) (*SecurityLevel, error)

GetSecurityLevel returns a full representation of the security level that has the given id https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4818

func (*API) GetServerInfo

func (api *API) GetServerInfo(DoHealthCheck bool) (*ServerInfo, error)

GetServerInfo returns general information about the current JIRA server https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4836

func (*API) GetStatus

func (api *API) GetStatus(statusIDOrName string) (*Status, error)

GetStatus returns a full representation of the Status having the given id or name https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e74

func (*API) GetStatusCategories

func (api *API) GetStatusCategories() ([]*StatusCategory, error)

GetStatusCategories returns a list of all status categories https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5772

func (*API) GetStatusCategory

func (api *API) GetStatusCategory(caregoryIDOrName string) (*StatusCategory, error)

GetStatusCategory returns a full representation of the StatusCategory having the given id or key https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5793

func (*API) GetStatuses

func (api *API) GetStatuses() ([]*Status, error)

GetStatuses returns a list of all statuses https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e53

func (*API) GetUser

func (api *API) GetUser(params UserParams) (*User, error)

GetUser returns a user https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1869

func (*API) GetUserAvatars

func (api *API) GetUserAvatars(username string) (*Avatars, error)

GetUserAvatars returns all avatars which are visible for the currently logged in user https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2248

func (*API) GetUserColumns

func (api *API) GetUserColumns(username string) ([]*Column, error)

GetUserColumns returns the default columns for the given user. Admin permission will be required to get columns for a user other than the currently logged in user. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2400

func (*API) GetUsersByPermissions

func (api *API) GetUsersByPermissions(params UserPermissionParams) ([]*User, error)

GetUsersByPermissions eturns a list of active users that match the search string and have all specified permissions for the project or issue. This resource can be accessed by users with ADMINISTER_PROJECT permission for the project or global ADMIN or SYSADMIN rights.

func (*API) GetVersion

func (api *API) GetVersion(versionID string, params ExpandParameters) (*Version, error)

GetVersion returns a project version https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5271

func (*API) GetVersionRelatedCounts

func (api *API) GetVersionRelatedCounts(versionID string) (int, int, error)

GetVersionRelatedCounts returns a bean containing the number of fixed in and affected issues for the given version https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5316

func (*API) GetVersionUnresolvedCount

func (api *API) GetVersionUnresolvedCount(versionID string) (int, error)

GetVersionUnresolvedCount eturns the number of unresolved issues for the given version https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5337

func (*API) GetWorkflow

func (api *API) GetWorkflow(workflowName string) (*Workflow, error)

GetWorkflow return workflow https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1208

func (*API) GetWorkflowScheme

func (api *API) GetWorkflowScheme(schemeID string, returnDraftIfExists bool) (*WorkflowScheme, error)

GetWorkflowScheme returns the requested workflow scheme to the caller https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e292

func (*API) GetWorkflowSchemeDefault

func (api *API) GetWorkflowSchemeDefault(schemeID string, returnDraftIfExists bool) (string, error)

GetWorkflowSchemeDefault returns the requested draft workflow scheme to the caller https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e184

func (*API) GetWorkflowSchemeWorkflows

func (api *API) GetWorkflowSchemeWorkflows(schemeID string, returnDraftIfExists bool) ([]*WorkflowInfo, error)

GetWorkflowSchemeWorkflows returns the workflow mappings or requested mapping to the caller for the passed scheme https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e423

func (*API) GetWorkflows

func (api *API) GetWorkflows() ([]*Workflow, error)

GetWorkflows returns all workflows https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1208

func (*API) GroupPicker

func (api *API) GroupPicker(params GroupPickerParams) (*GroupPickerResults, error)

GroupPicker returns groups with substrings matching a given query. This is mainly for use with the group picker, so the returned groups contain html to be used as picker suggestions. The groups are also wrapped in a single response object that also contains a header for use in the picker, specifically Showing X of Y matching groups. The number of groups returned is limited by the system property "jira.ajax.autocomplete.limit" The groups will be unique and sorted. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e5199

func (*API) GroupUserPicker

func (api *API) GroupUserPicker(params GroupUserPickerParams) (*GroupUserPickerResults, error)

GroupUserPicker returns a list of users and groups matching query with highlighting https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1792

func (*API) IssuePicker

func (api *API) IssuePicker(params IssuePickerParams) ([]*IssuePickerResults, error)

IssuePicker returns suggested issues which match the auto-completion query for the user which executes this request. This REST method will check the user's history and the user's browsing context and select this issues, which match the query. https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4093

func (*API) Search

func (api *API) Search(params SearchParams) (*SearchResults, error)

Search searches for issues using JQL https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1528

func (*API) SearchUsers

func (api *API) SearchUsers(params UserSearchParams) ([]*User, error)

SearchUsers returns a list of users that match the search string https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e1990

func (*API) SetIssueProperty

func (api *API) SetIssueProperty(issueIDOrKey string, prop *Property) error

SetIssueProperty sets the value of the specified issue's property https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4889

func (*API) SetProjectProperty

func (api *API) SetProjectProperty(projectIDOrKey string, prop *Property) error

SetProjectProperty sets the value of the specified project's property https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e914

func (*API) SetUserAgent

func (api *API) SetUserAgent(app, version string)

SetUserAgent set user-agent string based on app name and version

func (*API) UserPicker

func (api *API) UserPicker(params UserPickerParams) (*UserPickerResults, error)

UserPicker returns a list of users matching query with highlighting https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e2027

func (*API) ValidateProjectKey

func (api *API) ValidateProjectKey(projectKey string) error

ValidateProjectKey validates a project key https://docs.atlassian.com/software/jira/docs/api/REST/6.4.13/#d2e4795

type Actor

type Actor struct {
	ID          int    `json:"id"`
	Type        string `json:"type"`
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	AvatarURL   string `json:"avatarUrl"`
}

Actor contains info about role actor

type Attachment

type Attachment struct {
	ID        string `json:"id"`
	Filename  string `json:"filename"`
	MIMEType  string `json:"mimeType"`
	Content   string `json:"content"`
	Thumbnail string `json:"thumbnail"`
	Created   *Date  `json:"created"`
	Author    *User  `json:"author"`
	Size      int    `json:"size"`
}

Attachment contains info about attachment

type AutocompleteData

type AutocompleteData struct {
	VisibleFieldNames    []*JQLField    `json:"visibleFieldNames"`
	VisibleFunctionNames []*JQLFunction `json:"visibleFunctionNames"`
	ReservedWords        []string       `json:"jqlReservedWords"`
}

AutocompleteData contains autocomplete data

type Avatar

type Avatar struct {
	ID             string     `json:"id"`
	AvatarURL      *AvatarURL `json:"urls"`
	IsSystemAvatar bool       `json:"isSystemAvatar"`
	IsSelected     bool       `json:"isSelected"`
}

Avatar contains info about project/user avatar

type AvatarURL

type AvatarURL struct {
	Size16 string `json:"16x16"`
	Size24 string `json:"24x24"`
	Size32 string `json:"32x32"`
	Size48 string `json:"48x48"`
}

AvatarURL contains avatars urls

type Avatars

type Avatars struct {
	System []*Avatar `json:"system"`
	Custom []*Avatar `json:"custom"`
}

Avatars contains info about project/user avatars

type Column

type Column struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

Column contains info about column

type Comment

type Comment struct {
	ID           string `json:"id"`
	Body         string `json:"body"`
	Created      *Date  `json:"created"`
	Updated      *Date  `json:"updated"`
	Author       *User  `json:"author"`
	UpdateAuthor *User  `json:"updateAuthor"`
}

Comment contains info about comment

type CommentCollection

type CommentCollection struct {
	StartAt    int        `json:"startAt"`
	MaxResults int        `json:"maxResults"`
	Total      int        `json:"total"`
	Data       []*Comment `json:"comments"`
}

CommentCollection is comment collection

type Component

type Component struct {
	ID                  string `json:"id"`
	Name                string `json:"name"`
	Description         string `json:"description"`
	AssigneeType        string `json:"assigneeType"`
	RealAssigneeType    string `json:"realAssigneeType"`
	Project             string `json:"project"`
	Assignee            *User  `json:"assignee"`
	RealAssignee        *User  `json:"realAssignee"`
	ProjectID           int    `json:"projectId"`
	IsAssigneeTypeValid bool   `json:"isAssigneeTypeValid"`
}

Component contains info about component

type Configuration

type Configuration struct {
	TimeTrackingConfiguration *TimeTrackingConfiguration `json:"timeTrackingConfiguration"`
	IsVotingEnabled           bool                       `json:"votingEnabled"`
	IsWatchingEnabled         bool                       `json:"watchingEnabled"`
	IsUnassignedIssuesAllowed bool                       `json:"unassignedIssuesAllowed"`
	IsSubTasksEnabled         bool                       `json:"subTasksEnabled"`
	IsIssueLinkingEnabled     bool                       `json:"issueLinkingEnabled"`
	IsTimeTrackingEnabled     bool                       `json:"timeTrackingEnabled"`
	IsAttachmentsEnabled      bool                       `json:"attachmentsEnabled"`
}

Configuration contains info about optional features

type CreateMetaParams

type CreateMetaParams struct {
	ProjectIDs     []string `query:"projectIds"`
	ProjectKeys    []string `query:"projectKeys"`
	IssueTypeIDs   []string `query:"issuetypeIds"`
	IssueTypeNames []string `query:"issuetypeNames"`
}

CreateMetaParams params for fetching metadata for creating issues

func (CreateMetaParams) ToQuery

func (p CreateMetaParams) ToQuery() string

ToQuery converts params to URL query

type CustomFieldsStore

type CustomFieldsStore map[string]json.RawMessage

CustomFieldsStore is store for custom fields data

func (CustomFieldsStore) Get

func (s CustomFieldsStore) Get(name string) string

Get returns custom field data as a string

func (CustomFieldsStore) Has

func (s CustomFieldsStore) Has(name string) bool

Has returns true if custom field with given name exists in store

func (CustomFieldsStore) Unmarshal

func (s CustomFieldsStore) Unmarshal(name string, v interface{}) error

Unmarshal unmarshals custom field data

type Dashboard

type Dashboard struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	View string `json:"view"`
}

Dashboard contains info about dashboard

type DashboardCollection

type DashboardCollection struct {
	StartAt    int          `json:"startAt"`
	MaxResults int          `json:"maxResults"`
	Total      int          `json:"total"`
	Data       []*Dashboard `json:"dashboards"`
}

DashboardCollection is dashboard collection

type DashboardParams

type DashboardParams struct {
	Filter     string `query:"filter"`
	StartAt    int    `query:"startAt"`
	MaxResults int    `query:"maxResults"`
}

DashboardParams is params for fetching dashboards

func (DashboardParams) ToQuery

func (p DashboardParams) ToQuery() string

ToQuery converts params to URL query

type Date

type Date struct {
	time.Time
}

Date is RFC3339 encoded date

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom Date format unmarshaler

type EmptyParameters

type EmptyParameters struct {
}

EmptyParameters is empty parameters

func (EmptyParameters) ToQuery

func (p EmptyParameters) ToQuery() string

ToQuery converts params to URL query

type ErrorCollection

type ErrorCollection struct {
	ErrorMessages []string          `json:"errorMessages"`
	Errors        map[string]string `json:"errors"`
}

ErrorCollection is JIRA error struct

func (*ErrorCollection) Error

func (e *ErrorCollection) Error() error

Error returnsa first error extracted from error collection

type ExpandParameters

type ExpandParameters struct {
	Expand []string `query:"expand"`
}

ExpandParameters is params with field expand info

func (ExpandParameters) ToQuery

func (p ExpandParameters) ToQuery() string

ToQuery converts params to URL query

type Field

type Field struct {
	ClauseNames  []string     `json:"clauseNames"`
	ID           string       `json:"id"`
	Name         string       `json:"name"`
	Schema       *FieldSchema `json:"schema"`
	IsCustom     bool         `json:"custom"`
	IsOrderable  bool         `json:"orderable"`
	IsNavigable  bool         `json:"navigable"`
	IsSearchable bool         `json:"searchable"`
}

Field contains info about field

type FieldMeta

type FieldMeta struct {
	Name            string            `json:"name"`
	AutoCompleteURL string            `json:"autoCompleteUrl"`
	Operations      []string          `json:"operations"`
	AllowedValues   []*FieldMetaValue `json:"allowedValues"`
	IsRequired      bool              `json:"required"`
}

FieldMeta contains field meta

type FieldMetaValue

type FieldMetaValue struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

FieldMetaValue contains field meta value

type FieldSchema

type FieldSchema struct {
	Type     string `json:"type"`
	Items    string `json:"items"`
	System   string `json:"system"`
	Custom   string `json:"custom"`
	CustomID int    `json:"customId"`
}

FieldSchema contains field schema

type Filter

type Filter struct {
	SharePermissions []*FilterSharePermission `json:"sharePermissions"`
	ID               string                   `json:"id"`
	Name             string                   `json:"name"`
	Description      string                   `json:"description"`
	JQL              string                   `json:"jql"`
	ViewURL          string                   `json:"viewUrl"`
	SearchURL        string                   `json:"searchUrl"`
	Owner            *User                    `json:"owner"`
	SharedUsers      *UserCollection          `json:"sharedUsers"`
	Subscriptions    *FilterSubscriptions     `json:"subscriptions"`
	IsFavourite      bool                     `json:"favourite"`
}

Filter contains info about filter

type FilterSharePermission

type FilterSharePermission struct {
	ID      int      `json:"id"`
	Type    string   `json:"type"`
	Project *Project `json:"project"`
	Group   *Group   `json:"group"`
}

FilterSharePermission contains info about share permission

type FilterSubscription

type FilterSubscription struct {
	ID   int   `json:"id"`
	User *User `json:"user"`
}

FilterSubscription contains info about filter subscription

type FilterSubscriptions

type FilterSubscriptions struct {
	Size       int                   `json:"size"`
	MaxResults int                   `json:"max-results"`
	StartIndex int                   `json:"start-index"`
	EndIndex   int                   `json:"end-index"`
	Items      []*FilterSubscription `json:"items"`
}

FilterSubscriptions contains info about filter subscriptions

type Group

type Group struct {
	Name  string          `json:"name"`
	Users *UserCollection `json:"users"`
}

Group contains info about user group

type GroupInfo

type GroupInfo struct {
	Name string `json:"name"`
	HTML string `json:"html"`
}

GroupInfo contains simple info about group

type GroupParams

type GroupParams struct {
	Name   string   `query:"groupname"`
	Expand []string `query:"expand"`
}

GroupParams is params for fetching groups info

func (GroupParams) ToQuery

func (p GroupParams) ToQuery() string

ToQuery converts params to URL query

type GroupPickerParams

type GroupPickerParams struct {
	Query      string `query:"query"`
	Exclude    string `query:"exclude"`
	MaxResults int    `query:"maxResults"`
}

GroupPickerParams is params for fetching data from group picker

func (GroupPickerParams) ToQuery

func (p GroupPickerParams) ToQuery() string

ToQuery converts params to URL query

type GroupPickerResults

type GroupPickerResults struct {
	Header string       `json:"header"`
	Total  int          `json:"total"`
	Groups []*GroupInfo `json:"groups"`
}

GroupPickerResults contains group picker response data

type GroupUserPickerParams

type GroupUserPickerParams struct {
	ProjectID   []string `query:"projectId,unwrap"`
	IssueTypeID []string `query:"issueTypeId,unwrap"`
	Query       string   `query:"query"`
	FieldID     string   `query:"fieldId"`
	MaxResults  int      `query:"maxResults"`
	ShowAvatar  bool     `query:"showAvatar"`
}

GroupUserPickerParams is params for fetching data from user/group picker

func (GroupUserPickerParams) ToQuery

func (p GroupUserPickerParams) ToQuery() string

ToQuery converts params to URL query

type GroupUserPickerResults

type GroupUserPickerResults struct {
	Users  *UserPickerResults  `json:"users"`
	Groups *GroupPickerResults `json:"groups"`
}

GroupUserPickerResults contains user/group picker response data

type HealthCheck

type HealthCheck struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	IsPassed    bool   `json:"passed"`
}

HealthCheck contains info about health check

type Issue

type Issue struct {
	ID     string       `json:"id"`
	Key    string       `json:"key"`
	Fields *IssueFields `json:"fields"`
}

Issue is basic issue struct

type IssueFields

type IssueFields struct {
	TimeSpent                     int                `json:"timespent"`
	TimeEstimate                  int                `json:"timeestimate"`
	TimeOriginalEstimate          int                `json:"timeoriginalestimate"`
	AggregateTimeSpent            int                `json:"aggregatetimespent"`
	AggregateTimeEstimate         int                `json:"aggregatetimeestimate"`
	AggregateTimeOriginalEstimate int                `json:"aggregatetimeoriginalestimate"`
	WorkRatio                     int                `json:"workratio"`
	Summary                       string             `json:"summary"`
	Description                   string             `json:"description"`
	Environment                   string             `json:"environment"`
	Created                       *Date              `json:"created"`
	DueDate                       *Date              `json:"duedate"`
	LastViewed                    *Date              `json:"lastViewed"`
	ResolutionDate                *Date              `json:"resolutiondate"`
	Updated                       *Date              `json:"updated"`
	Creator                       *User              `json:"creator"`
	Reporter                      *User              `json:"reporter"`
	Assignee                      *User              `json:"assignee"`
	AggregateProgress             *Progress          `json:"aggregateprogress"`
	Progress                      *Progress          `json:"progress"`
	IssueType                     *IssueType         `json:"issuetype"`
	Parent                        *Issue             `json:"parent"`
	Project                       *Project           `json:"project"`
	Resolution                    *Resolution        `json:"resolution"`
	TimeTracking                  *TimeTracking      `json:"timetracking"`
	Watches                       *Watches           `json:"watches"`
	Priority                      *Priority          `json:"priority"`
	Comments                      *CommentCollection `json:"comment"`
	Worklogs                      *WorklogCollection `json:"worklog"`
	Votes                         *VotesInfo         `json:"votes"`
	Status                        *Status            `json:"status"`
	Security                      *SecurityLevel     `json:"security"`
	Labels                        []string           `json:"labels"`
	Components                    []*Component       `json:"components"`
	Attachments                   []*Attachment      `json:"attachment"`
	SubTasks                      []*Issue           `json:"subtasks"`
	Versions                      []*Version         `json:"versions"`
	FixVersions                   []*Version         `json:"fixVersions"`
	Issuelinks                    []*Link            `json:"issuelinks"`
	Custom                        CustomFieldsStore  `json:"-"`
}

IssueFields contains all available issue fields

func (*IssueFields) UnmarshalJSON

func (f *IssueFields) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom IssueFields unmarshaler

type IssueInfo

type IssueInfo struct {
	Key         string `json:"key"`
	KeyHTML     string `json:"keyHtml"`
	Img         string `json:"img"`
	Summary     string `json:"summary"`
	SummaryText string `json:"summaryText"`
}

IssueInfo contains simple info about issue

type IssueMeta

type IssueMeta struct {
	Fields map[string]*FieldMeta `json:"fields"`
}

IssueMeta contains meta data for editing an issue

type IssueParams

type IssueParams struct {
	Fields []string `query:"fields,unwrap"`
	Expand []string `query:"expand"`
}

IssueParams is params for fetching issue info

func (IssueParams) ToQuery

func (p IssueParams) ToQuery() string

ToQuery converts params to URL query

type IssuePickerParams

type IssuePickerParams struct {
	Query             string `query:"query"`
	CurrentJQL        string `query:"currentJQL"`
	CurrentIssueKey   string `query:"currentIssueKey"`
	CurrentProjectID  string `query:"currentProjectId"`
	ShowSubTasks      bool   `query:"showSubTasks,respect"`
	ShowSubTaskParent bool   `query:"showSubTaskParent,respect"`
}

IssuePickerParams is params for fetching data from issue picker

func (IssuePickerParams) ToQuery

func (p IssuePickerParams) ToQuery() string

ToQuery converts params to URL query

type IssuePickerResults

type IssuePickerResults struct {
	Label  string       `json:"label"`
	Sub    string       `json:"sub"`
	ID     string       `json:"id"`
	Msg    string       `json:"msg"`
	Issues []*IssueInfo `json:"issues"`
}

IssuePickerResults contains issue picker response data

type IssueType

type IssueType struct {
	Statuses    []*Status `json:"statuses"`
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	IconURL     string    `json:"iconUrl"`
	AvatarID    int       `json:"avatarId"`
	IsSubTask   bool      `json:"subtask"`
}

IssueType contains info about issue type

type JQLField

type JQLField struct {
	Value       string   `json:"value"`
	DisplayName string   `json:"displayName"`
	CfID        string   `json:"cfid"`
	Auto        string   `json:"auto"`
	Orderable   string   `json:"orderable"`
	Searchable  string   `json:"searchable"`
	Operators   []string `json:"operators"`
	Types       []string `json:"types"`
}

JQLField contains info about JQL field

type JQLFunction

type JQLFunction struct {
	Value       string   `json:"value"`
	DisplayName string   `json:"displayName"`
	IsList      string   `json:"isList"`
	Types       []string `json:"types"`
}

JQLFunction contains info about JQL function

type Link struct {
	ID           string    `json:"id"`
	Type         *LinkType `json:"type"`
	InwardIssue  *Issue    `json:"inwardIssue"`
	OutwardIssue *Issue    `json:"outwardIssue"`
}

Link contains info about link

type LinkType

type LinkType struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Inward  string `json:"inward"`
	Outward string `json:"outward"`
}

LinkType contains info about link type

type Parameters

type Parameters interface {
	ToQuery() string
}

Parameters is interface for params structs

type Permission

type Permission struct {
	ID               string `json:"id"`
	Key              string `json:"key"`
	Name             string `json:"name"`
	Type             string `json:"type"`
	Description      string `json:"description"`
	IsHavePermission bool   `json:"havePermission"`
	IsDeprecatedKey  bool   `json:"deprecatedKey"`
}

Permission contains info about permission

type PermissionsParams

type PermissionsParams struct {
	ProjectKey string `query:"projectKey"`
	ProjectID  string `query:"projectId"`
	IssueKey   string `query:"issueKey"`
	IssueID    string `query:"issueId"`
}

PermissionsParams is params for fetching parmissions info

func (PermissionsParams) ToQuery

func (p PermissionsParams) ToQuery() string

ToQuery converts params to URL query

type Priority

type Priority struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	IconURL     string `json:"iconUrl"`
	Description string `json:"description"`
	StatusColor string `json:"statusColor"`
}

Priority contains priority info

type Progress

type Progress struct {
	Percent  float64 `json:"percent"`
	Progress int     `json:"progress"`
	Total    int     `json:"total"`
}

Progress contains info about issue progress

type Project

type Project struct {
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Key          string            `json:"key"`
	URL          string            `json:"url"`
	AssigneeType string            `json:"assigneeType"`
	Lead         *User             `json:"lead"`
	Category     *ProjectCategory  `json:"projectCategory"`
	AvatarURL    *AvatarURL        `json:"avatarUrls"`
	ProjectKeys  []string          `json:"projectKeys"`
	IssueTypes   []*IssueType      `json:"issueTypes"`
	Versions     []*Version        `json:"versions"`
	Components   []*Component      `json:"components"`
	Roles        map[string]string `json:"roles"`
}

Project contains info about project

type ProjectCategory

type ProjectCategory struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

ProjectCategory contains info about project category

type Property

type Property struct {
	Key   string            `json:"key"`
	Value map[string]string `json:"value"`
}

Property contains info about property

type RemoteLink struct {
	ID          int             `json:"id"`
	GlobalID    string          `json:"globalId"`
	Application *RemoteLinkApp  `json:"application"`
	Info        *RemoteLinkInfo `json:"object"`
}

RemoteLink contains info about remote link

type RemoteLinkApp

type RemoteLinkApp struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

RemoteLinkApp contains info about link app

type RemoteLinkIcon

type RemoteLinkIcon struct {
	URL string `json:"url16x16"`
}

RemoteLinkIcon contains icon URL

type RemoteLinkInfo

type RemoteLinkInfo struct {
	URL   string          `json:"url"`
	Title string          `json:"title"`
	Icon  *RemoteLinkIcon `json:"icon"`
}

RemoteLinkInfo contains basic info about remote link

type RemoteLinkParams

type RemoteLinkParams struct {
	GlobalID string `query:"globalId"`
}

RemoteLinkParams is params for fetching remote link info

func (RemoteLinkParams) ToQuery

func (p RemoteLinkParams) ToQuery() string

ToQuery converts params to URL query

type Resolution

type Resolution struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Resolution contains resolution info

type Role

type Role struct {
	ID          int      `json:"id"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Actors      []*Actor `json:"actors"`
}

Role contains info about role

type ScreenField

type ScreenField struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

ScreenField contains info about screen field

type ScreenParams

type ScreenParams struct {
	ProjectKey string `query:"projectKey"`
}

ScreenParams is params for fetching info about screen

func (ScreenParams) ToQuery

func (p ScreenParams) ToQuery() string

ToQuery converts params to URL query

type ScreenTab

type ScreenTab struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

ScreenTab contains info about screen tab

type SearchParams

type SearchParams struct {
	Fields                 []string `query:"fields"`
	Expand                 []string `query:"expand"`
	JQL                    string   `query:"jql"`
	StartAt                int      `query:"startAt"`
	MaxResults             int      `query:"maxResults"`
	DisableQueryValidation bool     `query:"validateQuery,reverse"`
}

SearchParams is params for fetching search results

func (SearchParams) ToQuery

func (p SearchParams) ToQuery() string

ToQuery converts params to URL query

type SearchResults

type SearchResults struct {
	StartAt    int      `json:"startAt"`
	MaxResults int      `json:"maxResults"`
	Total      int      `json:"total"`
	Issues     []*Issue `json:"issues"`
}

SearchResults contains search result

type SecurityLevel

type SecurityLevel struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

SecurityLevel contains info about security level

type ServerInfo

type ServerInfo struct {
	BuildDate      *Date          `json:"buildDate"`
	ServerTime     *Date          `json:"serverTime"`
	BaseURL        string         `json:"baseUrl"`
	Version        string         `json:"version"`
	SCMInfo        string         `json:"scmInfo"`
	ServerTitle    string         `json:"serverTitle"`
	VersionNumbers []int          `json:"versionNumbers"`
	BuildNumber    int            `json:"buildNumber"`
	HealthChecks   []*HealthCheck `json:"healthChecks"`
}

ServerInfo contains info about JIRA instance

type Status

type Status struct {
	ID          string          `json:"id"`
	Name        string          `json:"name"`
	Description string          `json:"description"`
	IconURL     string          `json:"iconUrl"`
	Category    *StatusCategory `json:"statusCategory"`
}

Status contains info about issue status

type StatusCategory

type StatusCategory struct {
	ID        int    `json:"id"`
	Key       string `json:"key"`
	Name      string `json:"name"`
	ColorName string `json:"colorName"`
}

StatusCategory contains info about status category

type Suggestion

type Suggestion struct {
	Value       string `json:"value"`
	DisplayName string `json:"displayName"`
}

Suggestion contains suggestion info

type SuggestionParams

type SuggestionParams struct {
	FieldName      string `query:"fieldName"`
	FieldValue     string `query:"fieldValue"`
	PredicateName  string `query:"predicateName"`
	PredicateValue string `query:"predicateValue"`
}

SuggestionParams is params for fetching suggestions

func (SuggestionParams) ToQuery

func (p SuggestionParams) ToQuery() string

ToQuery converts params to URL query

type TimeTracking

type TimeTracking struct {
	RemainingEstimate        string `json:"remainingEstimate"`
	TimeSpent                string `json:"timeSpent"`
	RemainingEstimateSeconds int    `json:"remainingEstimateSeconds"`
	TimeSpentSeconds         int    `json:"timeSpentSeconds"`
}

TimeTracking contains info about time tracking

type TimeTrackingConfiguration

type TimeTrackingConfiguration struct {
	WorkingHoursPerDay float64 `json:"workingHoursPerDay"`
	WorkingDaysPerWeek float64 `json:"workingDaysPerWeek"`
	TimeFormat         string  `json:"timeFormat"`
	DefaultUnit        string  `json:"defaultUnit"`
}

TimeTrackingConfiguration contains detailed info about time tracking configuration

type Transition

type Transition struct {
	ID     string                `json:"id"`
	Name   string                `json:"name"`
	To     *Status               `json:"to"`
	Fields map[string]*FieldMeta `json:"fields"`
}

Transition contains info about transition

type TransitionsParams

type TransitionsParams struct {
	TransitionID string   `query:"transitionId"`
	Expand       []string `query:"expand"`
}

TransitionsParams is params for fetching transitions info

func (TransitionsParams) ToQuery

func (p TransitionsParams) ToQuery() string

ToQuery converts params to URL query

type User

type User struct {
	AvatarURL   *AvatarURL  `json:"avatarUrls"`
	Name        string      `json:"name"`
	Key         string      `json:"key"`
	Email       string      `json:"emailAddress"`
	DisplayName string      `json:"displayName"`
	TimeZone    string      `json:"timeZone"`
	Locale      string      `json:"locale"`
	Groups      *UserGroups `json:"groups"`
	IsActive    bool        `json:"active"`
}

User contains user info

type UserCollection

type UserCollection struct {
	Size       int     `json:"size"`
	MaxResults int     `json:"max-results"`
	StartIndex int     `json:"start-index"`
	EndIndex   int     `json:"end-index"`
	Items      []*User `json:"items"`
}

UserCollection is users collection

type UserGroups

type UserGroups struct {
	Size  int      `json:"size"`
	Items []*Group `json:"items"`
}

UserGroups contains info about user groups

type UserInfo

type UserInfo struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Key         string `json:"key"`
	HTML        string `json:"html"`
}

UserInfo contains simple info about user

type UserParams

type UserParams struct {
	Username string   `query:"username"`
	Key      string   `query:"key"`
	Expand   []string `query:"expand"`
}

UserParams is params for fetching user info

func (UserParams) ToQuery

func (p UserParams) ToQuery() string

ToQuery converts params to URL query

type UserPermissionParams

type UserPermissionParams struct {
	Username    string   `query:"username"`
	Permissions []string `query:"permissions"`
	IssueKey    string   `query:"issueKey"`
	ProjectKey  string   `query:"projectKey"`
	StartAt     int      `query:"startAt"`
	MaxResults  int      `query:"maxResults"`
}

UserPermissionParams is permissions for fetching users by permissions

func (UserPermissionParams) ToQuery

func (p UserPermissionParams) ToQuery() string

ToQuery converts params to URL query

type UserPickerParams

type UserPickerParams struct {
	Query      string `query:"query"`
	Exclude    string `query:"exclude"`
	MaxResults int    `query:"maxResults"`
	ShowAvatar bool   `query:"showAvatar"`
}

UserPickerParams is params for fetching data from user picker

func (UserPickerParams) ToQuery

func (p UserPickerParams) ToQuery() string

ToQuery converts params to URL query

type UserPickerResults

type UserPickerResults struct {
	Header string      `json:"header"`
	Total  int         `json:"total"`
	Users  []*UserInfo `json:"users"`
}

UserPickerResults contains user picker response data

type UserSearchParams

type UserSearchParams struct {
	Username        string `query:"username"`
	StartAt         int    `query:"startAt"`
	MaxResults      int    `query:"maxResults"`
	IncludeInactive bool   `query:"includeInactive"`
	ExcludeActive   bool   `query:"includeActive,reverse"`
}

UserSearchParams is permissions for searching users

func (UserSearchParams) ToQuery

func (p UserSearchParams) ToQuery() string

ToQuery converts params to URL query

type Version

type Version struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Description     string `json:"description"`
	UserReleaseDate string `json:"userReleaseDate"`
	ProjectID       int    `json:"projectId"`
	ReleaseDate     *Date  `json:"releaseDate"`
	IsArchived      bool   `json:"archived"`
	IsReleased      bool   `json:"released"`
	IsOverdue       bool   `json:"overdue"`
}

Version contains version info

type VersionCollection

type VersionCollection struct {
	Data       []*Version `json:"values"`
	StartAt    int        `json:"startAt"`
	MaxResults int        `json:"maxResults"`
	Total      int        `json:"total"`
	IsLast     bool       `json:"isLast"`
}

VersionCollection is version collection

type VersionCounts

type VersionCounts struct {
	IssuesFixed    int `json:"issuesFixedCount"`
	IssuesAffected int `json:"issuesAffectedCount"`
}

VersionCounts contains info about issues counts

type VersionParams

type VersionParams struct {
	StartAt    int      `query:"startAt"`
	MaxResults int      `query:"maxResults"`
	OrderBy    string   `query:"orderBy"`
	Expand     []string `query:"expand"`
}

VersionParams contains params for fetching version data

func (VersionParams) ToQuery

func (p VersionParams) ToQuery() string

ToQuery converts params to URL query

type VotesInfo

type VotesInfo struct {
	Voters   []*User `json:"voters"`
	Votes    int     `json:"votes"`
	HasVoted bool    `json:"hasVoted"`
}

VotesInfo contains info about votes

type WatchersInfo

type WatchersInfo struct {
	Watchers   []*User `json:"watchers"`
	WatchCount int     `json:"watchCount"`
	IsWatching bool    `json:"isWatching"`
}

WatchersInfo contains info about watchers

type Watches

type Watches struct {
	WatchCount int  `json:"watchCount"`
	IsWatching bool `json:"isWatching"`
}

Watches contains info about watches

type Workflow

type Workflow struct {
	Name             string `json:"name"`
	Description      string `json:"description"`
	LastModifiedDate string `json:"lastModifiedDate"`
	LastModifiedUser string `json:"lastModifiedUser"`
	Steps            int    `json:"steps"`
	IsDefault        bool   `json:"default"`
}

Workflow contains info about workflow

type WorkflowInfo

type WorkflowInfo struct {
	Workflow         string   `json:"workflow"`
	IssueTypes       []string `json:"issueTypes"`
	IsDefaultMapping bool     `json:"defaultMapping"`
}

WorkflowInfo contains basic info about workflow

type WorkflowScheme

type WorkflowScheme struct {
	Name              string                `json:"name"`
	Description       string                `json:"description"`
	DefaultWorkflow   string                `json:"defaultWorkflow"`
	ID                int                   `json:"id"`
	IssueTypeMappings map[string]string     `json:"issueTypeMappings"`
	IssueTypes        map[string]*IssueType `json:"issueTypes"`
	IsDraft           bool                  `json:"draft"`
}

WorkflowScheme contains info about workflow scheme

type Worklog

type Worklog struct {
	ID               string `json:"id"`
	Comment          string `json:"comment"`
	TimeSpent        string `json:"timeSpent"`
	Created          *Date  `json:"created"`
	Updated          *Date  `json:"updated"`
	Started          *Date  `json:"started"`
	Author           *User  `json:"author"`
	UpdateAuthor     *User  `json:"updateAuthor"`
	TimeSpentSeconds int    `json:"timeSpentSeconds"`
}

Worklog is worklog record

type WorklogCollection

type WorklogCollection struct {
	StartAt    int        `json:"startAt"`
	MaxResults int        `json:"maxResults"`
	Total      int        `json:"total"`
	Worklogs   []*Worklog `json:"worklogs"`
}

WorklogCollection is worklog collection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL