client

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: 34 Imported by: 21

Documentation

Overview

Package client provides clients for using the OpsGenie Web API. Also prepares and sends requests. API user first creates a OpsGenieClient instance.

cli := new(ogcli.OpsGenieClient)

Following that he/she can set APIKey and some configurations for HTTP communication layer by setting a proxy definition and/or transport layer options.

cli.SetAPIKey(constants.APIKey)

Then create the client of the API type that he/she wants to use.

alertCli, cliErr := cli.Alert()

if cliErr != nil { panic(cliErr) }

The most fundamental and general use case is being able to access the OpsGenie Web API by coding a Go program. The program -by mean of a client application- can send OpsGenie Web API the requests using the 'client' package in a higher level. For the programmer of the client application, that reduces the number of LoCs. Besides it will result a less error-prone application and reduce the complexity by hiding the low-level networking, error-handling and byte-processing calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncRequestResponse added in v0.6.0

type AsyncRequestResponse struct {
	ResponseMeta
	RequestID string `json:"requestId"`
}

Response for async processing requests

type HTTPTransportSettings added in v0.6.0

type HTTPTransportSettings struct {
	ConnectionTimeout time.Duration
	RequestTimeout    time.Duration
	MaxRetryAttempts  int
}

HTTPTransportSettings is the type that contains the HTTP transport layer configurations of the OpsGenieClient.

type OpsGenieAlertClient deprecated

type OpsGenieAlertClient struct {
	OpsGenieClient
}

Deprecated: Please use OpsGenieAlertV2Client

func (*OpsGenieAlertClient) Acknowledge deprecated

Deprecated: Acknowledge method acknowledges an alert at OpsGenie.

func (*OpsGenieAlertClient) AddDetails deprecated added in v0.6.0

Deprecated: AddDetails method adds details to an alert at OpsGenie.

func (*OpsGenieAlertClient) AddNote deprecated

Deprecated: AddNote method adds a note to an alert at OpsGenie.

func (*OpsGenieAlertClient) AddRecipient deprecated

Deprecated: AddRecipient method adds recipient to an alert at OpsGenie.

func (*OpsGenieAlertClient) AddTags deprecated added in v0.6.0

Deprecated: AddTags method adds tags to an alert at OpsGenie.

func (*OpsGenieAlertClient) AddTeam deprecated

Deprecated: AddTeam method adds a team to an alert at OpsGenie.

func (*OpsGenieAlertClient) AssignOwner deprecated

Deprecated: AssignOwner method assigns the specified user as the owner of the alert at OpsGenie.

func (*OpsGenieAlertClient) AttachFile deprecated

Deprecated: AttachFile method attaches a file to an alert at OpsGenie.

func (*OpsGenieAlertClient) Close deprecated

Deprecated: Close method closes an alert at OpsGenie.

func (*OpsGenieAlertClient) Count deprecated added in v0.6.0

Deprecated: Count method counts alerts at OpsGenie.

func (*OpsGenieAlertClient) Create deprecated

Deprecated: Create method creates an alert at OpsGenie.

func (*OpsGenieAlertClient) Delete deprecated

Deprecated: Delete method deletes an alert at OpsGenie.

func (*OpsGenieAlertClient) EscalateToNext deprecated added in v0.6.0

Deprecated: UnAcknowledge method unacknowledges an alert at OpsGenie.

func (*OpsGenieAlertClient) ExecuteAction deprecated

Deprecated: ExecuteAction method executes a custom action on an alert at OpsGenie.

func (*OpsGenieAlertClient) Get deprecated

Deprecated: Get method retrieves specified alert details from OpsGenie.

func (*OpsGenieAlertClient) List deprecated

Deprecated: List method retrieves alerts from OpsGenie.

func (*OpsGenieAlertClient) ListLogs deprecated

Deprecated: ListLogs method retrieves activity logs of an alert from OpsGenie.

func (*OpsGenieAlertClient) ListNotes deprecated

Deprecated: ListNotes method retrieves notes of an alert from OpsGenie.

func (*OpsGenieAlertClient) ListRecipients deprecated

Deprecated: ListRecipients method retrieves recipients of an alert from OpsGenie.

func (*OpsGenieAlertClient) RemoveDetails deprecated added in v0.6.0

Deprecated: RemoveDetails method removes details from an alert at OpsGenie.

