api

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/formatsocial/oapi-codegen version (devel) DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHeadersExampleRequest

func NewHeadersExampleRequest(server string, params *HeadersExampleParams, body HeadersExampleJSONRequestBody) (*http.Request, error)

NewHeadersExampleRequest calls the generic HeadersExample builder with application/json body

func NewHeadersExampleRequestWithBody

func NewHeadersExampleRequestWithBody(server string, params *HeadersExampleParams, contentType string, body io.Reader) (*http.Request, error)

NewHeadersExampleRequestWithBody generates requests for HeadersExample with any type of body

func NewJSONExampleRequest

func NewJSONExampleRequest(server string, body JSONExampleJSONRequestBody) (*http.Request, error)

NewJSONExampleRequest calls the generic JSONExample builder with application/json body

func NewJSONExampleRequestWithBody

func NewJSONExampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewJSONExampleRequestWithBody generates requests for JSONExample with any type of body

func NewMultipartExampleRequestWithBody

func NewMultipartExampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewMultipartExampleRequestWithBody generates requests for MultipartExample with any type of body

func NewMultipleRequestAndResponseTypesRequest

func NewMultipleRequestAndResponseTypesRequest(server string, body MultipleRequestAndResponseTypesJSONRequestBody) (*http.Request, error)

NewMultipleRequestAndResponseTypesRequest calls the generic MultipleRequestAndResponseTypes builder with application/json body

func NewMultipleRequestAndResponseTypesRequestWithBody

func NewMultipleRequestAndResponseTypesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewMultipleRequestAndResponseTypesRequestWithBody generates requests for MultipleRequestAndResponseTypes with any type of body

func NewMultipleRequestAndResponseTypesRequestWithFormdataBody

func NewMultipleRequestAndResponseTypesRequestWithFormdataBody(server string, body MultipleRequestAndResponseTypesFormdataRequestBody) (*http.Request, error)

NewMultipleRequestAndResponseTypesRequestWithFormdataBody calls the generic MultipleRequestAndResponseTypes builder with application/x-www-form-urlencoded body

func NewMultipleRequestAndResponseTypesRequestWithTextBody

func NewMultipleRequestAndResponseTypesRequestWithTextBody(server string, body MultipleRequestAndResponseTypesTextRequestBody) (*http.Request, error)

NewMultipleRequestAndResponseTypesRequestWithTextBody calls the generic MultipleRequestAndResponseTypes builder with text/plain body

func NewReusableResponsesRequest

func NewReusableResponsesRequest(server string, body ReusableResponsesJSONRequestBody) (*http.Request, error)

NewReusableResponsesRequest calls the generic ReusableResponses builder with application/json body

func NewReusableResponsesRequestWithBody

func NewReusableResponsesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewReusableResponsesRequestWithBody generates requests for ReusableResponses with any type of body

func NewTextExampleRequestWithBody

func NewTextExampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewTextExampleRequestWithBody generates requests for TextExample with any type of body

func NewTextExampleRequestWithTextBody

func NewTextExampleRequestWithTextBody(server string, body TextExampleTextRequestBody) (*http.Request, error)

NewTextExampleRequestWithTextBody calls the generic TextExample builder with text/plain body

func NewURLEncodedExampleRequestWithBody

func NewURLEncodedExampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewURLEncodedExampleRequestWithBody generates requests for URLEncodedExample with any type of body

func NewURLEncodedExampleRequestWithFormdataBody

func NewURLEncodedExampleRequestWithFormdataBody(server string, body URLEncodedExampleFormdataRequestBody) (*http.Request, error)

NewURLEncodedExampleRequestWithFormdataBody calls the generic URLEncodedExample builder with application/x-www-form-urlencoded body

func NewUnknownExampleRequestWithBody

func NewUnknownExampleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewUnknownExampleRequestWithBody generates requests for UnknownExample with any type of body

func NewUnspecifiedContentTypeRequestWithBody

func NewUnspecifiedContentTypeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewUnspecifiedContentTypeRequestWithBody generates requests for UnspecifiedContentType with any type of body

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) HeadersExample

func (c *Client) HeadersExample(ctx context.Context, params *HeadersExampleParams, body HeadersExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) HeadersExampleWithBody

func (c *Client) HeadersExampleWithBody(ctx context.Context, params *HeadersExampleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) JSONExample

