client

package
v0.0.0-...-52da105 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SendRequest            = sendRequest
	SendCustomRequest      = sendCustomRequest
	SendRequestWithoutResp = sendRequestWithoutResp
)

Functions

func AssignIssue

func AssignIssue(issueId, username string) error

func CommentIssue

func CommentIssue(issueId, comment string) (domain.Issue, error)

func CreateIssue

func CreateIssue(project, issueType, summary string, description string, priority string, reporter string) (domain.Issue, error)
func DeleteLink(linkId string) error

TODO: get rid of all of those separate construct methods...

func GetIssueInfo

func GetIssueInfo(issueId string) (domain.Issue, error)

func LinkIssues

func LinkIssues(inwardKey, outwardKey, linkType string) error

func Transition

func Transition(issueId, transitionId string) (string, error)

Types

type Assignee

type Assignee struct {
	Name string `json:"name,omitempty"`
}

type Comment

type Comment struct {
	Body string `json:"body"`
}

type Config

type Config struct {
	Host     string
	Username string
	Password string
}
var JiraConfig Config

Must be initialised before using

type CreateIssueAPIResponse

type CreateIssueAPIResponse struct {
	ID   string `json:"id"`
	Key  string `json:"key"`
	Self string `json:"self"`
}

func CreateCustomIssue

func CreateCustomIssue(project, issueType, summary, desc string, labels []string) (CreateIssueAPIResponse, error)

CreateCustomIssue sends create issue API call to JIRA https://tinyurl.com/mr45wbwf (docs) Receives set of arguments to compile REST call body and returns JSON struct of response

type CustomIncIssue

type CustomIncIssue struct {
	Fields CustomIncIssueFields `json:"fields"`
}

type CustomIncIssueFields

type CustomIncIssueFields struct {
	Project     Project  `json:"project"`
	Summary     string   `json:"summary"`
	IssueType   Type     `json:"issuetype"`
	Description string   `json:"description"`
	Labels      []string `json:"labels"`
}

type Issue

type Issue struct {
	Fields IssueFields `json:"fields"`
}

type IssueFields

type IssueFields struct {
	Project     Project  `json:"project"`
	Summary     string   `json:"summary"`
	IssueType   Type     `json:"issuetype"`
	Description string   `json:"description"`
	Labels      []string `json:"labels"`
	Priority    Type     `json:"priority"`
	Reporter    Type     `json:"reporter"`
}
type IssueLink struct {
	Name    string `json:"name"`
	Inward  string `json:"inward,omitempty"`
	Outward string `json:"outward,omitempty"`
}

type LinkIssue

type LinkIssue struct {
	Key string `json:"key"`
}

type LinkIssueRequest

type LinkIssueRequest struct {
	LinkType IssueLink `json:"type"`
	Inward   LinkIssue `json:"inwardIssue"`
	Outward  LinkIssue `json:"outwardIssue"`
	Comment  `json:"comment"`
}
func GetLink(linkId string) (*LinkIssueRequest, error)

type Project

type Project struct {
	Key string `json:"key"`
}

type SearchRequestType

type SearchRequestType struct {
	Query      string   `json:"jql"`
	StartIndex int      `json:"startAt"`
	MaxResults int      `json:"maxResults"`
	Fields     []string `json:"fields"`
}

type SearchResult

type SearchResult struct {
	StartIndex   int            `json:"startAt"`
	MaxResults   int            `json:"maxResults"`
	TotalResults int            `json:"total"`
	Issues       []domain.Issue `json:"issues"`
}

func SearchIssues

func SearchIssues(query string, startIndex int, maxResults int) (SearchResult, error)

type TransitionObj

type TransitionObj struct {
	TransitionId   string `json:"id"`
	TransitionName string `json:"name"`
}

type TransitionsResult

type TransitionsResult struct {
	Transitions []TransitionObj `json:"transitions"`
}

func GetTransitions

func GetTransitions(issueId string) (TransitionsResult, error)

type Type

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

Jump to

Keyboard shortcuts

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