func (*OpsGenieAlertClient) RemoveTags deprecated added in v0.6.0

Deprecated: RemoveTags method removes tags from an alert at OpsGenie.

func (*OpsGenieAlertClient) Renotify deprecated

Deprecated: Renotify re-notifies recipients at OpsGenie.

func (*OpsGenieAlertClient) SetOpsGenieClient deprecated added in v0.6.0

func (cli *OpsGenieAlertClient) SetOpsGenieClient(ogCli OpsGenieClient)

Deprecated: SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieAlertClient.

func (*OpsGenieAlertClient) Snooze deprecated added in v0.6.0

Deprecated: Snooze method snoozes an alert at OpsGenie.

func (*OpsGenieAlertClient) TakeOwnership deprecated

Deprecated: TakeOwnership method takes the ownership of an alert at OpsGenie.

func (*OpsGenieAlertClient) UnAcknowledge deprecated added in v0.6.0

Deprecated: UnAcknowledge method unacknowledges an alert at OpsGenie.

type OpsGenieAlertV2Client added in v0.6.0

type OpsGenieAlertV2Client struct {
	RestClient
}

func (*OpsGenieAlertV2Client) Acknowledge added in v0.6.0

Sends acknowledge request an alert

func (*OpsGenieAlertV2Client) AddDetails added in v0.6.0

Adds details to the alert

func (*OpsGenieAlertV2Client) AddNote added in v0.6.0

Adds a note to the alert

func (*OpsGenieAlertV2Client) AddTags added in v0.6.0

Adds a tag to the alert

func (*OpsGenieAlertV2Client) AddTeamToAlert added in v0.6.0

Adds a team to the alert

func (*OpsGenieAlertV2Client) Assign added in v0.6.0

Assigns an alert to a user

func (*OpsGenieAlertV2Client) AttachFile added in v0.6.0

adds the attachment file to specified alert

func (*OpsGenieAlertV2Client) Close added in v0.6.0

Sends close request for an alert

func (*OpsGenieAlertV2Client) Create added in v0.6.0

Creates an alert

func (*OpsGenieAlertV2Client) CreateSavedSearch added in v0.6.0

Creates a SavedSearch

func (*OpsGenieAlertV2Client) Delete added in v0.6.0

Deletes an alert

func (*OpsGenieAlertV2Client) DeleteAttachment added in v0.6.0

deletes the specified alert attachment

func (*OpsGenieAlertV2Client) DeleteSavedSearch added in v0.6.0

Deletes the SavedSearch

func (*OpsGenieAlertV2Client) EscalateToNext added in v0.6.0

Sends escalation to next request

func (*OpsGenieAlertV2Client) ExecuteCustomAction added in v0.6.0

Sends custom execution action for an alert

func (*OpsGenieAlertV2Client) Get added in v0.6.0

Returns AlertDetails

func (*OpsGenieAlertV2Client) GetAsyncRequestStatus added in v0.6.0

Retrieves the status of the async request

func (*OpsGenieAlertV2Client) GetAttachmentFile added in v0.6.0

retrieves the specified attachment with a download link

func (*OpsGenieAlertV2Client) GetSavedSearch added in v0.6.0

Retrieves the SavedSearch

func (*OpsGenieAlertV2Client) List added in v0.6.0

Retrieves the alerts from OpsGenie

func (*OpsGenieAlertV2Client) ListAlertAttachments added in v0.6.0

returns a list of attachment meta information for the specified alert

func (*OpsGenieAlertV2Client) ListAlertLogs added in v0.6.0

Retrieves the alert logs from OpsGenie

func (*OpsGenieAlertV2Client) ListAlertNotes added in v0.6.0

Retrieves the alert notes from OpsGenie

func (*OpsGenieAlertV2Client) ListAlertRecipients added in v0.6.0

Retrieves the alert recipients from OpsGenie

func (*OpsGenieAlertV2Client) ListSavedSearches added in v0.6.0

Retrieves list of saved searches

func (*OpsGenieAlertV2Client) RemoveDetails added in v0.6.0

Removes the details from the alert

func (*OpsGenieAlertV2Client) RemoveTags added in v0.6.0

Removes a tag from the alert

func (*OpsGenieAlertV2Client) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieAlertV2Client) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieAlertV2Client.

func (*OpsGenieAlertV2Client) Snooze added in v0.6.0