func (c *Client) JSONExample(ctx context.Context, body JSONExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) JSONExampleWithBody

func (c *Client) JSONExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MultipartExampleWithBody

func (c *Client) MultipartExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MultipleRequestAndResponseTypes

func (c *Client) MultipleRequestAndResponseTypes(ctx context.Context, body MultipleRequestAndResponseTypesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MultipleRequestAndResponseTypesWithBody

func (c *Client) MultipleRequestAndResponseTypesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MultipleRequestAndResponseTypesWithFormdataBody

func (c *Client) MultipleRequestAndResponseTypesWithFormdataBody(ctx context.Context, body MultipleRequestAndResponseTypesFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) MultipleRequestAndResponseTypesWithTextBody

func (c *Client) MultipleRequestAndResponseTypesWithTextBody(ctx context.Context, body MultipleRequestAndResponseTypesTextRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReusableResponses

func (c *Client) ReusableResponses(ctx context.Context, body ReusableResponsesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ReusableResponsesWithBody

func (c *Client) ReusableResponsesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) TextExampleWithBody

func (c *Client) TextExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) TextExampleWithTextBody

func (c *Client) TextExampleWithTextBody(ctx context.Context, body TextExampleTextRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) URLEncodedExampleWithBody

func (c *Client) URLEncodedExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) URLEncodedExampleWithFormdataBody

