heartbeat

package
v0.0.0-...-7f67280 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0, GPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package heartbeat provides requests and response structures to achieve Heartbeat API actions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddHeartbeatRequest

type AddHeartbeatRequest struct {
	APIKey       string `json:"-"`
	Name         string `json:"name,omitempty"`
	Interval     int    `json:"interval,omitempty"`
	IntervalUnit string `json:"intervalUnit,omitempty"`
	Description  string `json:"description,omitempty"`
	Enabled      *bool  `json:"enabled,omitempty"`
}

AddHeartbeatRequest provides necessary parameter structure to Create an Heartbeat at OpsGenie.

func (*AddHeartbeatRequest) GenerateUrl

func (r *AddHeartbeatRequest) GenerateUrl() (string, url.Values, error)

func (*AddHeartbeatRequest) GetApiKey

func (r *AddHeartbeatRequest) GetApiKey() string

type AddHeartbeatResponse

type AddHeartbeatResponse struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Code   int    `json:"code"`
}

AddHeartbeatResponse holds the result data of the AddHeartbeatRequest.

type DeleteHeartbeatRequest

type DeleteHeartbeatRequest struct {
	APIKey string `url:"-"`
	Name   string `url:"name,omitempty"`
}

DeleteHeartbeatRequest provides necessary parameter structure to Delete an Heartbeat from OpsGenie.

func (*DeleteHeartbeatRequest) GenerateUrl

func (r *DeleteHeartbeatRequest) GenerateUrl() (string, url.Values, error)

func (*DeleteHeartbeatRequest) GetApiKey

func (r *DeleteHeartbeatRequest) GetApiKey() string

type DeleteHeartbeatResponse

type DeleteHeartbeatResponse struct {
	Status string `json:"status"`
	Code   int    `json:"code"`
}

DeleteHeartbeatResponse holds the result data of the DeleteHeartbeatRequest.

type DisableHeartbeatRequest

type DisableHeartbeatRequest struct {
	APIKey string `json:"-"`
	Name   string `json:"name,omitempty"`
}

DisableHeartbeatRequest provides necessary parameter structure to Disable an Heartbeat at OpsGenie.

func (*DisableHeartbeatRequest) GenerateUrl

func (r *DisableHeartbeatRequest) GenerateUrl() (string, url.Values, error)

func (*DisableHeartbeatRequest) GetApiKey

func (r *DisableHeartbeatRequest) GetApiKey() string

type DisableHeartbeatResponse

type DisableHeartbeatResponse struct {
	Status string `json:"status"`
	Code   int    `json:"code"`
}

DisableHeartbeatResponse holds the result data of the DisableHeartbeatRequest.

type EnableHeartbeatRequest

type EnableHeartbeatRequest struct {
	APIKey string `json:"-"`
	Name   string `json:"name,omitempty"`
}

EnableHeartbeatRequest provides necessary parameter structure to Enable an Heartbeat at OpsGenie.

func (*EnableHeartbeatRequest) GenerateUrl

func (r *EnableHeartbeatRequest) GenerateUrl() (string, url.Values, error)

func (*EnableHeartbeatRequest) GetApiKey

func (r *EnableHeartbeatRequest) GetApiKey() string

type EnableHeartbeatResponse

type EnableHeartbeatResponse struct {
	Status string `json:"status"`
	Code   int    `json:"code"`
}

EnableHeartbeatResponse holds the result data of the EnableHeartbeatRequest.

type GetHeartbeatRequest

type GetHeartbeatRequest struct {
	APIKey string `url:"-"`
	Name   string `url:"name,omitempty"`
}

GetHeartbeatRequest provides necessary parameter structure to Retrieve an Heartbeat with details from OpsGenie.

func (*GetHeartbeatRequest) GenerateUrl

func (r *GetHeartbeatRequest) GenerateUrl() (string, url.Values, error)

func (*GetHeartbeatRequest) GetApiKey

func (r *GetHeartbeatRequest) GetApiKey() string

type GetHeartbeatResponse

type GetHeartbeatResponse struct {
	Heartbeat
}

GetHeartbeatResponse holds the result data of the GetHeartbeatRequest.

type Heartbeat

type Heartbeat struct {
	Name          string `json:"name"`
	Status        string `json:"status"`
	Description   string `json:"description"`
	Enabled       bool   `json:"enabled"`
	LastHeartbeat uint64 `json:"lastHeartBeat"`
	Interval      int    `json:"interval"`
	IntervalUnit  string `json:"intervalUnit"`
	Expired       bool   `json:"expired"`
}

type HeartbeatData

