Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertManagerRepository ¶
type AlertManagerRepository interface { appcontext.Component // GetAlertManager receives an string URL and return []byte and error GetAlertManager(amURL string) (result []byte, err error) }
AlertManagerRepository interface
func GetAlertManagerRepository ¶
func GetAlertManagerRepository() AlertManagerRepository
GetAlertManagerRepository func return AlertManagerRepository interface
type GoogleChatRepository ¶
type GoogleChatRepository interface { appcontext.Component // SendMessageGoogleChat requires *chat.DeprecatedEvent plus string and return error SendMessageGoogleChat(event *chat.DeprecatedEvent, content string) error }
GoogleChatRepository interface
func GetGoogleChatRepository ¶
func GetGoogleChatRepository() GoogleChatRepository
GetGoogleChatRepository func return GoogleChatRepository interface
type Health ¶
type Health struct {
Status string `json:"status"`
}
Health represents the HealthCheck response
type Info ¶
type Info struct {
Version string `json:"version"`
}
Info contains the application information
type OpsgenieRepository ¶
type OpsgenieRepository interface { appcontext.Component // GetAlert by tinyID string and return *alert.GetAlertResult, error GetAlert(tinyID string) (*alert.GetAlertResult, error) // ListAlert by query string and return (*alert.ListAlertResult, error ListAlert(query string) (*alert.ListAlertResult, error) // ListIncident by query string and return *incident.ListResult, error ListIncident(query string) (*incident.ListResult, error) // GetOnCall(team string) (*schedule.GetOnCallsResult, error) GetOnCall(team string) (*schedule.GetOnCallsResult, error) // ListSchedules() (*schedule.ListResult, error) ListSchedules() (*schedule.ListResult, error) }
OpsgenieRepository interface
func GetOpsgenieRepository ¶
func GetOpsgenieRepository() OpsgenieRepository
GetOpsgenieRepository func return OpsgenieRepository interface
type SendMessageReqBody ¶
SendMessageReqBody struct Create a struct to conform to the JSON body of the send message request https://core.telegram.org/bots/api#sendmessage
type SensuExecute ¶
type SensuExecute struct { Check string `json:"check"` Subscriptions []string `json:"subscriptions"` }
SensuExecute struct
type SensuRepository ¶
type SensuRepository interface { appcontext.Component // SensuPost func return []byte and error from a POST using sensu api token SensuPost(sensuurl string, method string, body []byte) ([]byte, error) // SensuGet func return []byte and error from a requested URL using a sensu api token SensuGet(sensuurl string) ([]byte, error) // SensuHealth test if sensu api is health SensuHealth(sensuurl string) bool // SensuDelete Expect a string and error SensuDelete(sensuURL string) error }
SensuRepository interface
func GetSensuRepository ¶
func GetSensuRepository() SensuRepository
GetSensuRepository func return SensuRepository interface
type SlackRepository ¶
type SlackRepository interface { appcontext.Component // EphemeralMessage func send a message using channelID, userID and textMessage and return an error EphemeralMessage(channel string, user string, message string) error // EphemeralMessage func send a message with attachment using channelID, userID and textMessage and return an error EphemeralFileMessage(channel string, user string, message string, title string) error }
SlackRepository interface
func GetSlackRepository ¶
func GetSlackRepository() SlackRepository
GetSlackRepository func return SlackRepository interface
type TelegramRepository ¶
type TelegramRepository interface { appcontext.Component // SendTelegramMessage requires chatID int64, reqBody []byte and return error SendTelegramMessage(reqBody []byte) error }
TelegramRepository interface
func GetTelegramRepository ¶
func GetTelegramRepository() TelegramRepository
GetTelegramRepository func return TelegramRepository interface
type WebhookBody ¶
type WebhookBody struct { UpdateID int `json:"update_id"` Message struct { MessageID int `json:"message_id"` From struct { ID int64 `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` LastName string `json:"last_name"` LanguageCode string `json:"language_code"` } `json:"from"` Chat struct { ID int64 `json:"id"` Title string `json:"title"` Type string `json:"type"` AllMembersAreAdministrators bool `json:"all_members_are_administrators"` } `json:"chat"` Date int `json:"date"` Text string `json:"text"` Entities []struct { Offset int `json:"offset"` Length int `json:"length"` Type string `json:"type"` } `json:"entities"` } `json:"message"` }
WebhookBody struct Create a struct that mimics the webhook response body https://core.telegram.org/bots/api#update