Documentation
¶
Index ¶
- Constants
- func IssueHasNotableUpdate(issueEvent *gitlab.IssueEvent) bool
- type DeclareModalHandler
- type GLClientInterface
- type IncidentContext
- type IncidentPayload
- func (p *IncidentPayload) ExtraLabels() []string
- func (p *IncidentPayload) IMSelected() bool
- func (p *IncidentPayload) IsConfidential() bool
- func (p *IncidentPayload) IsInternallyFacing() bool
- func (p *IncidentPayload) PrivateMetadata() string
- func (p *IncidentPayload) SelectedTasks() []string
- func (p *IncidentPayload) ServiceLabel() string
- func (p *IncidentPayload) SeverityLabel() string
- func (p *IncidentPayload) Title() string
- func (p *IncidentPayload) UseOps() bool
- type IssueWebhookHandler
- type OnCallGitLabUser
- type OnCallGitLabUsers
- type PostStatuspageModalHandler
- type ReactionHighlights
- func (h *ReactionHighlights) AddHighlight(issueIID int, discussionID, highlightMsg string) error
- func (h *ReactionHighlights) Handle(msg, channelName, name string, ts float64)
- func (h *ReactionHighlights) HighlightDiscussionID(issueIID int) (string, error)
- func (h *ReactionHighlights) IssueIIDFromSlackChannel(channelName string) (int, error)
- func (h *ReactionHighlights) SlackToGitLabMarkdown(tsDisplay, name, msg string) string
- type Severity
- type SlashCommand
Constants ¶
View Source
const ( ActiveIncidentLabel = "Incident::Active" SeverityCritical = "CRITICAL" SeverityHigh = "HIGH" SeverityMedium = "MEDIUM" SeverityLow = "LOW" SeverityUnknown = "Unknown" )
View Source
const ( EOCSelection = "pageEOC" IMSelection = "pageIM" CMOCSelection = "pageCMOC" )
View Source
const ( DeclareModalCallbackID = "incident-declare" PostStatuspageCallbackID = "incident-post-statuspage" )
Variables ¶
This section is empty.
Functions ¶
func IssueHasNotableUpdate ¶
func IssueHasNotableUpdate(issueEvent *gitlab.IssueEvent) bool
Types ¶
type DeclareModalHandler ¶
type DeclareModalHandler struct { JobRunner *woodhouse.AsyncJobRunner SlackClient *slack.Client GitlabClient *gitlab.Client GitlabOpsClient *gitlab.Client GitlabGraphQLClient *gitlabutil.GraphQLClient GitlabOpsGraphQLClient *gitlabutil.GraphQLClient GitlabProductionProjectPath string GitLabProfileSlackFieldID string GitLabIssueType string IncidentChannelNamePrefix string IncidentCallURL string Pager *pagerduty.Pager PagerdutyIntegrationKeyEOC string PagerdutyIntegrationKeyIMOC string PagerdutyIntegrationKeyCMOC string PagerdutyEscalationPolicyEOC string PagerdutyEscalationPolicyIMOC string InviteMemberIDs []string }
func (*DeclareModalHandler) Handle ¶
func (i *DeclareModalHandler) Handle( event *instrumentation.Event, payload slack.InteractionCallback, w http.ResponseWriter, req *http.Request, )
func (*DeclareModalHandler) Validate ¶
func (i *DeclareModalHandler) Validate( event *instrumentation.Event, payload slack.InteractionCallback, w http.ResponseWriter, req *http.Request, ) *slack.ViewSubmissionResponse
type GLClientInterface ¶
type GLClientInterface struct { }
type IncidentContext ¶
type IncidentPayload ¶
type IncidentPayload struct {
// contains filtered or unexported fields
}
func NewIncidentPayload ¶
func NewIncidentPayload(payload *slack.InteractionCallback) (*IncidentPayload, error)
func (*IncidentPayload) ExtraLabels ¶
func (p *IncidentPayload) ExtraLabels() []string
func (*IncidentPayload) IMSelected ¶
func (p *IncidentPayload) IMSelected() bool
func (*IncidentPayload) IsConfidential ¶
func (p *IncidentPayload) IsConfidential() bool
func (*IncidentPayload) IsInternallyFacing ¶
func (p *IncidentPayload) IsInternallyFacing() bool
func (*IncidentPayload) PrivateMetadata ¶
func (p *IncidentPayload) PrivateMetadata() string
func (*IncidentPayload) SelectedTasks ¶
func (p *IncidentPayload) SelectedTasks() []string
func (*IncidentPayload) ServiceLabel ¶
func (p *IncidentPayload) ServiceLabel() string
func (*IncidentPayload) SeverityLabel ¶
func (p *IncidentPayload) SeverityLabel() string
func (*IncidentPayload) Title ¶
func (p *IncidentPayload) Title() string
func (*IncidentPayload) UseOps ¶
func (p *IncidentPayload) UseOps() bool
type IssueWebhookHandler ¶
type IssueWebhookHandler struct { GitlabGraphQLClient *gitlabutil.GraphQLClient GitlabOpsGraphQLClient *gitlabutil.GraphQLClient UpdateIncidentSeverity bool SlackClient *slack.Client ChannelID string }
func (*IssueWebhookHandler) ServeHTTP ¶
func (h *IssueWebhookHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
type OnCallGitLabUser ¶
type OnCallGitLabUsers ¶
type OnCallGitLabUsers struct { IMOCs []*OnCallGitLabUser EOCs []*OnCallGitLabUser IncidentAssignees []*OnCallGitLabUser }
type PostStatuspageModalHandler ¶
type PostStatuspageModalHandler struct { JobRunner *woodhouse.AsyncJobRunner SlackClient *slack.Client StatusioClient *statusio.Client }
func (*PostStatuspageModalHandler) Handle ¶
func (i *PostStatuspageModalHandler) Handle( event *instrumentation.Event, payload slack.InteractionCallback, w http.ResponseWriter, req *http.Request, )
func (*PostStatuspageModalHandler) Validate ¶
func (i *PostStatuspageModalHandler) Validate( event *instrumentation.Event, payload slack.InteractionCallback, w http.ResponseWriter, req *http.Request, ) *slack.ViewSubmissionResponse
type ReactionHighlights ¶
type ReactionHighlights struct { GitlabClient *gogitlab.Client GitlabProductionProjectPath string IssueIIDsForChannelNames *timedmap.TimedMap[string, int] DiscussionIDsForIssueIIDs *timedmap.TimedMap[int, string] Timestamps *timedmap.TimedMap[float64, bool] }
func NewReactionHighlights ¶
func NewReactionHighlights(gitlabClient *gogitlab.Client, gitlabProductionProjectPath string) *ReactionHighlights
func (*ReactionHighlights) AddHighlight ¶
func (h *ReactionHighlights) AddHighlight(issueIID int, discussionID, highlightMsg string) error
func (*ReactionHighlights) Handle ¶
func (h *ReactionHighlights) Handle(msg, channelName, name string, ts float64)
func (*ReactionHighlights) HighlightDiscussionID ¶
func (h *ReactionHighlights) HighlightDiscussionID(issueIID int) (string, error)
func (*ReactionHighlights) IssueIIDFromSlackChannel ¶
func (h *ReactionHighlights) IssueIIDFromSlackChannel(channelName string) (int, error)
func (*ReactionHighlights) SlackToGitLabMarkdown ¶
func (h *ReactionHighlights) SlackToGitLabMarkdown(tsDisplay, name, msg string) string
type Severity ¶
type Severity int
func (Severity) IncidentSeverity ¶
func (Severity) IsSev1Sev2 ¶
func (Severity) IssueLabel ¶
func (Severity) SlackEmoji ¶
type SlashCommand ¶
type SlashCommand struct { SlackClient *slack.Client JobRunner *woodhouse.AsyncJobRunner IncidentChannelID string GitlabProductionProjectPath string GitlabClient *gitlab.Client GitlabOpsClient *gitlab.Client StatusioClient *statusio.Client }
func (*SlashCommand) Handle ¶
func (s *SlashCommand) Handle( event *instrumentation.Event, commandName string, command slack.SlashCommand, w http.ResponseWriter, req *http.Request, )
Click to show internal directories.
Click to hide internal directories.