Documentation ¶
Index ¶
- func GenerateHash(data string) string
- type Credentials
- type Github
- func (g *Github) Connect() error
- func (g *Github) Create(ticket *Ticket) error
- func (g *Github) Fetch(ticket *Ticket) error
- func (g *Github) FetchRemoteTicket(remoteData interface{}) (Ticket, error)
- func (g *Github) GenerateTemplate(ticket *Ticket) (TicketTemplate, error)
- func (g *Github) ParseCredentials(creds interface{}) error
- func (g *Github) TicketExists(ticket *Ticket) (bool, database.TicketDetails, error)
- func (g *Github) Update(ticket *Ticket) error
- type GithubCredentials
- type GithubRepo
- type Hash
- type Jira
- func (j *Jira) Connect() error
- func (j *Jira) Create(ticket *Ticket) error
- func (j Jira) Fetch(ticket *Ticket) error
- func (j Jira) FetchRemoteTicket(data interface{}) (Ticket, error)
- func (j *Jira) GenerateTemplate(ticket *Ticket) (TicketTemplate, error)
- func (j *Jira) ParseCredentials(creds interface{}) error
- func (j Jira) TicketExists(ticket *Ticket) (bool, database.TicketDetails, error)
- func (j Jira) Update(ticket *Ticket) error
- type JiraCredentials
- type JiraProject
- type Status
- type Ticket
- type TicketID
- type TicketTemplate
- type Ticketing
- type TicketingSystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateHash ¶
Types ¶
type Credentials ¶
type Credentials struct {
AgentID string
}
type Github ¶
type Github struct { Client *github.Client Context context.Context Credentials GithubCredentials Config config.Config Logger zap.SugaredLogger }
func (*Github) FetchRemoteTicket ¶
func (*Github) GenerateTemplate ¶
func (g *Github) GenerateTemplate(ticket *Ticket) (TicketTemplate, error)
func (*Github) ParseCredentials ¶
func (*Github) TicketExists ¶
type GithubCredentials ¶
type GithubCredentials struct { Credentials AccessToken string `json:"access_token"` InstallationID string `json:"installation_id"` GithubRepo }
type GithubRepo ¶
type Jira ¶
type Jira struct { Client *jira.Client Context context.Context Config config.Config Logger zap.SugaredLogger Credentials JiraCredentials }
func (Jira) FetchRemoteTicket ¶
func (*Jira) GenerateTemplate ¶
func (j *Jira) GenerateTemplate(ticket *Ticket) (TicketTemplate, error)
func (*Jira) ParseCredentials ¶
func (Jira) TicketExists ¶
type JiraCredentials ¶
type JiraCredentials struct { Username string `json:"username"` Token string `json:"token"` Host string `json:"host"` JiraProject `json:"jira_project"` Credentials }
type JiraProject ¶
type Ticket ¶
type Ticket struct { Level string `json:"level"` LevelNumber string `json:"level_number"` Bug string `json:"bug"` Raw string `json:"raw"` AgentID string `json:"agent_id"` Line string `json:"line"` File string `json:"file"` TimesReported int `json:"times_reported" default:"1"` RemoteID string `json:"remote_id"` RemoteDetails interface{} `json:"remote_details"` Hash Hash `json:"hash"` State string `json:"state"` RemoteLink string `json:"remote_link"` RemoteSystem string `json:"remote_system"` }
type TicketTemplate ¶
type Ticketing ¶
type Ticketing struct { Config config.Config Logger zap.SugaredLogger }
func NewTicketing ¶
func NewTicketing(c config.Config, logger zap.SugaredLogger) *Ticketing
func (Ticketing) CreateTicket ¶
func (Ticketing) CreateTicketHandler ¶
func (t Ticketing) CreateTicketHandler(w http.ResponseWriter, r *http.Request)
func (Ticketing) TicketCreate ¶
func (t Ticketing) TicketCreate(system TicketingSystem, creds database.TicketingCredentials, ticket *Ticket) error
type TicketingSystem ¶
type TicketingSystem interface { Connect() error ParseCredentials(interface{}) error FetchRemoteTicket(interface{}) (Ticket, error) Create(*Ticket) error Update(*Ticket) error Fetch(*Ticket) error GenerateTemplate(*Ticket) (TicketTemplate, error) TicketExists(*Ticket) (bool, database.TicketDetails, error) }
Click to show internal directories.
Click to hide internal directories.