Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGoldenDataResponse ¶
func CheckGoldenDataResponse(path string, dr *backend.DataResponse, updateFile bool) error
CheckGoldenDataResponse will verify that the stored file matches the given data.DataResponse when the updateFile flag is set, this will both add errors to the response and update the saved file
Types ¶
type Client ¶
type Client interface { // Fetch performs an HTTP GET and returns the body as []byte to prep for marshalling. Fetch(ctx context.Context, uriPath, uriQuery string) ([]byte, error) // Get performs an HTTP GET and returns the response. // This can be used directly from resource calls that don't need to marshal the data Get(ctx context.Context, uriPath, uriQuery string) (*http.Response, error) }
Client implements a REST client that can be easily mocked in tests and manages connection setup and teardown behavior internally
Click to show internal directories.
Click to hide internal directories.