Documentation ¶
Index ¶
- Constants
- func BuildArgVarsList(args map[string]string) string
- func BuildArgsList(args map[string]string) string
- func BuildRequest(payload io.Reader, endpoint string, authClient auth.AuthClient) (*http.Request, error)
- func JsonMarshalToString(v interface{}) (string, error)
- type GraphQLQuery
- type QueryType
- type RequestBodyError
Constants ¶
View Source
const (
QueryTemplate = `` /* 226-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
func BuildArgVarsList ¶
func BuildArgsList ¶
func BuildRequest ¶
func BuildRequest(payload io.Reader, endpoint string, authClient auth.AuthClient) (*http.Request, error)
BuildRequest builds the request and it sets the headers
func JsonMarshalToString ¶ added in v0.2.0
Types ¶
type GraphQLQuery ¶
type RequestBodyError ¶
type RequestBodyError interface { error }
RequestBodyError is returned by BuildRequestBody for any error
func BuildRequestBody ¶
func BuildRequestBody(requestTemplate string, vars interface{}, funcs template.FuncMap) (io.Reader, RequestBodyError)
BuildRequestBody takes the request(query)-specific variables template in and uses it to overlay the common QueryTemplate using the supplied variables, then returns an io.Reader for use as a GraphQL http request body. The user can supply additional functions for use during template processing, but for most queries it should be safe to pass nil and rely on the predefined template.FuncMap.
NOTE: The supplied template *must* include an inlined template definition for "vars", e.g.: `{{define "vars"}}"var_1":"{{.Var1}},"var2":"{{.Var2}}"{{end}}`
Directories ¶
Path | Synopsis |
---|---|
channelsfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
clustersfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
groupsfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
resourcesfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
subscriptionsfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
usersfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
versionsfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.