heartbeat

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: Apache-2.0, GPL-2.0 Imports: 3 Imported by: 21

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 added in v0.6.0

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

func (*AddHeartbeatRequest) GetApiKey added in v0.6.0

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 added in v0.6.0

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

func (*DeleteHeartbeatRequest) GetApiKey added in v0.6.0

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 added in v0.6.0

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

func (*DisableHeartbeatRequest) GetApiKey added in v0.6.0

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 added in v0.6.0

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

func (*EnableHeartbeatRequest) GetApiKey added in v0.6.0

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 added in v0.6.0

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

func (*GetHeartbeatRequest) GetApiKey added in v0.6.0

func (r *GetHeartbeatRequest) GetApiKey() string

type GetHeartbeatResponse

type GetHeartbeatResponse struct {
	Heartbeat
}

GetHeartbeatResponse holds the result data of the GetHeartbeatRequest.

type Heartbeat added in v0.6.0

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 added in v0.6.0

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 added in v0.6.0

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

type HeartbeatMetaResponseV2 added in v0.6.0

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

func (*HeartbeatMetaResponseV2) SetRateLimitState added in v0.6.0

func (rm *HeartbeatMetaResponseV2) SetRateLimitState(state string)

func (*HeartbeatMetaResponseV2) SetRequestID added in v0.6.0

func (rm *HeartbeatMetaResponseV2) SetRequestID(requestID string)

func (*HeartbeatMetaResponseV2) SetResponseTime added in v0.6.0

func (rm *HeartbeatMetaResponseV2) SetResponseTime(responseTime float32)

type HeartbeatResponseV2 added in v0.6.0

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

func (*HeartbeatResponseV2) SetRateLimitState added in v0.6.0

func (rm *HeartbeatResponseV2) SetRateLimitState(state string)

func (*HeartbeatResponseV2) SetRequestID added in v0.6.0

func (rm *HeartbeatResponseV2) SetRequestID(requestID string)

func (*HeartbeatResponseV2) SetResponseTime added in v0.6.0

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 added in v0.6.0

type PingHeartbeatRequest struct {
	Name   string
	APIKey string
}

func (*PingHeartbeatRequest) GenerateUrl added in v0.6.0

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

func (*PingHeartbeatRequest) GetApiKey added in v0.6.0

func (r *PingHeartbeatRequest) GetApiKey() string

type PingHeartbeatResponse added in v0.6.0

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 added in v0.6.0

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

func (*UpdateHeartbeatRequest) GetApiKey added in v0.6.0

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