Documentation ¶
Index ¶
- func DataResponse(resp *http.Response) ([]byte, error)
- func EmptyResponse(resp *http.Response) error
- func JSONResponse(resp *http.Response, obj interface{}) error
- func NewConjurError(resp *http.Response) error
- func SecretDataResponse(resp *http.Response) (io.ReadCloser, error)
- type ConjurError
- type ConjurErrorDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataResponse ¶
DataResponse checks the HTTP status of the response. If it's less than 300, it returns the response body as a byte array. Otherwise it returns a NewConjurError.
func EmptyResponse ¶
EmptyResponse checks the HTTP status of the response. If it's less than 300, it returns without an error. Otherwise it returns a NewConjurError.
func JSONResponse ¶
JSONResponse checks the HTTP status of the response. If it's less than 300, it returns the response body as JSON. Otherwise it returns a NewConjurError.
func NewConjurError ¶
func SecretDataResponse ¶
func SecretDataResponse(resp *http.Response) (io.ReadCloser, error)
SecretDataResponse checks the HTTP status of the response. If it's less than 300, it returns the response body as a stream. Otherwise it returns a NewConjurError.
Types ¶
type ConjurError ¶
type ConjurError struct { Code int Message string Details *ConjurErrorDetails `json:"error"` }
func (*ConjurError) Error ¶
func (self *ConjurError) Error() string
Click to show internal directories.
Click to hide internal directories.