api

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 7 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

View Source
const (

	// KeyringService is the OS keyring service name the API token is stored under.
	KeyringService = "jt"
)

Variables

This section is empty.

Functions

func Client

func Client(config jira.Config) *jira.Client

Client initializes and returns jira client.

func DefaultClient

func DefaultClient(debug bool) *jira.Client

DefaultClient returns default jira client.

func GetAPIToken

func GetAPIToken(config jira.Config) string

func ProxyAssignIssue

func ProxyAssignIssue(c *jira.Client, key string, user *jira.User, def string) error

ProxyAssignIssue uses either a v2 or v3 version of the PUT /issue/{key}/assignee endpoint to assign an issue to the user. Defaults to v3 if installation type is not defined in the config.

func ProxyCreate

func ProxyCreate(c *jira.Client, cr *jira.CreateRequest) (*jira.CreateResponse, error)

ProxyCreate uses either a v2 or v3 version of the Jira POST /issue endpoint to create an issue based on configured installation type. Defaults to v3 if installation type is not defined in the config.

func ProxyGetIssue

func ProxyGetIssue(c *jira.Client, key string, opts ...filter.Filter) (*jira.Issue, error)

ProxyGetIssue uses either a v2 or v3 version of the Jira GET /issue/{key} endpoint to fetch the issue details based on configured installation type. Defaults to v3 if installation type is not defined in the config.

func ProxyGetIssueRaw

func ProxyGetIssueRaw(c *jira.Client, key string) (string, error)

ProxyGetIssueRaw executes the same request as ProxyGetIssue but returns raw API response body string.

func ProxySearch

func ProxySearch(c *jira.Client, jql string, from, limit uint) (*jira.SearchResult, error)

ProxySearch uses either a v2 or v3 version of the Jira GET /search endpoint to search for the relevant issues based on configured installation type. Defaults to v3 if installation type is not defined in the config.

func ProxyTransitions

func ProxyTransitions(c *jira.Client, key string) ([]*jira.Transition, error)

ProxyTransitions uses either v2 or v3 version of the GET /issue/{key}/transitions endpoint to fetch valid transitions for an issue. Defaults to v3 if installation type is not defined in the config.

func ProxyUserSearch

func ProxyUserSearch(c *jira.Client, opts *jira.UserSearchOptions) ([]*jira.User, error)

ProxyUserSearch uses either v2 or v3 version of the GET /user/assignable/search endpoint to search for the users assignable to the given issue. Defaults to v3 if installation type is not defined in the config.

func ProxyWatchIssue

func ProxyWatchIssue(c *jira.Client, key string, user *jira.User) error

ProxyWatchIssue uses either a v2 or v3 version of the PUT /issue/{key}/watchers endpoint to assign an issue to the user. Defaults to v3 if installation type is not defined in the config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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