# README
Google Client Api Batch Utility in Go
The batch package allows your code to queue client api calls from various client api go packages and send the queued calls via a single batch call. Individual responses may then be interrogated for errors and the responses processed. For specifics of the batch protocol see Link
batch.BatchClient which is a mock http.Client that intercepts client api Do() calls and returns an error that may be parsed into a batch request. A batch.Service parses the error using the AddRequest(err, ...RequestOption) func and queues the Request. Queued requests are posted via the Do() method which returns a slice Response objects.
Examples may be found in the example_test.go file.
# Packages
Package credentials provides oauth2 credentials for batch requests.
# Functions
ErrorResponse creates a response with the passed error.
NewResponse creates a response from a stream.
ProcessBody loops through requests and processes each part of multipart response.
SetCredentials overrides the batch.Service authorization.
SetResult provides a struct pointer so that batch.Request may unmarshall corresponding JSON response.
SetTag adds identifying data to the batch.Request which is then transfered to the corresponding response.
# Variables
BatchClient is used to initiate a client api service.
# Interfaces
Credentialer provides oauth credentials to a request.
# Type aliases
RequestOption configurs.