Documentation ¶
Index ¶
- Constants
- Variables
- type Connector
- type IssueType
- type JiraConnector
- func (r *JiraConnector) Create(t *model.Ticket) (err error)
- func (r *JiraConnector) IssueTypes(id string) (issueTypes []IssueType, err error)
- func (r *JiraConnector) Project(id string) (project Project, err error)
- func (r *JiraConnector) Projects() (projects []Project, err error)
- func (r *JiraConnector) RefreshAll() (tickets map[*model.Ticket]bool, err error)
- func (r *JiraConnector) TestConnection() (connected bool, err error)
- func (r *JiraConnector) With(t *model.Tracker)
- type Manager
- type Project
Constants ¶
View Source
const ( JiraEndpointBase = "rest/api/2" JiraEndpointProject = JiraEndpointBase + "/project" JiraEndpointIssue = JiraEndpointBase + "/issue" JiraEndpointSearch = JiraEndpointBase + "/search" JiraEndpointMyself = JiraEndpointBase + "/myself" )
View Source
const ( IntervalCreateRetry = time.Second * 30 IntervalRefresh = time.Second * 30 IntervalConnected = time.Second * 60 IntervalDisconnected = time.Second * 10 )
Intervals
View Source
const ( JiraCloud = "jira-cloud" JiraOnPrem = "jira-onprem" )
Tracker types
View Source
const ( New = "New" InProgress = "In Progress" Done = "Done" Unknown = "Unknown" )
Ticket status
View Source
const ( BearerAuth = "bearer" BasicAuth = "basic-auth" )
Auth kinds
View Source
const IssueTypeEpic = "Epic"
Variables ¶
View Source
var (
Log = logr.WithName("tickets")
)
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector interface { // With updates the connector with the tracker model. With(t *model.Tracker) // Create a ticket in the external tracker. Create(t *model.Ticket) error // RefreshAll refreshes the status of all tickets. RefreshAll() (map[*model.Ticket]bool, error) // TestConnection to the external ticket tracker. TestConnection() (bool, error) // Projects lists the tracker's projects. Projects() ([]Project, error) // Project gets a project from the tracker. Project(id string) (Project, error) // IssueTypes gets the issue types for a project. IssueTypes(id string) ([]IssueType, error) }
Connector is a connector for an external ticket tracker.
type IssueType ¶ added in v0.2.0
IssueType represents a type of issue that can be created on an external issue tracker.
type JiraConnector ¶ added in v0.2.0
type JiraConnector struct {
// contains filtered or unexported fields
}
JiraConnector for the Jira Cloud API
func (*JiraConnector) Create ¶ added in v0.2.0
func (r *JiraConnector) Create(t *model.Ticket) (err error)
Create the ticket in Jira.
func (*JiraConnector) IssueTypes ¶ added in v0.2.0
func (r *JiraConnector) IssueTypes(id string) (issueTypes []IssueType, err error)
IssueTypes returns a list of IssueTypes for a Project.
func (*JiraConnector) Project ¶ added in v0.2.0
func (r *JiraConnector) Project(id string) (project Project, err error)
Project returns a Project.
func (*JiraConnector) Projects ¶ added in v0.2.0
func (r *JiraConnector) Projects() (projects []Project, err error)
Projects returns a list of Projects.
func (*JiraConnector) RefreshAll ¶ added in v0.2.0
func (r *JiraConnector) RefreshAll() (tickets map[*model.Ticket]bool, err error)
RefreshAll retrieves fresh status information for all the tracker's tickets.
func (*JiraConnector) TestConnection ¶ added in v0.2.0
func (r *JiraConnector) TestConnection() (connected bool, err error)
TestConnection to Jira Cloud.
func (*JiraConnector) With ¶ added in v0.2.0
func (r *JiraConnector) With(t *model.Tracker)
With updates the connector with the Tracker model.
Click to show internal directories.
Click to hide internal directories.