opsgenie

package
v0.0.0-...-71090b4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModule

func GetModule() common.Module

Types

type GetScheduleResponse

type GetScheduleResponse struct {
	Data struct {
		Description string `json:"description"`
		Enabled     bool   `json:"enabled"`
		ID          string `json:"id"`
		Name        string `json:"name"`
		OwnerTeam   struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		} `json:"ownerTeam"`
		Rotations []struct {
			ID           string `json:"id"`
			Length       int    `json:"length"`
			Name         string `json:"name"`
			Participants []struct {
				ID       string `json:"id"`
				Type     string `json:"type"`
				Username string `json:"username"`
			} `json:"participants"`
			StartDate       time.Time `json:"startDate"`
			TimeRestriction struct {
				Restrictions []struct {
					EndDay    string `json:"endDay"`
					EndHour   int    `json:"endHour"`
					EndMin    int    `json:"endMin"`
					StartDay  string `json:"startDay"`
					StartHour int    `json:"startHour"`
					StartMin  int    `json:"startMin"`
				} `json:"restrictions"`
				Type string `json:"type"`
			} `json:"timeRestriction"`
			Type string `json:"type"`
		} `json:"rotations"`
		Timezone string `json:"timezone"`
	} `json:"data"`
	RequestId string  `json:"requestId"`
	Took      float64 `json:"took"`
}

type ListOnCallResponse

type ListOnCallResponse struct {
	Data struct {
		Parent struct {
			Enabled bool   `json:"enabled"`
			ID      string `json:"id"`
			Name    string `json:"name"`
		} `json:"_parent"`
		OnCallRecipients []string `json:"onCallRecipients"`
	} `json:"data"`
	RequestId string  `json:"requestId"`
	Took      float64 `json:"took"`
}

type ListScheduleResponse

type ListScheduleResponse struct {
	Data []struct {
		Description string `json:"description"`
		Enabled     bool   `json:"enabled"`
		ID          string `json:"id"`
		Name        string `json:"name"`
		OwnerTeam   struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		} `json:"ownerTeam"`
		Rotations []interface{} `json:"rotations"`
		Timezone  string        `json:"timezone"`
	} `json:"data"`
	Expandable []string `json:"expandable"`
	RequestId  string   `json:"requestId"`
	Took       float64  `json:"took"`
}

type OpsGenie

type OpsGenie struct {
	Name        string
	Description string
	Slug        string
	// contains filtered or unexported fields
}

func (*OpsGenie) GetDescription

func (m *OpsGenie) GetDescription() string

func (*OpsGenie) GetLastRun

func (m *OpsGenie) GetLastRun() string

func (*OpsGenie) GetName

func (m *OpsGenie) GetName() string

func (*OpsGenie) GetRunInterval

func (m *OpsGenie) GetRunInterval() int64

func (*OpsGenie) GetRunIntervalOnBattery

func (m *OpsGenie) GetRunIntervalOnBattery() int64

func (*OpsGenie) GetSlug

func (m *OpsGenie) GetSlug() string

func (*OpsGenie) GetWaybarOutput

func (m *OpsGenie) GetWaybarOutput() (*common.WaybarOutput, error)

func (*OpsGenie) IsEnabled

func (m *OpsGenie) IsEnabled() bool

func (*OpsGenie) Run

func (m *OpsGenie) Run() error

func (*OpsGenie) RunCommand

func (m *OpsGenie) RunCommand(name string, args []string) error

func (*OpsGenie) SaveLastRun

func (m *OpsGenie) SaveLastRun()

func (*OpsGenie) SuspendOnBattery

func (m *OpsGenie) SuspendOnBattery() bool

func (*OpsGenie) WriteOutput

func (m *OpsGenie) WriteOutput() error

Jump to

Keyboard shortcuts

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