v1

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelEnabled

type ChannelEnabled struct {
	ID      interface{} `json:"id"`
	Enabled bool        `json:"enabled"`
}

type DefaultRoute

type DefaultRoute struct {
	ID                string               `json:"id"`
	EscalationChainID interface{}          `json:"escalation_chain_id"`
	Slack             *SlackChannelEnabled `json:"slack"`
	Telegram          *ChannelEnabled      `json:"telegram"`
	Email             *ChannelEnabled      `json:"email"`
	MsTeams           *ChannelEnabled      `json:"msteams"`
}

type EmailTemplate

type EmailTemplate struct {
	*TitleTemplate
	Message interface{} `json:"message"`
}

type ErrMessage

type ErrMessage struct {
	Msg string `json:"detail"`
}

ErrMessage is error message object

type Heartbeat

type Heartbeat struct {
	Link string `json:"link"`
}

type Info

type Info struct {
	// contains filtered or unexported fields
}

func NewInfo

func NewInfo(cfgApp *config.App) *Info

func (*Info) ServeHTTP

func (i *Info) ServeHTTP(response http.ResponseWriter, req *http.Request)

type Integration

type Integration struct {
	// contains filtered or unexported fields
}

func NewIntegration

func NewIntegration(host string, promMetrics *metrics.Storage) *Integration

func (*Integration) ServeHTTP

func (i *Integration) ServeHTTP(response http.ResponseWriter, req *http.Request)

type IntegrationResult

type IntegrationResult struct {
	MaintenanceMode      interface{}   `json:"maintenance_mode"`
	MaintenanceStartedAt interface{}   `json:"maintenance_started_at"`
	MaintenanceEndAt     interface{}   `json:"maintenance_end_at"`
	ID                   string        `json:"id"`
	Name                 string        `json:"name"`
	TeamID               interface{}   `json:"team_id"`
	Link                 string        `json:"link"`
	Type                 string        `json:"type"`
	Templates            *Templates    `json:"templates"`
	Heartbeat            *Heartbeat    `json:"heartbeat"`
	DefaultRoute         *DefaultRoute `json:"default_route"`
}

type IntegrationsResponse

type IntegrationsResponse struct {
	Count    int                 `json:"count"`
	Next     interface{}         `json:"next"`
	Previous interface{}         `json:"previous"`
	Results  []IntegrationResult `json:"results"`
}

type MessengerTemplate

type MessengerTemplate struct {
	*EmailTemplate
	ImageURL interface{} `json:"image_url"`
}

type Notify

type Notify struct {
	// contains filtered or unexported fields
}

func NewNotify

func NewNotify(dbData *user.Storage, pl plugin.Plugin, logger zerolog.Logger, actionLogger events.Service, gfSvc grafana.Service, promMetrics *metrics.Storage) *Notify

func (*Notify) ServeHTTP

func (n *Notify) ServeHTTP(response http.ResponseWriter, req *http.Request)

type NotifyRequest

type NotifyRequest struct {
	Email   string
	Message string
}

type Response

type Response struct {
	URL string `json:"url"`
}

type SlackChannelEnabled

type SlackChannelEnabled struct {
	ChannelID interface{} `json:"channel_id"`
	Enabled   bool        `json:"enabled"`
}

type Templates

type Templates struct {
	GroupingKey       interface{}        `json:"grouping_key"`
	ResolveSignal     interface{}        `json:"resolve_signal"`
	AcknowledgeSignal interface{}        `json:"acknowledge_signal"`
	Slack             *MessengerTemplate `json:"slack"`
	Web               *MessengerTemplate `json:"web"`
	Sms               *TitleTemplate     `json:"sms"`
	PhoneCall         *TitleTemplate     `json:"phone_call"`
	Telegram          *MessengerTemplate `json:"telegram"`
	Email             *EmailTemplate     `json:"email"`
	MsTeams           *MessengerTemplate `json:"msteams"`
}

type TitleTemplate

type TitleTemplate struct {
	Title interface{} `json:"title"`
}

type Users

type Users struct {
	// contains filtered or unexported fields
}

func NewUsers

func NewUsers(db *user.Storage) *Users

func (*Users) ServeHTTP

func (u *Users) ServeHTTP(response http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL