Documentation
¶
Overview ¶
Package jira is a minimal Jira Cloud client scoped to what whodar ingests: issues and the people on them. Credentials are held only in memory, never serialized, and never logged.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRateLimited = errors.New("jira: rate limited")
ErrRateLimited indicates the API rate limit was exhausted.
View Source
var ErrStatus = errors.New("jira: unexpected status")
ErrStatus indicates an unexpected HTTP status.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client calls the Jira Cloud REST API.
type Component ¶
type Component struct {
// Name is the component name.
Name string `json:"name"`
}
Component is an issue component.
type Doer ¶
type Doer interface {
// Do performs the request and returns the response.
Do(req *http.Request) (*http.Response, error)
}
Doer performs an HTTP request. *http.Client satisfies it; tests inject a stub.
type Issue ¶
type Issue struct {
// Key is the issue key, for example PROJ-12.
Key string `json:"key"`
// Fields holds the issue fields.
Fields struct {
// Summary is the issue title.
Summary string `json:"summary"`
// Assignee is the assigned user, if any.
Assignee *User `json:"assignee"`
// Reporter is the reporting user, if any.
Reporter *User `json:"reporter"`
// Components are the issue components.
Components []Component `json:"components"`
// Labels are the issue labels.
Labels []string `json:"labels"`
// Project is the issue's project.
Project struct {
// Key is the project key.
Key string `json:"key"`
// Name is the project name.
Name string `json:"name"`
} `json:"project"`
// IssueType is the issue type.
IssueType struct {
// Name is the issue type name.
Name string `json:"name"`
} `json:"issuetype"`
// Updated is the last update time in Jira's ISO 8601 format.
Updated string `json:"updated"`
} `json:"fields"`
}
Issue is the subset of an issue whodar reads.
type User ¶
type User struct {
// AccountID is the stable account identifier.
AccountID string `json:"accountId"`
// DisplayName is the user's display name.
DisplayName string `json:"displayName"`
// EmailAddress is the user's email, present when visible to the token.
EmailAddress string `json:"emailAddress"`
}
User is the subset of a Jira user whodar reads.
Click to show internal directories.
Click to hide internal directories.