opsgenie

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(logger *zap.Logger, httpClient *http.Client, asap pkiutil.ASAP, baseURL *url.URL) *Client

func (*Client) GetOrCreateIntegrations

func (c *Client) GetOrCreateIntegrations(ctx context.Context, teamName string) (*IntegrationsResponse, bool, error)

Gets OpsGenie integrations return codes: - 400: Bad request to Opsgenie - 401: Unauthorized - 404: Not found returned by Opsgenie. Does the specified Opsgenie team exist? - 422: Semantic error in request to Opsgenie. - 429: Rate limited by Opsgenie.

type Integration

type Integration struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	TeamID   string `json:"teamId"`
	TeamName string `json:"teamName"`
	Priority string `json:"priority"`
	APIKey   string `json:"apiKey"`
	Endpoint string `json:"endpoint"`
	EnvType  string `json:"envType"`
}

type IntegrationsResponse

type IntegrationsResponse struct {
	Integrations []Integration `json:"integrations"`
}

Jump to

Keyboard shortcuts

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