infrastructure

package
v2.40.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package infrastructure provides metadata about the underlying Infrastructure API, which is only used to provision Infrastructure alert conditions. The programmatic API for working with these resources can be found in the `alerts` package.

Package infrastructure provides metadata about the underlying Infrastructure API.

Code generated by tutone: DO NOT EDIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorDetail

type ErrorDetail struct {
	Status string `json:"status,omitempty"`
	Detail string `json:"detail,omitempty"`
}

ErrorDetail represents the details of an error response from New Relic Infrastructure.

type ErrorResponse

type ErrorResponse struct {
	Errors  []*ErrorDetail `json:"errors,omitempty"`
	Message string         `json:"description,omitempty"`
}

ErrorResponse represents an error response from New Relic Infrastructure.

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

Error surfaces an error message from the Infrastructure error response.

func (*ErrorResponse) IsDeprecated

func (e *ErrorResponse) IsDeprecated() bool

func (*ErrorResponse) IsNotFound

func (e *ErrorResponse) IsNotFound() bool

func (*ErrorResponse) IsPaymentRequired

func (e *ErrorResponse) IsPaymentRequired(resp *http.Response) bool

func (*ErrorResponse) IsRetryableError

func (e *ErrorResponse) IsRetryableError() bool

func (*ErrorResponse) IsUnauthorized

func (e *ErrorResponse) IsUnauthorized(resp *http.Response) bool

IsUnauthorized checks a response for a 401 Unauthorize HTTP status code.

func (*ErrorResponse) New

New creates a new instance of ErrorResponse.

Jump to

Keyboard shortcuts

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