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 ¶
- type ErrorDetail
- type ErrorResponse
- func (e *ErrorResponse) Error() string
- func (e *ErrorResponse) IsDeprecated() bool
- func (e *ErrorResponse) IsNotFound() bool
- func (e *ErrorResponse) IsPaymentRequired(resp *http.Response) bool
- func (e *ErrorResponse) IsRetryableError() bool
- func (e *ErrorResponse) IsUnauthorized(resp *http.Response) bool
- func (e *ErrorResponse) New() nrhttp.ErrorResponse
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 ¶
func (e *ErrorResponse) New() nrhttp.ErrorResponse
New creates a new instance of ErrorResponse.