opentofu/vendor/github.com/opsgenie/opsgenie-go-sdk/heartbeat/heartbeat.go
Tom Harvey 05d00a93ce New Provider: OpsGenie (#11012)
* Importing the OpsGenie SDK

* Adding the goreq dependency

* Initial commit of the OpsGenie / User provider

* Refactoring to return a single client

* Adding an import test / fixing a copy/paste error

* Adding support for OpsGenie docs

* Scaffolding the user documentation for OpsGenie

* Adding a TODO

* Adding the User data source

* Documentation for OpsGenie

* Adding OpsGenie to the internal plugin list

* Adding support for Teams

* Documentation for OpsGenie Team's

* Validation for Teams

* Removing Description for now

* Optional fields for a User: Locale/Timezone

* Removing an implemented TODO

* Running makefmt

* Downloading about half the internet

Someone witty might simply sign this commit with "npm install"

* Adding validation to the user object

* Fixing the docs

* Adding a test creating multple users

* Prompting for the API Key if it's not specified

* Added a test for multiple users / requested changes

* Fixing the linting
2017-01-05 19:25:04 +00:00

64 lines
2.4 KiB
Go

/*
Copyright 2015 OpsGenie. All rights reserved.
Use of this source code is governed by a Apache Software
license that can be found in the LICENSE file.
*/
//Package heartbeat provides requests and response structures to achieve Heartbeat API actions.
package heartbeat
// AddHeartbeatRequest provides necessary parameter structure to Create an Heartbeat at OpsGenie.
type AddHeartbeatRequest struct {
APIKey string `json:"apiKey,omitempty"`
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.
type UpdateHeartbeatRequest struct {
APIKey string `json:"apiKey,omitempty"`
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"`
}
// EnableHeartbeatRequest provides necessary parameter structure to Enable an Heartbeat at OpsGenie.
type EnableHeartbeatRequest struct {
APIKey string `json:"apiKey,omitempty"`
Name string `json:"name,omitempty"`
}
// DisableHeartbeatRequest provides necessary parameter structure to Disable an Heartbeat at OpsGenie.
type DisableHeartbeatRequest struct {
APIKey string `json:"apiKey,omitempty"`
Name string `json:"name,omitempty"`
}
// DeleteHeartbeatRequest provides necessary parameter structure to Delete an Heartbeat from OpsGenie.
type DeleteHeartbeatRequest struct {
APIKey string `url:"apiKey,omitempty"`
Name string `url:"name,omitempty"`
}
// GetHeartbeatRequest provides necessary parameter structure to Retrieve an Heartbeat with details from OpsGenie.
type GetHeartbeatRequest struct {
APIKey string `url:"apiKey,omitempty"`
Name string `url:"name,omitempty"`
}
// ListHeartbeatsRequest provides necessary parameter structure to Retrieve Heartbeats from OpsGenie.
type ListHeartbeatsRequest struct {
APIKey string `url:"apiKey,omitempty"`
}
// SendHeartbeatRequest provides necessary parameter structure to Send an Heartbeat Signal to OpsGenie.
type SendHeartbeatRequest struct {
APIKey string `json:"apiKey,omitempty"`
Name string `json:"name,omitempty"`
}