type HeartbeatData struct {
	Name          string    `json:"name"`
	Description   string    `json:"description"`
	LastHeartbeat time.Time `json:"lastPingTime,omitempty"`
	Enabled       bool      `json:"enabled"`
	Interval      int       `json:"interval"`
	IntervalUnit  string    `json:"intervalUnit"`
	Expired       bool      `json:"expired"`
}

type HeartbeatMetaData

type HeartbeatMetaData struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
	Expired bool   `json:"expired"`
}

type HeartbeatMetaResponseV2

type HeartbeatMetaResponseV2 struct {
	Code      int               `json:"code"`
	Data      HeartbeatMetaData `json:"data"`
	Took      float32           `json:"took"`
	RequestId string            `json:"requestId"`
}

func (*HeartbeatMetaResponseV2) SetRateLimitState

func (rm *HeartbeatMetaResponseV2) SetRateLimitState(state string)

func (*HeartbeatMetaResponseV2) SetRequestID

func (rm *HeartbeatMetaResponseV2) SetRequestID(requestID string)

func (*HeartbeatMetaResponseV2) SetResponseTime

func (rm *HeartbeatMetaResponseV2) SetResponseTime(responseTime float32)

type HeartbeatResponseV2

type HeartbeatResponseV2 struct {
	Data      HeartbeatData `json:"data"`
	Took      float32       `json:"took"`
	RequestId string        `json:"requestId"`
}

func (*HeartbeatResponseV2) SetRateLimitState

func (rm *HeartbeatResponseV2) SetRateLimitState(state string)

func (*HeartbeatResponseV2) SetRequestID

func (rm *HeartbeatResponseV2) SetRequestID(requestID string)

func (*HeartbeatResponseV2) SetResponseTime

func (rm *HeartbeatResponseV2) SetResponseTime(responseTime float32)

type ListHeartbeatsRequest

type ListHeartbeatsRequest struct {
	APIKey string `url:"apiKey"`
}

ListHeartbeatsRequest provides necessary parameter structure to Retrieve Heartbeats from OpsGenie.

type ListHeartbeatsResponse

type ListHeartbeatsResponse struct {
	Heartbeats []Heartbeat `json:"heartbeats"`
}

ListHeartbeatsResponse holds the result data of the ListHeartbeatsRequest.

type PingHeartbeatRequest

type PingHeartbeatRequest struct {
	Name   string
	APIKey string
}

func (*PingHeartbeatRequest) GenerateUrl

func (r *PingHeartbeatRequest) GenerateUrl() (string, url.Values, error)

func (*PingHeartbeatRequest) GetApiKey

func (r *PingHeartbeatRequest) GetApiKey() string

type PingHeartbeatResponse

type PingHeartbeatResponse struct {
	Result    string  `json:"result"`
	Took      float32 `json:"took"`
	RequestId string  `json:"requestId"`
}

type SendHeartbeatRequest

type SendHeartbeatRequest struct {
	APIKey string `json:"apiKey"`
	Name   string `json:"name,omitempty"`
}

SendHeartbeatRequest provides necessary parameter structure to Send an Heartbeat Signal to OpsGenie.

type SendHeartbeatResponse

type SendHeartbeatResponse struct {
	WillExpireAt uint64 `json:"willExpireAt"`
	Status       string `json:"status"`
	Heartbeat    uint64 `json:"heartbeat"`
	Took         int    `json:"took"`
	Code         int    `json:"code"`
}

SendHeartbeatResponse holds the result data of the SendHeartbeatRequest.

type UpdateHeartbeatRequest

type UpdateHeartbeatRequest struct {
	APIKey       string `json:"-"`
	Name         string `json:"name,omitempty"`
	Interval     int    `json:"interval,omitempty"`
	IntervalUnit string `json:"intervalUnit,omitempty"`
	Description  string `json:"description,omitempty"`
	Enabled      *bool  `json:"enabled,omitempty"`
}

UpdateHeartbeatRequest provides necessary parameter structure to Update an existing Heartbeat at OpsGenie.

func (*UpdateHeartbeatRequest) GenerateUrl

func (r *UpdateHeartbeatRequest) GenerateUrl() (string, url.Values, error)

func (*UpdateHeartbeatRequest) GetApiKey

func (r *UpdateHeartbeatRequest) GetApiKey() string

type UpdateHeartbeatResponse

type UpdateHeartbeatResponse struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Code   int    `json:"code"`
}

UpdateHeartbeatResponse holds the result data of the UpdateHeartbeatRequest.

Jump to

Keyboard shortcuts

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