Documentation
¶
Overview ¶
Package ticket provides generic functionality to interact with ticketing systems. The interfaces provided allow the cli tool to be agnostic and not bound to a single backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCredentialSaving = errors.New("Could not save credentials to system keyring")
View Source
var ErrNotFound = errors.New("Could not find issue/ticket")
View Source
var ErrTypeAssertionAuth = errors.New("Could not parse credential data")
Functions ¶
This section is empty.
Types ¶
type LoginScenario ¶
type LoginScenario func() (interface{}, error)
type System ¶
type System string
System represent an identifier for a ticket system.
const Jira System = "jira"
Jira is a proprietary issue tracking product developed by Atlassian.
type TicketSystem ¶
type TicketSystem interface { Authenticate(data interface{}) (User, error) // LoginScenario returns a function that will execute a number of prompts // to gather the credentials needed to authenticate with the system. // The return value interface{} of the returned function represent the login data. LoginScenario() LoginScenario // Ticker returns the details of a ticket in the ticket system. Ticket(key string) (Ticket, error) GetBaseFromTicketType(typ string) string SaveCredentials() error ValidateKey(key string) error }
type User ¶
func LoadFromDisk ¶
LoadFromDisk reads the user from the home dir.
func (*User) SaveToDisk ¶
SaveToDisk dumps the current user to the file system so that it can be retrieved later.
Click to show internal directories.
Click to hide internal directories.