Sends snooze request for an alert

func (*OpsGenieAlertV2Client) Unacknowledge added in v0.6.0

Sends unacknowledge request for an alert

func (*OpsGenieAlertV2Client) UpdateSavedSearch added in v0.6.0

Updates the SavedSearch

type OpsGenieClient

type OpsGenieClient struct {
	// contains filtered or unexported fields
}

OpsGenieClient is a general data type used for: - authenticating callers through their API keys and - instantiating "alert", "heartbeat", "integration" and "policy" clients - setting HTTP transport layer configurations - setting Proxy configurations

func (*OpsGenieClient) APIKey added in v0.6.0

func (cli *OpsGenieClient) APIKey() string

APIKey returns the API Key value that OpsGenieClient uses to authenticate at OpsGenie.

func (*OpsGenieClient) Alert

func (cli *OpsGenieClient) Alert() (*OpsGenieAlertClient, error)

Alert instantiates a new OpsGenieAlertClient. Deprecated: Please use AlertV2() method

func (*OpsGenieClient) AlertV2 added in v0.6.0

func (cli *OpsGenieClient) AlertV2() (*OpsGenieAlertV2Client, error)

AlertV2 instantiates a new OpsGenieAlertV2Client.

func (*OpsGenieClient) Contact added in v0.6.0

func (cli *OpsGenieClient) Contact() (*OpsGenieContactClient, error)

Alert instantiates a new OpsGenieContactClient.

func (*OpsGenieClient) Escalation added in v0.6.0

func (cli *OpsGenieClient) Escalation() (*OpsGenieEscalationClient, error)

Escalation instantiates a new OpsGenieEscalationClient.

func (*OpsGenieClient) Heartbeat

func (cli *OpsGenieClient) Heartbeat() (*OpsGenieHeartbeatClient, error)

Heartbeat instantiates a new OpsGenieHeartbeatClient.

func (*OpsGenieClient) Integration

func (cli *OpsGenieClient) Integration() (*OpsGenieIntegrationClient, error)

Integration instantiates a new OpsGenieIntegrationClient.

func (*OpsGenieClient) NotificationV2 added in v0.6.0

func (cli *OpsGenieClient) NotificationV2() (*OpsGenieNotificationV2Client, error)

NotificationV2 instantiates a new OpsGenieNotificationV2Client

func (*OpsGenieClient) OpsGenieAPIUrl added in v0.6.0

func (cli *OpsGenieClient) OpsGenieAPIUrl() string

OpsGenieAPIUrl returns the current endpoint(base URL) that requests will send.

func (*OpsGenieClient) Policy

func (cli *OpsGenieClient) Policy() (*OpsGeniePolicyClient, error)

Policy instantiates a new OpsGeniePolicyClient.

func (*OpsGenieClient) Schedule added in v0.6.0

func (cli *OpsGenieClient) Schedule() (*OpsGenieScheduleClient, error)

Schedule instantiates a new OpsGenieScheduleClient.

func (*OpsGenieClient) ScheduleOverride added in v0.6.0

func (cli *OpsGenieClient) ScheduleOverride() (*OpsGenieScheduleOverrideClient, error)

ScheduleOverride instantiates a new OpsGenieScheduleOverrideClient.

func (*OpsGenieClient) ScheduleOverrideV2 added in v0.6.0

func (cli *OpsGenieClient) ScheduleOverrideV2() (*OpsGenieScheduleOverrideV2Client, error)

ScheduleOverrideV2 instantiates a new OpsGenieScheduleOverrideV2Client

func (*OpsGenieClient) ScheduleRotationV2 added in v0.6.0

func (cli *OpsGenieClient) ScheduleRotationV2() (*OpsGenieScheduleRotationV2Client, error)

ScheduleRotationV2 instantiates a new OpsGenieScheduleRotationV2Client

func (*OpsGenieClient) ScheduleV2 added in v0.6.0

func (cli *OpsGenieClient) ScheduleV2() (*OpsGenieScheduleV2Client, error)

ScheduleV2 instantiates a new OpsGenieScheduleV2Client

func (*OpsGenieClient) SetAPIKey added in v0.6.0

func (cli *OpsGenieClient) SetAPIKey(key string)

SetAPIKey sets API Key of the OpsGenieClient and authenticates callers through the API Key at OpsGenie.

func (*OpsGenieClient) SetHTTPTransportSettings added in v0.6.0

