jira

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NormalIssueFields = IssueFields{
	"issuetype",
	"project",
	"created",
	"updated",
	"priority",
	"issuelinks",
	"status",
	"resolution",
	"summary",
	"description",
	"creator",
	"assignee",
	"reporter",
	"priority",
	"components",
	"customfield_10001",
}

NormalIssueFields is normal issue fields customfield_10001 represents epic link value

Functions

This section is empty.

Types

type Board

type Board struct {
	ID   int    `json:"id,omitempty"`
	Self string `json:"self,omitempty"`
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

Board ...

type BoardService

type BoardService struct {
	// contains filtered or unexported fields
}

BoardService ...

type BoardsList

type BoardsList struct {
	MaxResults int      `json:"maxResults"`
	StartAt    int      `json:"startAt"`
	Total      int      `json:"total"`
	IsLast     bool     `json:"isLast"`
	Values     []*Board `json:"values"`
}

BoardsList ...

type Client

type Client struct {
	Host string
	*req.Client
	Issue   *IssueService
	Project *ProjectService
	Board   *BoardService
	Sprint  *SprintService
}

Client is jira RPC client

func NewJiraClientWithAuthType added in v1.9.9

func NewJiraClientWithAuthType(host, username, password, token string, _type config.JiraAuthType) *Client

func NewJiraClientWithBasicAuth added in v1.9.9

func NewJiraClientWithBasicAuth(host, username, password string) *Client

func NewJiraClientWithBearerToken added in v1.9.9

func NewJiraClientWithBearerToken(host, token string) *Client

type Component

type Component struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

Component ...

type Event added in v1.9.9

type Event struct {
	Timestamp          int64  `json:"timestamp"`
	WebhookEvent       string `json:"webhookEvent"`
	IssueEventTypeName string `json:"issue_event_type_name"`
	Issue              *Issue `json:"issue"`
}

type Fields

type Fields struct {
	Summary          string       `bson:"summary,omitempty"               json:"summary,omitempty"`
	Description      string       `bson:"description,omitempty"           json:"description,omitempty"`
	IssueType        *IssueType   `bson:"issuetype,omitempty"             json:"issuetype,omitempty"`
	IssueLinks       []*LinkIssue `bson:"issuelinks,omitempty"            json:"issuelinks,omitempty"`
	Project          *Project     `bson:"project,omitempty"               json:"project,omitempty"`
	CustomField10001 string       `bson:"customfield_10001,omitempty"     json:"customfield_10001,omitempty"` //epic link
	Creator          *User        `bson:"creator,omitempty"               json:"creator,omitempty"`
	Assignee         *User        `bson:"assignee,omitempty"              json:"assignee,omitempty"`
	Reporter         *User        `bson:"reporter,omitempty"              json:"reporter,omitempty"`
	Priority         *Priority    `bson:"priority,omitempty"              json:"priority,omitempty"`
	Status           *Status      `bson:"status,omitempty"                json:"status,omitempty"`
	Components       []*Component `bson:"components,omitempty"            json:"components,omitempty"`
}

Fields IssueResult:Issues:Fields

type Issue

type Issue struct {
	ID     string  `bson:"id,omitempty"     json:"id,omitempty"`
	Key    string  `bson:"key,omitempty"    json:"key,omitempty"`
	Self   string  `bson:"self,omitempty"   json:"self,omitempty"`
	Fields *Fields `bson:"fields,omitempty" json:"fields,omitempty"`
}

Issue IssueResult:Issues

type IssueFields

type IssueFields []string

IssueFields is jira issue fields

func (IssueFields) String

func (ifs IssueFields) String() string

String join issue fields

type IssueResult

type IssueResult struct {
	Total      int      `bson:"total,omitempty"      json:"total,omitempty"`
	MaxResults int      `bson:"maxResults,omitempty" json:"maxResults,omitempty"`
	Issues     []*Issue `bson:"issues,omitempty"     json:"issues,omitempty"`
}

IssueResult ...

type IssueService

type IssueService struct {
	// contains filtered or unexported fields
}

IssueService ...

func (*IssueService) AddCommentV2 added in v1.9.9

func (s *IssueService) AddCommentV2(key, comment string) error

func (*IssueService) AddCommentV3 added in v1.9.9

func (s *IssueService) AddCommentV3(key, comment, link, linkTitle string) error

func (*IssueService) GetTransitions added in v1.9.9

func (s *IssueService) GetTransitions(key string) ([]*Transition, error)

func (*IssueService) GetTypes added in v1.9.9

func (s *IssueService) GetTypes(project string) ([]*IssueTypeWithStatus, error)

func (*IssueService) SearchByJQL added in v1.9.9

func (s *IssueService) SearchByJQL(jql string, findAll bool) ([]*Issue, error)

func (*IssueService) UpdateStatus added in v1.9.9

func (s *IssueService) UpdateStatus(key, statusID string) error

type IssueType

type IssueType struct {
	ID          string `bson:"id,omitempty"          json:"id,omitempty"`
	Self        string `bson:"self,omitempty"        json:"self,omitempty"`
	Name        string `bson:"name,omitempty"        json:"name,omitempty"`
	Description string `bson:"description,omitempty" json:"description,omitempty"`
	IconURL     string `bson:"iconUrl,omitempty"     json:"iconUrl,omitempty"`
}

IssueType is issue type

type IssueTypeDefinition added in v1.9.9

type IssueTypeDefinition struct {
	Self     string `json:"self"`
	ID       string `json:"id"`
	Name     string `json:"name"`
	Subtask  bool   `json:"subtask"`
	Statuses []struct {
		Self             string `json:"self"`
		Description      string `json:"description"`
		IconURL          string `json:"iconUrl"`
		Name             string `json:"name"`
		UntranslatedName string `json:"untranslatedName"`
		ID               string `json:"id"`
		StatusCategory   struct {
			Self      string `json:"self"`
			ID        int    `json:"id"`
			Key       string `json:"key"`
			ColorName string `json:"colorName"`
			Name      string `json:"name"`
		} `json:"statusCategory"`
	} `json:"statuses"`
}

type IssueTypeWithStatus added in v1.9.9

type IssueTypeWithStatus struct {
	Type   string   `json:"type"`
	Status []string `json:"status"`
}

type LinkIssue

type LinkIssue struct {
	ID           string `bson:"id,omitempty"           json:"id,omitempty"`
	InwardIssue  *Issue `bson:"inwardIssue,omitempty"  json:"inwardIssue,omitempty"`
	OutwardIssue *Issue `bson:"outwardIssue,omitempty" json:"outwardIssue,omitempty"`
}

LinkIssue IssueResult:Issues:Field:LinkIssues

type Priority

type Priority struct {
	ID          string `bson:"id,omitempty"          json:"id,omitempty"`
	Name        string `bson:"name,omitempty"        json:"name,omitempty"`
	Self        string `bson:"self,omitempty"        json:"self,omitempty"`
	Description string `bson:"description,omitempty" json:"description,omitempty"`
}

Priority is jira Priority

type Project

type Project struct {
	ID   string `json:"id,omitempty"`
	Key  string `json:"key,omitempty"`
	Name string `json:"name,omitempty"`
}

Project ...

type ProjectService

type ProjectService struct {
	// contains filtered or unexported fields
}

ProjectService ...

func (*ProjectService) ListAllStatues added in v1.9.9

func (s *ProjectService) ListAllStatues(project string) ([]string, error)

func (*ProjectService) ListProjects added in v1.9.9

func (s *ProjectService) ListProjects() ([]*Project, error)

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

type Sprint

type Sprint struct {
	ID            int       `json:"id,omitempty"`
	Self          string    `json:"self,omitempty"`
	State         string    `json:"state,omitempty"`
	Name          string    `json:"name,omitempty"`
	StartDate     time.Time `json:"startDate,omitempty"`
	EndDate       time.Time `json:"endDate,omitempty"`
	CompleteDate  time.Time `json:"completeDate,omitempty"`
	OriginBoardID int       `json:"originBoardId,omitempty"`
}

Sprint represents a JIRA agile board

type SprintService

type SprintService struct {
	// contains filtered or unexported fields
}

SprintService ...

type SprintsList

type SprintsList struct {
	MaxResults int       `json:"maxResults"`
	StartAt    int       `json:"startAt"`
	IsLast     bool      `json:"isLast"`
	Values     []*Sprint `json:"values"`
}

SprintsList ...

type Status

type Status struct {
	ID             string          `bson:"id,omitempty"                 json:"id,omitempty"`
	Name           string          `bson:"name,omitempty"               json:"name,omitempty"`
	StatusCategory *StatusCategory `bson:"statusCategory,omitempty"     json:"statusCategory,omitempty"`
}

Status ...

type StatusCategory

type StatusCategory struct {
	ID  int    `bson:"id,omitempty"                       json:"id,omitempty"`
	Key string `bson:"key,omitempty"                      json:"key,omitempty"`
}

StatusCategory ...

type To added in v1.9.9

type To struct {
	Self           string         `json:"self"`
	Description    string         `json:"description"`
	IconURL        string         `json:"iconUrl"`
	Name           string         `json:"name"`
	ID             string         `json:"id"`
	StatusCategory StatusCategory `json:"statusCategory"`
}

type Transition added in v1.9.9

type Transition struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	To          To     `json:"to"`
	IsAvailable *bool  `json:"isAvailable"`
}

type User

type User struct {
	Name        string `bson:"name,omitempty"        json:"name,omitempty"`
	Key         string `bson:"key,omitempty"         json:"key,omitempty"`
	Self        string `bson:"self,omitempty"        json:"self,omitempty"`
	DisplayName string `bson:"displayName,omitempty" json:"displayName,omitempty"`
}

User is jira user

Jump to

Keyboard shortcuts

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