Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResponseForErrors ¶
* CheckResponseForErrors takes the request and determines if an "errors" field is present. This is * done because as long as the graphql request receives a properly formed request, it will return a * 200OK, even if the request is "bad". For example the, attempting to access resources using an * orgID that is not accessible via the token will still return a 200OK, but will contain an error * message in the body. This function will parse that error message and return to user to provide * better information about the request and better error handling.
func DoQuery ¶ added in v0.2.0
func DoQuery(httpClient HTTPClient, endpoint string, authClient auth.AuthClient, requestTemplate string, vars interface{}, funcs template.FuncMap, result interface{}) error
DoQuery makes the graphql query request and returns the result
Types ¶
type HTTPClient ¶
HTTPClient manages HTTP requests
type SatConClient ¶
type SatConClient struct { Endpoint string HTTPClient HTTPClient AuthClient auth.AuthClient }
SatConClient struct to create HTTPClient and IAMClient interfaces