Documentation ¶
Index ¶
- Constants
- Variables
- type Api
- type ApiCredentials
- type AuthType
- type BoardConfiguration
- type BoardItem
- type BoardsResponse
- type Comment
- type Filter
- type Issue
- type IssueFields
- type IssueStatus
- type IssueTransition
- type IssueType
- type JiraTokenType
- type LabelsSuggestionsResponseBody
- type Project
- type Status
- type User
Constants ¶
View Source
const ( DoAssigneePathCloud = "/rest/api/2/issue/%s/assignee" DoAssigneePathOnPremise = "/rest/api/2/issue/%s" )
View Source
const ( Authorization = "Authorization" XAtlassianToken = "X-Atlassian-Token" )
View Source
const ( FindAllBoardsUrl = "/rest/agile/1.0/board" FindBoardConfigurationUrl = "/rest/agile/1.0/board/%d/configuration" )
View Source
const ( FilterUrl = "/rest/api/2/filter/%s" MyFilterUrl = "/rest/api/2/filter/my" MyFilterUrlJiraServer = "/rest/api/2/filter/favourite" )
View Source
const ( LabelsForIssuePath = "/rest/api/1.0/labels/%s/suggest" LabelsForProjectPath = "/rest/api/1.0/labels/suggest" DoLabelPath = "/rest/api/2/issue/%s" )
View Source
const ( ProjectsJira = "/rest/api/2/project" ProjectsByKeyJira = "/rest/api/2/project/%s" )
View Source
const ( SearchJira = "/rest/api/2/search" JiraIssueRegexp = "^[a-zA-Z0-9]{1,10}-[0-9]{1,20}$" )
View Source
const (
DoCommentIssueRestPath = "/rest/api/2/issue/%s/comment"
)
View Source
const (
FindUser = "/rest/api/2/user/assignable/search"
)
View Source
const (
GetJiraIssuePath = "/rest/api/2/issue/%s"
)
View Source
const (
GetProjectStatuses = "/rest/api/2/project/{project}/statuses"
)
View Source
const (
GetTransitions = "/rest/api/2/issue/{issue}/transitions"
)
Variables ¶
View Source
var (
CannotPerformAssignmentErr = errors.New("invalid assignee data. Cannot perform do-assignment request")
)
View Source
var (
ProjectNotFoundError = errors.New("Project not found.")
)
View Source
var SearchDeserializeErr = errors.New("Cannot deserialize jira search response.")
View Source
var UserSearchDeserializeErr = errors.New("Cannot deserialize jira user search response.")
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api interface { Search(query string) ([]Issue, int32, error) SearchJql(query string) ([]Issue, error) SearchJqlPageable(query string, page int32, pageSize int32) ([]Issue, int32, int32, error) FindUsers(project string) ([]User, error) FindUsersWithQuery(project string, query string) ([]User, error) FindProjects() ([]Project, error) FindLabels(issue *Issue, query string) ([]string, error) AddLabel(issueId string, label string) error FindProject(projectKey string) (*Project, error) FindTransitions(issueId string) ([]IssueTransition, error) FindProjectStatuses(projectId string) ([]IssueStatus, error) DoTransition(issueId string, transition *IssueTransition) error DoAssignee(issueId string, user *User) error GetIssueDetailed(issueId string) (*Issue, error) DoComment(issueId string, commentBody string) error FindBoards(projectKeyOrId string) ([]BoardItem, error) GetBoardConfiguration(boardId int) (*BoardConfiguration, error) GetFilter(filterId string) (*Filter, error) GetMyFilters() ([]Filter, error) Close() GetApiUrl() string IsJiraServer() bool }
func NewJiraApiMock ¶
func NewJiraApiMock(handler func(w http.ResponseWriter, r *http.Request)) Api
func NewJiraApiMockWithTokenType ¶
func NewJiraApiMockWithTokenType(handler func(w http.ResponseWriter, r *http.Request), tokenType JiraTokenType) Api
type ApiCredentials ¶
type BoardConfiguration ¶
type BoardConfiguration struct { Id int `json:"id"` Name string `json:"name"` Type string `json:"type"` Self string `json:"self"` Location struct { Type string `json:"type"` Key string `json:"key"` Id string `json:"id"` Self string `json:"self"` Name string `json:"name"` } `json:"location"` Filter struct { Id string `json:"id"` Self string `json:"self"` } `json:"filter"` SubQuery struct { Query string `json:"query"` } `json:"subQuery"` ColumnConfig struct { Columns []struct { Name string `json:"name"` Statuses []struct { Id string `json:"id"` Self string `json:"self"` } `json:"statuses"` } `json:"columns"` ConstraintType string `json:"constraintType"` } `json:"columnConfig"` Ranking struct { RankCustomFieldId int `json:"rankCustomFieldId"` } `json:"ranking"` }
type BoardsResponse ¶
type Issue ¶
type Issue struct { Key string `json:"key"` Fields IssueFields `json:"Fields"` Id string `json:"id"` }
type IssueFields ¶
type IssueFields struct { Summary string `json:"summary"` Project Project `json:"project"` Description string `json:"description,omitempty"` Reporter struct { AccountId string `json:"accountId"` DisplayName string `json:"displayName"` } `json:"reporter"` Assignee struct { AccountId string `json:"accountId"` DisplayName string `json:"displayName"` } `json:"assignee"` Type struct { Name string `json:"name"` } `json:"issuetype"` Status Status Comment struct { Comments []Comment `json:"comments"` MaxResults int32 `json:"maxResults"` Total int32 `json:"total"` StartAt int32 `json:"startAt"` } `json:"comment"` Labels []string `json:"labels"` }
type IssueStatus ¶
type IssueTransition ¶
type JiraTokenType ¶
type JiraTokenType string
const ( ApiToken JiraTokenType = "api token" PersonalToken JiraTokenType = "personal token" )
type User ¶
type User struct { AccountId string `json:"accountId"` Active bool `json:"active"` AvatarUrls map[string]string `json:"avatarUrls"` DisplayName string `json:"displayName"` EmailAddress string `json:"emailAddress"` Locale string `json:"locale"` Self string `json:"self"` TimeZone string `json:"timeZone"` Key string `json:"key"` // field used by on-premise installation Name string `json:"name"` // field used by on-premise installation }
Click to show internal directories.
Click to hide internal directories.