func (c *Client) URLEncodedExampleWithFormdataBody(ctx context.Context, body URLEncodedExampleFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UnknownExampleWithBody

func (c *Client) UnknownExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UnspecifiedContentTypeWithBody

func (c *Client) UnspecifiedContentTypeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// JSONExample request with any body
	JSONExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	JSONExample(ctx context.Context, body JSONExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// MultipartExample request with any body
	MultipartExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// MultipleRequestAndResponseTypes request with any body
	MultipleRequestAndResponseTypesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	MultipleRequestAndResponseTypes(ctx context.Context, body MultipleRequestAndResponseTypesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	MultipleRequestAndResponseTypesWithFormdataBody(ctx context.Context, body MultipleRequestAndResponseTypesFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	MultipleRequestAndResponseTypesWithTextBody(ctx context.Context, body MultipleRequestAndResponseTypesTextRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ReusableResponses request with any body
	ReusableResponsesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ReusableResponses(ctx context.Context, body ReusableResponsesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// TextExample request with any body
	TextExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	TextExampleWithTextBody(ctx context.Context, body TextExampleTextRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UnknownExample request with any body
	UnknownExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UnspecifiedContentType request with any body
	UnspecifiedContentTypeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// URLEncodedExample request with any body
	URLEncodedExampleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	URLEncodedExampleWithFormdataBody(ctx context.Context, body URLEncodedExampleFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// HeadersExample request with any body
	HeadersExampleWithBody(ctx context.Context, params *HeadersExampleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	HeadersExample(ctx context.Context, params *HeadersExampleParams, body HeadersExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) HeadersExampleWithBodyWithResponse

func (c *ClientWithResponses) HeadersExampleWithBodyWithResponse(ctx context.Context, params *HeadersExampleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*HeadersExampleResponse, error)

HeadersExampleWithBodyWithResponse request with arbitrary body returning *HeadersExampleResponse

func (*ClientWithResponses) HeadersExampleWithResponse

func (c *ClientWithResponses) HeadersExampleWithResponse(ctx context.Context, params *HeadersExampleParams, body HeadersExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*HeadersExampleResponse, error)

func (*ClientWithResponses) JSONExampleWithBodyWithResponse

func (c *ClientWithResponses) JSONExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JSONExampleResponse, error)

JSONExampleWithBodyWithResponse request with arbitrary body returning *JSONExampleResponse

func (*ClientWithResponses) JSONExampleWithResponse

func (c *ClientWithResponses) JSONExampleWithResponse(ctx context.Context, body JSONExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*JSONExampleResponse, error)

func (*ClientWithResponses) MultipartExampleWithBodyWithResponse

func (c *ClientWithResponses) MultipartExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultipartExampleResponse, error)

MultipartExampleWithBodyWithResponse request with arbitrary body returning *MultipartExampleResponse

func (*ClientWithResponses) MultipleRequestAndResponseTypesWithBodyWithResponse

func (c *ClientWithResponses) MultipleRequestAndResponseTypesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

MultipleRequestAndResponseTypesWithBodyWithResponse request with arbitrary body returning *MultipleRequestAndResponseTypesResponse

func (*ClientWithResponses) MultipleRequestAndResponseTypesWithFormdataBodyWithResponse

func (c *ClientWithResponses) MultipleRequestAndResponseTypesWithFormdataBodyWithResponse(ctx context.Context, body MultipleRequestAndResponseTypesFormdataRequestBody, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

func (*ClientWithResponses) MultipleRequestAndResponseTypesWithResponse

func (c *ClientWithResponses) MultipleRequestAndResponseTypesWithResponse(ctx context.Context, body MultipleRequestAndResponseTypesJSONRequestBody, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

func (*ClientWithResponses) MultipleRequestAndResponseTypesWithTextBodyWithResponse

func (c *ClientWithResponses) MultipleRequestAndResponseTypesWithTextBodyWithResponse(ctx context.Context, body MultipleRequestAndResponseTypesTextRequestBody, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

func (*ClientWithResponses) ReusableResponsesWithBodyWithResponse

func (c *ClientWithResponses) ReusableResponsesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReusableResponsesResponse, error)

ReusableResponsesWithBodyWithResponse request with arbitrary body returning *ReusableResponsesResponse

func (*ClientWithResponses) ReusableResponsesWithResponse

func (c *ClientWithResponses) ReusableResponsesWithResponse(ctx context.Context, body ReusableResponsesJSONRequestBody, reqEditors ...RequestEditorFn) (*ReusableResponsesResponse, error)

func (*ClientWithResponses) TextExampleWithBodyWithResponse

func (c *ClientWithResponses) TextExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TextExampleResponse, error)

TextExampleWithBodyWithResponse request with arbitrary body returning *TextExampleResponse

func (*ClientWithResponses) TextExampleWithTextBodyWithResponse

func (c *ClientWithResponses) TextExampleWithTextBodyWithResponse(ctx context.Context, body TextExampleTextRequestBody, reqEditors ...RequestEditorFn) (*TextExampleResponse, error)

func (*ClientWithResponses) URLEncodedExampleWithBodyWithResponse

func (c *ClientWithResponses) URLEncodedExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*URLEncodedExampleResponse, error)

URLEncodedExampleWithBodyWithResponse request with arbitrary body returning *URLEncodedExampleResponse

func (*ClientWithResponses) URLEncodedExampleWithFormdataBodyWithResponse

func (c *ClientWithResponses) URLEncodedExampleWithFormdataBodyWithResponse(ctx context.Context, body URLEncodedExampleFormdataRequestBody, reqEditors ...RequestEditorFn) (*URLEncodedExampleResponse, error)

func (*ClientWithResponses) UnknownExampleWithBodyWithResponse

func (c *ClientWithResponses) UnknownExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnknownExampleResponse, error)

UnknownExampleWithBodyWithResponse request with arbitrary body returning *UnknownExampleResponse

func (*ClientWithResponses) UnspecifiedContentTypeWithBodyWithResponse

func (c *ClientWithResponses) UnspecifiedContentTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnspecifiedContentTypeResponse, error)

UnspecifiedContentTypeWithBodyWithResponse request with arbitrary body returning *UnspecifiedContentTypeResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// JSONExample request with any body
	JSONExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JSONExampleResponse, error)

	JSONExampleWithResponse(ctx context.Context, body JSONExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*JSONExampleResponse, error)

	// MultipartExample request with any body
	MultipartExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultipartExampleResponse, error)

	// MultipleRequestAndResponseTypes request with any body
	MultipleRequestAndResponseTypesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

	MultipleRequestAndResponseTypesWithResponse(ctx context.Context, body MultipleRequestAndResponseTypesJSONRequestBody, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

	MultipleRequestAndResponseTypesWithFormdataBodyWithResponse(ctx context.Context, body MultipleRequestAndResponseTypesFormdataRequestBody, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

	MultipleRequestAndResponseTypesWithTextBodyWithResponse(ctx context.Context, body MultipleRequestAndResponseTypesTextRequestBody, reqEditors ...RequestEditorFn) (*MultipleRequestAndResponseTypesResponse, error)

	// ReusableResponses request with any body
	ReusableResponsesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReusableResponsesResponse, error)

	ReusableResponsesWithResponse(ctx context.Context, body ReusableResponsesJSONRequestBody, reqEditors ...RequestEditorFn) (*ReusableResponsesResponse, error)

	// TextExample request with any body
	TextExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TextExampleResponse, error)

	TextExampleWithTextBodyWithResponse(ctx context.Context, body TextExampleTextRequestBody, reqEditors ...RequestEditorFn) (*TextExampleResponse, error)

	// UnknownExample request with any body
	UnknownExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnknownExampleResponse, error)

	// UnspecifiedContentType request with any body
	UnspecifiedContentTypeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UnspecifiedContentTypeResponse, error)

	// URLEncodedExample request with any body
	URLEncodedExampleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*URLEncodedExampleResponse, error)

	URLEncodedExampleWithFormdataBodyWithResponse(ctx context.Context, body URLEncodedExampleFormdataRequestBody, reqEditors ...RequestEditorFn) (*URLEncodedExampleResponse, error)

	// HeadersExample request with any body
	HeadersExampleWithBodyWithResponse(ctx context.Context, params *HeadersExampleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*HeadersExampleResponse, error)

	HeadersExampleWithResponse(ctx context.Context, params *HeadersExampleParams, body HeadersExampleJSONRequestBody, reqEditors ...RequestEditorFn) (*HeadersExampleResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Example

type Example struct {
	Value *string `json:"value,omitempty"`
}

Example defines model for example.

type HeadersExampleJSONRequestBody

type HeadersExampleJSONRequestBody = Example

HeadersExampleJSONRequestBody defines body for HeadersExample for application/json ContentType.

type HeadersExampleParams

type HeadersExampleParams struct {
	Header1 string `json:"header1"`
	Header2 *int   `json:"header2,omitempty"`
}

HeadersExampleParams defines parameters for HeadersExample.

type HeadersExampleResponse

type HeadersExampleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Example
}