func (cli *OpsGenieClient) SetHTTPTransportSettings(settings *HTTPTransportSettings)

SetHTTPTransportSettings sets HTTP transport layer configurations of the OpsGenieClient.

func (*OpsGenieClient) SetOpsGenieAPIUrl added in v0.6.0

func (cli *OpsGenieClient) SetOpsGenieAPIUrl(url string)

SetOpsGenieAPIUrl sets the endpoint(base URL) that requests will send. It can be used for testing purpose.

func (*OpsGenieClient) SetProxyConfiguration added in v0.6.0

func (cli *OpsGenieClient) SetProxyConfiguration(conf *ProxyConfiguration)

SetProxyConfiguration sets proxy configurations of the OpsGenieClient.

func (*OpsGenieClient) Team added in v0.6.0

func (cli *OpsGenieClient) Team() (*OpsGenieTeamClient, error)

Team instantiates a new OpsGenieTeamClient.

func (*OpsGenieClient) User added in v0.6.0

func (cli *OpsGenieClient) User() (*OpsGenieUserClient, error)

User instantiates a new OpsGenieUserClient. Deprecated: Please use UserV2() method

func (*OpsGenieClient) UserV2 added in v0.6.0

func (cli *OpsGenieClient) UserV2() (*OpsGenieUserV2Client, error)

UserV2 instantiates a new OpsGenieUserV2Client.

type OpsGenieContactClient added in v0.6.0

type OpsGenieContactClient struct {
	OpsGenieClient
}

OpsGenieContactClient is the data type to make Contact API requests.

func (*OpsGenieContactClient) Create added in v0.6.0

Create method creates a contact at OpsGenie.

func (*OpsGenieContactClient) Delete added in v0.6.0

Delete method deletes a contact at OpsGenie.

func (*OpsGenieContactClient) Disable added in v0.6.0

Disable method disables a contact at OpsGenie.

func (*OpsGenieContactClient) Enable added in v0.6.0

Enable method enables a contact at OpsGenie.

func (*OpsGenieContactClient) Get added in v0.6.0

Get method retrieves specified contact details from OpsGenie.

