{"modulePath":"github.com/ascendsoftware/oapi-codegen","version":"v1.0.12","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package client\n\nPackage client provides primitives to interact with the openapi HTTP API.\n\nCode generated by github.com/ascendsoftware/oapi-codegen version (devel) DO NOT EDIT.\n\n## Constants\n\n```go\nconst (\n\tOpenIdScopes = \"OpenId.Scopes\"\n)\n```\n\n## Functions\n\n```go\nfunc NewGetBothRequest(server string) (*http.Request, error)\n```\nNewGetBothRequest generates requests for GetBoth\n\n```go\nfunc NewGetJsonRequest(server string) (*http.Request, error)\n```\nNewGetJsonRequest generates requests for GetJson\n\n```go\nfunc NewGetJsonWithTrailingSlashRequest(server string) (*http.Request, error)\n```\nNewGetJsonWithTrailingSlashRequest generates requests for GetJsonWithTrailingSlash\n\n```go\nfunc NewGetOtherRequest(server string) (*http.Request, error)\n```\nNewGetOtherRequest generates requests for GetOther\n\n```go\nfunc NewPostBothRequest(server string, body PostBothJSONRequestBody) (*http.Request, error)\n```\nNewPostBothRequest calls the generic PostBoth builder with application/json body\n\n```go\nfunc NewPostBothRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)\n```\nNewPostBothRequestWithBody generates requests for PostBoth with any type of body\n\n```go\nfunc NewPostJsonRequest(server string, body PostJsonJSONRequestBody) (*http.Request, error)\n```\nNewPostJsonRequest calls the generic PostJson builder with application/json body\n\n```go\nfunc NewPostJsonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)\n```\nNewPostJsonRequestWithBody generates requests for PostJson with any type of body\n\n```go\nfunc NewPostOtherRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)\n```\nNewPostOtherRequestWithBody generates requests for PostOther with any type of body\n\n```go\nfunc NewPostVendorJsonRequestWithApplicationVndAPIPlusJSONBody(server string, body PostVendorJsonApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)\n```\nNewPostVendorJsonRequestWithApplicationVndAPIPlusJSONBody calls the generic PostVendorJson builder with application/vnd.api+json body\n\n```go\nfunc NewPostVendorJsonRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)\n```\nNewPostVendorJsonRequestWithBody generates requests for PostVendorJson with any type of body\n\n## Types\n\n```go\ntype Client struct {\n\t// The endpoint of the server conforming to this interface, with scheme,\n\t// https://api.ascendsoftware.com for example. This can contain a path relative\n\t// to the server, such as https://api.ascendsoftware.com/dev-test, and all the\n\t// paths in the swagger spec will be appended to the server.\n\tServer string\n\n\t// Doer for performing requests, typically a *http.Client with any\n\t// customized settings, such as certificate chains.\n\tClient HttpRequestDoer\n\n\t// A list of callbacks for modifying requests which are generated before sending over\n\t// the network.\n\tRequestEditors []RequestEditorFn\n}\n```\nClient which conforms to the OpenAPI3 specification for this service.\n\n```go\nfunc NewClient(server string, opts ...ClientOption) (*Client, error)\n```\nCreates a new Client, with reasonable defaults\n\n```go\nfunc (c *Client) GetBoth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) GetJson(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) GetJsonWithTrailingSlash(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) GetOther(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) PostBoth(ctx context.Context, body PostBothJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) PostBothWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) PostJson(ctx context.Context, body PostJsonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) PostJsonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) PostOtherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) PostVendorJsonWithApplicationVndAPIPlusJSONBody(ctx context.Context, body PostVendorJsonApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) PostVendorJsonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n```\n\n```go\ntype ClientInterface interface {\n\t// PostBothWithBody request with any body\n\tPostBothWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\tPostBoth(ctx context.Context, body PostBothJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetBoth request\n\tGetBoth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PostJsonWithBody request with any body\n\tPostJsonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\tPostJson(ctx context.Context, body PostJsonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetJson request\n\tGetJson(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PostOtherWithBody request with any body\n\tPostOtherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetOther request\n\tGetOther(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// GetJsonWithTrailingSlash request\n\tGetJsonWithTrailingSlash(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\t// PostVendorJsonWithBody request with any body\n\tPostVendorJsonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)\n\n\tPostVendorJsonWithApplicationVndAPIPlusJSONBody(ctx context.Context, body PostVendorJsonApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)\n}\n```\nThe interface specification for the client above.\n\n```go\ntype ClientOption func(*Client) error\n```\nClientOption allows setting custom parameters during construction\n\n```go\nfunc WithBaseURL(baseURL string) ClientOption\n```\nWithBaseURL overrides the baseURL.\n\n```go\nfunc WithHTTPClient(doer HttpRequestDoer) ClientOption\n```\nWithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.\n\n```go\nfunc WithRequestEditorFn(fn RequestEditorFn) ClientOption\n```\nWithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.\n\n```go\ntype ClientWithResponses struct {\n\tClientInterface\n}\n```\nClientWithResponses builds on ClientInterface to offer response payloads\n\n```go\nfunc NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)\n```\nNewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling\n\n```go\nfunc (c *ClientWithResponses) GetBothWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBothResponse, error)\n```\nGetBothWithResponse request returning \\*GetBothResponse\n\n```go\nfunc (c *ClientWithResponses) GetJsonWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJsonResponse, error)\n```\nGetJsonWithResponse request returning \\*GetJsonResponse\n\n```go\nfunc (c *ClientWithResponses) GetJsonWithTrailingSlashWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJsonWithTrailingSlashResponse, error)\n```\nGetJsonWithTrailingSlashWithResponse request returning \\*GetJsonWithTrailingSlashResponse\n\n```go\nfunc (c *ClientWithResponses) GetOtherWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOtherResponse, error)\n```\nGetOtherWithResponse request returning \\*GetOtherResponse\n\n```go\nfunc (c *ClientWithResponses) PostBothWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostBothResponse, error)\n```\nPostBothWithBodyWithResponse request with arbitrary body returning \\*PostBothResponse\n\n```go\nfunc (c *ClientWithResponses) PostBothWithResponse(ctx context.Context, body PostBothJSONRequestBody, reqEditors ...RequestEditorFn) (*PostBothResponse, error)\n```\n\n```go\nfunc (c *ClientWithResponses) PostJsonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostJsonResponse, error)\n```\nPostJsonWithBodyWithResponse request with arbitrary body returning \\*PostJsonResponse\n\n```go\nfunc (c *ClientWithResponses) PostJsonWithResponse(ctx context.Context, body PostJsonJSONRequestBody, reqEditors ...RequestEditorFn) (*PostJsonResponse, error)\n```\n\n```go\nfunc (c *ClientWithResponses) PostOtherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOtherResponse, error)\n```\nPostOtherWithBodyWithResponse request with arbitrary body returning \\*PostOtherResponse\n\n```go\nfunc (c *ClientWithResponses) PostVendorJsonWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body PostVendorJsonApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVendorJsonResponse, error)\n```\n\n```go\nfunc (c *ClientWithResponses) PostVendorJsonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVendorJsonResponse, error)\n```\nPostVendorJsonWithBodyWithResponse request with arbitrary body returning \\*PostVendorJsonResponse\n\n```go\ntype ClientWithResponsesInterface interface {\n\t// PostBothWithBodyWithResponse request with any body\n\tPostBothWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostBothResponse, error)\n\n\tPostBothWithResponse(ctx context.Context, body PostBothJSONRequestBody, reqEditors ...RequestEditorFn) (*PostBothResponse, error)\n\n\t// GetBothWithResponse request\n\tGetBothWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBothResponse, error)\n\n\t// PostJsonWithBodyWithResponse request with any body\n\tPostJsonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostJsonResponse, error)\n\n\tPostJsonWithResponse(ctx context.Context, body PostJsonJSONRequestBody, reqEditors ...RequestEditorFn) (*PostJsonResponse, error)\n\n\t// GetJsonWithResponse request\n\tGetJsonWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJsonResponse, error)\n\n\t// PostOtherWithBodyWithResponse request with any body\n\tPostOtherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOtherResponse, error)\n\n\t// GetOtherWithResponse request\n\tGetOtherWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOtherResponse, error)\n\n\t// GetJsonWithTrailingSlashWithResponse request\n\tGetJsonWithTrailingSlashWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJsonWithTrailingSlashResponse, error)\n\n\t// PostVendorJsonWithBodyWithResponse request with any body\n\tPostVendorJsonWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVendorJsonResponse, error)\n\n\tPostVendorJsonWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body PostVendorJsonApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVendorJsonResponse, error)\n}\n```\nClientWithResponsesInterface is the interface specification for the client with responses above.\n\n```go\ntype GetBothResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParseGetBothResponse(rsp *http.Response) (*GetBothResponse, error)\n```\nParseGetBothResponse parses an HTTP response from a GetBothWithResponse call\n\n```go\nfunc (r GetBothResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetBothResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetJsonResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParseGetJsonResponse(rsp *http.Response) (*GetJsonResponse, error)\n```\nParseGetJsonResponse parses an HTTP response from a GetJsonWithResponse call\n\n```go\nfunc (r GetJsonResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetJsonResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetJsonWithTrailingSlashResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParseGetJsonWithTrailingSlashResponse(rsp *http.Response) (*GetJsonWithTrailingSlashResponse, error)\n```\nParseGetJsonWithTrailingSlashResponse parses an HTTP response from a GetJsonWithTrailingSlashWithResponse call\n\n```go\nfunc (r GetJsonWithTrailingSlashResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetJsonWithTrailingSlashResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype GetOtherResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParseGetOtherResponse(rsp *http.Response) (*GetOtherResponse, error)\n```\nParseGetOtherResponse parses an HTTP response from a GetOtherWithResponse call\n\n```go\nfunc (r GetOtherResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r GetOtherResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype HttpRequestDoer interface {\n\tDo(req *http.Request) (*http.Response, error)\n}\n```\nDoer performs HTTP requests.\n\nThe standard http.Client implements this interface.\n\n```go\ntype PostBothJSONRequestBody = SchemaObject\n```\nPostBothJSONRequestBody defines body for PostBoth for application/json ContentType.\n\n```go\ntype PostBothResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParsePostBothResponse(rsp *http.Response) (*PostBothResponse, error)\n```\nParsePostBothResponse parses an HTTP response from a PostBothWithResponse call\n\n```go\nfunc (r PostBothResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PostBothResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PostJsonJSONRequestBody = SchemaObject\n```\nPostJsonJSONRequestBody defines body for PostJson for application/json ContentType.\n\n```go\ntype PostJsonResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParsePostJsonResponse(rsp *http.Response) (*PostJsonResponse, error)\n```\nParsePostJsonResponse parses an HTTP response from a PostJsonWithResponse call\n\n```go\nfunc (r PostJsonResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PostJsonResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PostOtherResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParsePostOtherResponse(rsp *http.Response) (*PostOtherResponse, error)\n```\nParsePostOtherResponse parses an HTTP response from a PostOtherWithResponse call\n\n```go\nfunc (r PostOtherResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PostOtherResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype PostVendorJsonApplicationVndAPIPlusJSONBody = map[string]interface{}\n```\nPostVendorJsonApplicationVndAPIPlusJSONBody defines parameters for PostVendorJson.\n\n```go\ntype PostVendorJsonApplicationVndAPIPlusJSONRequestBody = PostVendorJsonApplicationVndAPIPlusJSONBody\n```\nPostVendorJsonApplicationVndAPIPlusJSONRequestBody defines body for PostVendorJson for application/vnd.api+json ContentType.\n\n```go\ntype PostVendorJsonResponse struct {\n\tBody         []byte\n\tHTTPResponse *http.Response\n}\n```\n\n```go\nfunc ParsePostVendorJsonResponse(rsp *http.Response) (*PostVendorJsonResponse, error)\n```\nParsePostVendorJsonResponse parses an HTTP response from a PostVendorJsonWithResponse call\n\n```go\nfunc (r PostVendorJsonResponse) Status() string\n```\nStatus returns HTTPResponse.Status\n\n```go\nfunc (r PostVendorJsonResponse) StatusCode() int\n```\nStatusCode returns HTTPResponse.StatusCode\n\n```go\ntype RequestEditorFn func(ctx context.Context, req *http.Request) error\n```\nRequestEditorFn  is the function signature for the RequestEditor callback function\n\n```go\ntype SchemaObject struct {\n\tFirstName string `json:\"firstName\"`\n\tRole      string `json:\"role\"`\n}\n```\nSchemaObject defines model for SchemaObject.\n\n","path":"github.com/ascendsoftware/oapi-codegen/internal/test/client","name":"client","synopsis":"Package client provides primitives to interact with the openapi HTTP API.","isRedistributable":true}
