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 ¶ added in v0.68.2
func (e *ErrorResponse) IsDeprecated() bool
func (*ErrorResponse) IsNotFound ¶ added in v0.21.1
func (e *ErrorResponse) IsNotFound() bool
func (*ErrorResponse) IsPaymentRequired ¶ added in v0.75.0
func (e *ErrorResponse) IsPaymentRequired(resp *http.Response) bool
func (*ErrorResponse) IsRetryableError ¶ added in v0.48.1
func (e *ErrorResponse) IsRetryableError() bool
func (*ErrorResponse) IsUnauthorized ¶ added in v0.55.2
func (e *ErrorResponse) IsUnauthorized(resp *http.Response) bool
IsUnauthorized checks a response for a 401 Unauthorize HTTP status code.
func (*ErrorResponse) New ¶ added in v0.13.0
func (e *ErrorResponse) New() nrhttp.ErrorResponse
New creates a new instance of ErrorResponse.