func (*OpsGenieContactClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieContactClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieContactClient.

func (*OpsGenieContactClient) Update added in v0.6.0

Update method updates a contact at OpsGenie.

type OpsGenieEscalationClient added in v0.6.0

type OpsGenieEscalationClient struct {
	OpsGenieClient
}

OpsGenieEscalationClient is the data type to make Escalation API requests.

func (*OpsGenieEscalationClient) Create added in v0.6.0

Create method creates a escalation at OpsGenie.

func (*OpsGenieEscalationClient) Delete added in v0.6.0

Delete method deletes a escalation at OpsGenie.

func (*OpsGenieEscalationClient) Get added in v0.6.0

Get method retrieves specified escalation details from OpsGenie.

func (*OpsGenieEscalationClient) List added in v0.6.0

List method retrieves escalations from OpsGenie.

func (*OpsGenieEscalationClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieEscalationClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieEscalationClient.

func (*OpsGenieEscalationClient) Update added in v0.6.0

Update method updates a escalation at OpsGenie.

type OpsGenieHeartbeatClient

type OpsGenieHeartbeatClient struct {
	RestClient
}

OpsGenieHeartbeatClient is the data type to make Heartbeat API requests.

func (*OpsGenieHeartbeatClient) Add

Add method creates a heartbeat at OpsGenie.

func (*OpsGenieHeartbeatClient) Delete

Delete method deletes an heartbeat from OpsGenie.

func (*OpsGenieHeartbeatClient) Disable

Disable method disables an heartbeat at OpsGenie.

func (*OpsGenieHeartbeatClient) Enable

Enable method enables an heartbeat at OpsGenie.

func (*OpsGenieHeartbeatClient) Get

Get method retrieves an heartbeat with details from OpsGenie.

func (*OpsGenieHeartbeatClient) List deprecated

Deprecated: List method retrieves heartbeats from OpsGenie.

func (*OpsGenieHeartbeatClient) Ping added in v0.6.0

Send method sends an Heartbeat Signal to OpsGenie.

func (*OpsGenieHeartbeatClient) Send deprecated

Deprecated: Send method sends an Heartbeat Signal to OpsGenie.

func (*OpsGenieHeartbeatClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieHeartbeatClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieHeartbeatClient.

func (*OpsGenieHeartbeatClient) Update

Update method changes configuration of an existing heartbeat at OpsGenie.

type OpsGenieIntegrationClient

type OpsGenieIntegrationClient struct {
	OpsGenieClient
}

OpsGenieIntegrationClient is the data type to make Integration API requests.

func (*OpsGenieIntegrationClient) Disable

Disable method disables an Integration at OpsGenie.

func (*OpsGenieIntegrationClient) Enable

Enable method enables an Integration at OpsGenie.

func (*OpsGenieIntegrationClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieIntegrationClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieIntegrationClient.

type OpsGenieNotificationV2Client added in v0.6.0

type OpsGenieNotificationV2Client struct {
	RestClient
}

OpsGenieNotificationV2Client is the data type to make Notification rule API requests.

func (*OpsGenieNotificationV2Client) Create added in v0.6.0

Creates method creates a notification rule at OpsGenie.

func (*OpsGenieNotificationV2Client) Delete added in v0.6.0

Delete method deletes specified notification rule.

func (*OpsGenieNotificationV2Client) Disable added in v0.6.0

Enable method disables specified notification rule.

func (*OpsGenieNotificationV2Client) Enable added in v0.6.0

Enable method enables specified notification rule.

func (*OpsGenieNotificationV2Client) Get added in v0.6.0

Get method returns a notification from OpsGenie.

func (*OpsGenieNotificationV2Client) List added in v0.6.0

List method returns list of existing notification rules depending on specified criteria.

func (*OpsGenieNotificationV2Client) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieNotificationV2Client) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieNotificationV2Client.

func (*OpsGenieNotificationV2Client) Update added in v0.6.0

Update method updates specified notification rule.

type OpsGeniePolicyClient

type OpsGeniePolicyClient struct {
	OpsGenieClient
}

OpsGeniePolicyClient is the data type to make Policy API requests.

func (*OpsGeniePolicyClient) Disable

Disable method disables an Policy at OpsGenie.

func (*OpsGeniePolicyClient) Enable

Enable method enables an Policy at OpsGenie.

func (*OpsGeniePolicyClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGeniePolicyClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGeniePolicyClient.

type OpsGenieScheduleClient added in v0.6.0

type OpsGenieScheduleClient struct {
	OpsGenieClient
}

OpsGenieScheduleClient is the data type to make Schedule API requests.

func (*OpsGenieScheduleClient) Create added in v0.6.0

Create method creates a schedule at OpsGenie.

func (*OpsGenieScheduleClient) Delete added in v0.6.0

Delete method deletes a schedule at OpsGenie.

func (*OpsGenieScheduleClient) Get added in v0.6.0

Get method retrieves specified schedule details from OpsGenie.

func (*OpsGenieScheduleClient) GetTimeline added in v0.6.0

GetTimeline method retrieves Timeline schedules from OpsGenie.

func (*OpsGenieScheduleClient) List added in v0.6.0

List method retrieves schedules from OpsGenie.

func (*OpsGenieScheduleClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieScheduleClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieScheduleClient.

func (*OpsGenieScheduleClient) Update added in v0.6.0

Update method updates a schedule at OpsGenie.

func (*OpsGenieScheduleClient) WhoIsOnCall added in v0.6.0

WhoIsOnCall method retrieves current oncall participants of a specific schedule from OpsGenie

type OpsGenieScheduleOverrideClient added in v0.6.0

type OpsGenieScheduleOverrideClient struct {
	OpsGenieClient
}

OpsGenieScheduleOverrideClient is the data type to make Schedule API requests.

func (*OpsGenieScheduleOverrideClient) Add added in v0.6.0

func (cli *OpsGenieScheduleOverrideClient) Add(req override.AddScheduleOverrideRequest) (*override.AddScheduleOverrideResponse, error)

Add method adds a schedule override at OpsGenie.

func (*OpsGenieScheduleOverrideClient) Delete added in v0.6.0

func (cli *OpsGenieScheduleOverrideClient) Delete(req override.DeleteScheduleOverrideRequest) (*override.DeleteScheduleOverrideResponse, error)

Delete method deletes a schedule override at OpsGenie.

func (*OpsGenieScheduleOverrideClient) Get added in v0.6.0

func (cli *OpsGenieScheduleOverrideClient) Get(req override.GetScheduleOverrideRequest) (*override.GetScheduleOverrideResponse, error)

Get method retrieves specified schedule override details from OpsGenie.

func (*OpsGenieScheduleOverrideClient) List added in v0.6.0

func (cli *OpsGenieScheduleOverrideClient) List(req override.ListScheduleOverridesRequest) (*override.ListScheduleOverridesResponse, error)

List method retrieves schedule overrides from OpsGenie.

func (*OpsGenieScheduleOverrideClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieScheduleOverrideClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieScheduleOverrideClient.

func (*OpsGenieScheduleOverrideClient) Update added in v0.6.0

func (cli *OpsGenieScheduleOverrideClient) Update(req override.UpdateScheduleOverrideRequest) (*override.UpdateScheduleOverrideResponse, error)

Update method updates a schedule override at OpsGenie.

type OpsGenieScheduleOverrideV2Client added in v0.6.0

type OpsGenieScheduleOverrideV2Client struct {
	RestClient
}

OpsGenieScheduleOverrideV2Client is the data type to make Schedule rule API requests.

func (*OpsGenieScheduleOverrideV2Client) Create added in v0.6.0

Creates method creates a notification rule at OpsGenie.

func (*OpsGenieScheduleOverrideV2Client) Delete added in v0.6.0

Delete method deletes specified schedule rule.

func (*OpsGenieScheduleOverrideV2Client) Get added in v0.6.0

Get method returns a schedule from OpsGenie.

func (*OpsGenieScheduleOverrideV2Client) List added in v0.6.0

List method returns list of existing schedules.

func (*OpsGenieScheduleOverrideV2Client) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieScheduleOverrideV2Client) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieScheduleOverrideV2Client.

func (*OpsGenieScheduleOverrideV2Client) Update added in v0.6.0

Update method updates specified schedule rule.

type OpsGenieScheduleRotationV2Client added in v0.6.0

type OpsGenieScheduleRotationV2Client struct {
	RestClient
}

OpsGenieScheduleRotationV2Client is the data type to make Schedule rule API requests.

func (*OpsGenieScheduleRotationV2Client) Create added in v0.6.0

Creates method creates a notification rule at OpsGenie.

func (*OpsGenieScheduleRotationV2Client) Delete added in v0.6.0

Delete method deletes specified schedule rule.

func (*OpsGenieScheduleRotationV2Client) Get added in v0.6.0

Get method returns a schedule from OpsGenie.

func (*OpsGenieScheduleRotationV2Client) List added in v0.6.0

List method returns list of existing schedules.

func (*OpsGenieScheduleRotationV2Client) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieScheduleRotationV2Client) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieScheduleRotationV2Client.

func (*OpsGenieScheduleRotationV2Client) Update added in v0.6.0

Update method updates specified schedule rule.

type OpsGenieScheduleV2Client added in v0.6.0

type OpsGenieScheduleV2Client struct {
	RestClient
}

OpsGenieScheduleV2Client is the data type to make Schedule rule API requests.

func (*OpsGenieScheduleV2Client) Create added in v0.6.0

Creates method creates a notification rule at OpsGenie.

func (*OpsGenieScheduleV2Client) Delete added in v0.6.0

Delete method deletes specified schedule rule.

func (*OpsGenieScheduleV2Client) Get added in v0.6.0

Get method returns a schedule from OpsGenie.

func (*OpsGenieScheduleV2Client) List added in v0.6.0

List method returns list of existing schedules.

func (*OpsGenieScheduleV2Client) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieScheduleV2Client) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieScheduleV2Client.

func (*OpsGenieScheduleV2Client) Update added in v0.6.0

Update method updates specified schedule rule.

type OpsGenieTeamClient added in v0.6.0

type OpsGenieTeamClient struct {
	OpsGenieClient
}

OpsGenieTeamClient is the data type to make Team API requests.

func (*OpsGenieTeamClient) Create added in v0.6.0

Create method creates a team at OpsGenie.

func (*OpsGenieTeamClient) Delete added in v0.6.0

Delete method deletes a team at OpsGenie.

func (*OpsGenieTeamClient) Get added in v0.6.0

Get method retrieves specified team details from OpsGenie.

func (*OpsGenieTeamClient) List added in v0.6.0

List method retrieves teams from OpsGenie.

func (*OpsGenieTeamClient) ListLogs added in v0.6.0

ListLogs method retrieves team logs from OpsGenie.

func (*OpsGenieTeamClient) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieTeamClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieTeamClient.

func (*OpsGenieTeamClient) Update added in v0.6.0

Update method updates a team at OpsGenie.

type OpsGenieUserClient added in v0.6.0

type OpsGenieUserClient struct {
	OpsGenieClient
}

OpsGenieUserClient is the data type to make User API requests. Deprecated: Please use OpsGenieUserV2Client

func (*OpsGenieUserClient) Create deprecated added in v0.6.0

Deprecated: Create method creates a user at OpsGenie.

func (*OpsGenieUserClient) Delete deprecated added in v0.6.0

Deprecated: Delete method deletes a user at OpsGenie.

func (*OpsGenieUserClient) Get deprecated added in v0.6.0

Deprecated: Get method retrieves specified user details from OpsGenie.

func (*OpsGenieUserClient) List deprecated added in v0.6.0

Deprecated: List method retrieves users from OpsGenie.

func (*OpsGenieUserClient) SetOpsGenieClient deprecated added in v0.6.0

func (cli *OpsGenieUserClient) SetOpsGenieClient(ogCli OpsGenieClient)

Deprecated: SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieUserClient.

func (*OpsGenieUserClient) Update deprecated added in v0.6.0

Deprecated: Update method updates a user at OpsGenie.

type OpsGenieUserV2Client added in v0.6.0

type OpsGenieUserV2Client struct {
	RestClient
}

OpsGenieUserV2Client is the data type to make User API requests.

func (*OpsGenieUserV2Client) Create added in v0.6.0

Create method creates new user in OpsGenie.

func (*OpsGenieUserV2Client) Delete added in v0.6.0

Delete method deletes user.

func (*OpsGenieUserV2Client) Get added in v0.6.0

Get method returns user.

func (*OpsGenieUserV2Client) List added in v0.6.0

List method retrieves the list of users from OpsGenie.

func (*OpsGenieUserV2Client) ListEscalations added in v0.6.0

ListEscalations method returns list of user escalations.

func (*OpsGenieUserV2Client) ListForwardingRules added in v0.6.0

ListForwardingRules method returns list of user forwarding rules.

func (*OpsGenieUserV2Client) ListSchedules added in v0.6.0

ListSchedules method returns list of user schedules.

func (*OpsGenieUserV2Client) ListTeams added in v0.6.0

ListTeams method returns list of user teams.

func (*OpsGenieUserV2Client) SetOpsGenieClient added in v0.6.0

func (cli *OpsGenieUserV2Client) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieUserV2Client.

func (*OpsGenieUserV2Client) Update added in v0.6.0

Update method updates data of user

type ProxyConfiguration added in v0.6.0

type ProxyConfiguration struct {
	Host     string
	Port     int
	Username string
	Password string
	ProxyURI string
	Protocol string
}

ProxyConfiguration is the type that contains the proxy configurations of the OpsGenieClient.

type Request added in v0.6.0

type Request interface {
	GetApiKey() string
	GenerateUrl() (string, url.Values, error)
}

type Response added in v0.6.0

type Response interface {
	SetRequestID(requestId string)
	SetResponseTime(responseTime float32)
	SetRateLimitState(state string)
}

type ResponseMeta added in v0.6.0

type ResponseMeta struct {
	RequestID      string
	ResponseTime   float32
	RateLimitState string
}

func (*ResponseMeta) SetRateLimitState added in v0.6.0

func (rm *ResponseMeta) SetRateLimitState(state string)

func (*ResponseMeta) SetRequestID added in v0.6.0

func (rm *ResponseMeta) SetRequestID(requestID string)

func (*ResponseMeta) SetResponseTime added in v0.6.0

func (rm *ResponseMeta) SetResponseTime(responseTime float32)

type RestClient added in v0.6.0

type RestClient struct {
	OpsGenieClient
}

OpsGenieRestClient is the data type to make requests.

func (*RestClient) SetOpsGenieClient added in v0.6.0

func (cli *RestClient) SetOpsGenieClient(ogCli OpsGenieClient)

SetOpsGenieClient sets the embedded OpsGenieClient type of the OpsGenieAlertClient.

Jump to

Keyboard shortcuts

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