Help us shape the future of Go! Take the 2026 Go Developer Survey

jira

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package jira is a dfetch Connector backed by the Jira Cloud REST API (https://developer.atlassian.com/cloud/jira/platform/rest/v3/). It exposes the issues, projects, and comments tables under a configured SQL schema and pushes down what it safely can: issues translates the WHERE/ORDER BY into JQL for the enhanced search endpoint; projects and comments push equality/IN filters, a single-term ORDER BY, and LIMIT. It is config-only (`type: jira`): there is no default host, every site is its own https://<yoursite>.atlassian.net.

Auth is required, as a single Authorization header: either $JIRA_EMAIL + $JIRA_API_TOKEN (sent as HTTP Basic) or params.auth_header_command, whose output is used verbatim. With neither configured, requests fail with a message naming both options; a 401 response is reported with the same hint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(params map[string]any) (source.Connector, error)

New builds a Jira connector. Required: params["base_url"] (e.g. https://yoursite.atlassian.net). Optional: params["auth_header_func"] / params["auth_header_command"] (Go func / argv supplying the Authorization header verbatim when $JIRA_EMAIL/$JIRA_API_TOKEN are unset); resolution is lazy, on first use (see source.Credential). It is config-only — registered for `type: jira`, never auto-instantiated, because there is no default host.

Types

type Connector

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

Connector talks to one Jira Cloud site's REST API.

func (*Connector) Scan

func (c *Connector) Scan(ctx context.Context, req source.ScanRequest, emit func(*source.Rows) error) error

Scan dispatches to the per-table fetchers, which emit one chunk per API page.

func (*Connector) Tables

func (c *Connector) Tables() []source.TableSchema

Tables returns the schemas of the jira.* tables.

Jump to

Keyboard shortcuts

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