utilities

package
v0.0.0-...-4c22bb2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmAlerts

func ConfirmAlerts(alertList []alert.Alert, silentMode bool, action string) (confirm bool)

func ConfirmUser

func ConfirmUser(userInfo UserMemberships, userName string, action string) (confirm bool)

func CountAlerts

func CountAlerts(alertClient *alert.Client, query string) (count int, err error)

func CreateEscalationClient

func CreateEscalationClient(apiKey string, url client.ApiUrl) (escalationClient *escalation.Client, clientErr error)

func CreateOpsgenieClient

func CreateOpsgenieClient(apiKey string, url client.ApiUrl) (alertClient *alert.Client, clientErr error)

func CreateScheduleClient

func CreateScheduleClient(apiKey string, url client.ApiUrl) (scheduleClient *schedule.Client, clientErr error)

func CreateTeamClient

func CreateTeamClient(apiKey string, url client.ApiUrl) (teamClient *team.Client, clientErr error)

func CreateUserClient

func CreateUserClient(apiKey string, url client.ApiUrl) (userClient *user.Client, clientErr error)

func DelUserFromAccount

func DelUserFromAccount(userClient *user.Client, userName string) error

func GetApiUrl

func GetApiUrl(euFlag bool) (url client.ApiUrl)

func GetEscalation

func GetEscalation(escalationClient *escalation.Client, escalationId string) (escalationRes *escalation.GetResult, err error)

func GetScheduleRotations

func GetScheduleRotations(scheduleClient *schedule.Client, scheduleId string, userName string) ([]schedule.Rotation, error)

func InitLogging

func InitLogging(debug bool) logrus.Logger

func ListOpsgenieAlerts

func ListOpsgenieAlerts(alertClient *alert.Client, query string, offset int) (listResult *alert.ListAlertResult, err error)

func NumPagingRequests

func NumPagingRequests(count int) (n int)

func RemoveRule

func RemoveRule(escalation []escalation.Rule, e int) []escalation.Rule

Types

type Schedule

type Schedule struct {
	Id       string
	Rotation []schedule.Rotation
}

type UserMemberships

type UserMemberships struct {
	Escalations []user.UserEscalation
	Teams       []user.Team
	Schedules   []Schedule
}

func GetUserMemberships

func GetUserMemberships(userClient *user.Client, userName string) (UserMemberships, error)

Jump to

Keyboard shortcuts

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