Documentation ¶
Overview ¶
Package jira manages the communication with a Jira server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDescriptionText ¶
GenerateDescriptionText generate description using the original description and the finding and team identifiers.
func GenerateIdentificationText ¶
GenerateIdentificationText generate the part of the description that contains the identifiers.
Types ¶
type Client ¶
type Client struct {
Issuer
}
Client represents a specific Jira client.
func (*Client) CreateTicket ¶
CreateTicket creates a ticket in Jira.
func (*Client) FindTicket ¶
FindTicket search tickets and return the first one if it exists. The arguments needed to search a ticket are the project key, the issue type and a text that have to be present on the ticket description. Return a nil ticket if not found.
type Issuer ¶
type Issuer interface { Get(issueID string, options *gojira.GetQueryOptions) (*gojira.Issue, *gojira.Response, error) Search(jql string, options *gojira.SearchOptions) ([]gojira.Issue, *gojira.Response, error) Create(issue *gojira.Issue) (*gojira.Issue, *gojira.Response, error) }
Issuer manages all the operations related with the ticket tracker issues.
type TicketTrackingClient ¶
type TicketTrackingClient interface { GetTicket(id string) (model.Ticket, error) FindTicket(projectKey, vulnerabilityIssueType, text string) (model.Ticket, error) CreateTicket(ticket model.Ticket) (model.Ticket, error) }
TicketTrackingClient defines the API of the adapter for a third-party client.
type TrackerClient ¶
type TrackerClient struct { Client TicketTrackingClient Logger echo.Logger URL string }
TrackerClient represents a Jira ticket tracker client.
func New ¶
func New(url, token string, logger echo.Logger) (*TrackerClient, error)
New instantiates a new Jira connection.
func (*TrackerClient) CreateTicket ¶
CreateTicket creates a ticket in Jira.