func ParseHeadersExampleResponse

func ParseHeadersExampleResponse(rsp *http.Response) (*HeadersExampleResponse, error)

ParseHeadersExampleResponse parses an HTTP response from a HeadersExampleWithResponse call

func (HeadersExampleResponse) Status

func (r HeadersExampleResponse) Status() string

Status returns HTTPResponse.Status

func (HeadersExampleResponse) StatusCode

func (r HeadersExampleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type JSONExampleJSONRequestBody

type JSONExampleJSONRequestBody = Example

JSONExampleJSONRequestBody defines body for JSONExample for application/json ContentType.

type JSONExampleResponse

type JSONExampleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Example
}

func ParseJSONExampleResponse

func ParseJSONExampleResponse(rsp *http.Response) (*JSONExampleResponse, error)

ParseJSONExampleResponse parses an HTTP response from a JSONExampleWithResponse call

func (JSONExampleResponse) Status

func (r JSONExampleResponse) Status() string

Status returns HTTPResponse.Status

func (JSONExampleResponse) StatusCode

func (r JSONExampleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type MultipartExampleMultipartRequestBody

type MultipartExampleMultipartRequestBody = Example

MultipartExampleMultipartRequestBody defines body for MultipartExample for multipart/form-data ContentType.

type MultipartExampleResponse

type MultipartExampleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseMultipartExampleResponse

func ParseMultipartExampleResponse(rsp *http.Response) (*MultipartExampleResponse, error)

ParseMultipartExampleResponse parses an HTTP response from a MultipartExampleWithResponse call

func (MultipartExampleResponse) Status

func (r MultipartExampleResponse) Status() string

Status returns HTTPResponse.Status

func (MultipartExampleResponse) StatusCode

func (r MultipartExampleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type MultipleRequestAndResponseTypesFormdataRequestBody

type MultipleRequestAndResponseTypesFormdataRequestBody = Example

MultipleRequestAndResponseTypesFormdataRequestBody defines body for MultipleRequestAndResponseTypes for application/x-www-form-urlencoded ContentType.

type MultipleRequestAndResponseTypesJSONRequestBody

type MultipleRequestAndResponseTypesJSONRequestBody = Example

MultipleRequestAndResponseTypesJSONRequestBody defines body for MultipleRequestAndResponseTypes for application/json ContentType.

type MultipleRequestAndResponseTypesMultipartRequestBody

type MultipleRequestAndResponseTypesMultipartRequestBody = Example

MultipleRequestAndResponseTypesMultipartRequestBody defines body for MultipleRequestAndResponseTypes for multipart/form-data ContentType.

type MultipleRequestAndResponseTypesResponse

type MultipleRequestAndResponseTypesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Example
}

func ParseMultipleRequestAndResponseTypesResponse

func ParseMultipleRequestAndResponseTypesResponse(rsp *http.Response) (*MultipleRequestAndResponseTypesResponse, error)

ParseMultipleRequestAndResponseTypesResponse parses an HTTP response from a MultipleRequestAndResponseTypesWithResponse call

func (MultipleRequestAndResponseTypesResponse) Status

Status returns HTTPResponse.Status

func (MultipleRequestAndResponseTypesResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type MultipleRequestAndResponseTypesTextBody

type MultipleRequestAndResponseTypesTextBody = string

MultipleRequestAndResponseTypesTextBody defines parameters for MultipleRequestAndResponseTypes.

type MultipleRequestAndResponseTypesTextRequestBody

type MultipleRequestAndResponseTypesTextRequestBody = MultipleRequestAndResponseTypesTextBody

MultipleRequestAndResponseTypesTextRequestBody defines body for MultipleRequestAndResponseTypes for text/plain ContentType.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ReusableResponsesJSONRequestBody

type ReusableResponsesJSONRequestBody = Example

ReusableResponsesJSONRequestBody defines body for ReusableResponses for application/json ContentType.

type ReusableResponsesResponse

type ReusableResponsesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Example
}

func ParseReusableResponsesResponse

func ParseReusableResponsesResponse(rsp *http.Response) (*ReusableResponsesResponse, error)

ParseReusableResponsesResponse parses an HTTP response from a ReusableResponsesWithResponse call

func (ReusableResponsesResponse) Status

func (r ReusableResponsesResponse) Status() string

Status returns HTTPResponse.Status

func (ReusableResponsesResponse) StatusCode

func (r ReusableResponsesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Reusableresponse

type Reusableresponse = Example

Reusableresponse defines model for reusableresponse.

type TextExampleResponse

type TextExampleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseTextExampleResponse

func ParseTextExampleResponse(rsp *http.Response) (*TextExampleResponse, error)

ParseTextExampleResponse parses an HTTP response from a TextExampleWithResponse call

func (TextExampleResponse) Status

func (r TextExampleResponse) Status() string

Status returns HTTPResponse.Status

func (TextExampleResponse) StatusCode

func (r TextExampleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type TextExampleTextBody

type TextExampleTextBody = string

TextExampleTextBody defines parameters for TextExample.

type TextExampleTextRequestBody

type TextExampleTextRequestBody = TextExampleTextBody

TextExampleTextRequestBody defines body for TextExample for text/plain ContentType.

type URLEncodedExampleFormdataRequestBody

type URLEncodedExampleFormdataRequestBody = Example

URLEncodedExampleFormdataRequestBody defines body for URLEncodedExample for application/x-www-form-urlencoded ContentType.

type URLEncodedExampleResponse

type URLEncodedExampleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseURLEncodedExampleResponse

func ParseURLEncodedExampleResponse(rsp *http.Response) (*URLEncodedExampleResponse, error)

ParseURLEncodedExampleResponse parses an HTTP response from a URLEncodedExampleWithResponse call

func (URLEncodedExampleResponse) Status

func (r URLEncodedExampleResponse) Status() string

Status returns HTTPResponse.Status

func (URLEncodedExampleResponse) StatusCode

func (r URLEncodedExampleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UnknownExampleResponse

type UnknownExampleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseUnknownExampleResponse

func ParseUnknownExampleResponse(rsp *http.Response) (*UnknownExampleResponse, error)

ParseUnknownExampleResponse parses an HTTP response from a UnknownExampleWithResponse call

func (UnknownExampleResponse) Status

func (r UnknownExampleResponse) Status() string

Status returns HTTPResponse.Status

func (UnknownExampleResponse) StatusCode

func (r UnknownExampleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UnspecifiedContentTypeResponse

type UnspecifiedContentTypeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseUnspecifiedContentTypeResponse

func ParseUnspecifiedContentTypeResponse(rsp *http.Response) (*UnspecifiedContentTypeResponse, error)

ParseUnspecifiedContentTypeResponse parses an HTTP response from a UnspecifiedContentTypeWithResponse call

func (UnspecifiedContentTypeResponse) Status

Status returns HTTPResponse.Status

func (UnspecifiedContentTypeResponse) StatusCode

func (r UnspecifiedContentTypeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL