Documentation ¶
Overview ¶
Package openapi3 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.1 DO NOT EDIT.
Package openapi3 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.9.1 DO NOT EDIT.
Index ¶
- func NewCreateTaskRequest(server string, body CreateTaskJSONRequestBody) (*http.Request, error)
- func NewCreateTaskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteTaskRequest(server string, taskId string) (*http.Request, error)
- func NewReadTaskRequest(server string, taskId string) (*http.Request, error)
- func NewSearchTaskRequest(server string, body SearchTaskJSONRequestBody) (*http.Request, error)
- func NewSearchTaskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateTaskRequest(server string, taskId string, body UpdateTaskJSONRequestBody) (*http.Request, error)
- func NewUpdateTaskRequestWithBody(server string, taskId string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) CreateTask(ctx context.Context, body CreateTaskJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateTaskWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteTask(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ReadTask(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SearchTask(ctx context.Context, body SearchTaskJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SearchTaskWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateTask(ctx context.Context, taskId string, body UpdateTaskJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateTaskWithBody(ctx context.Context, taskId string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateTaskResponse, error)
- func (c *ClientWithResponses) CreateTaskWithResponse(ctx context.Context, body CreateTaskJSONRequestBody, ...) (*CreateTaskResponse, error)
- func (c *ClientWithResponses) DeleteTaskWithResponse(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*DeleteTaskResponse, error)
- func (c *ClientWithResponses) ReadTaskWithResponse(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*ReadTaskResponse, error)
- func (c *ClientWithResponses) SearchTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SearchTaskResponse, error)
- func (c *ClientWithResponses) SearchTaskWithResponse(ctx context.Context, body SearchTaskJSONRequestBody, ...) (*SearchTaskResponse, error)
- func (c *ClientWithResponses) UpdateTaskWithBodyWithResponse(ctx context.Context, taskId string, contentType string, body io.Reader, ...) (*UpdateTaskResponse, error)
- func (c *ClientWithResponses) UpdateTaskWithResponse(ctx context.Context, taskId string, body UpdateTaskJSONRequestBody, ...) (*UpdateTaskResponse, error)
- type ClientWithResponsesInterface
- type CreateTaskJSONRequestBody
- type CreateTaskResponse
- type CreateTasksRequest
- type CreateTasksResponse
- type Dates
- type DeleteTaskResponse
- type ErrorResponse
- type HttpRequestDoer
- type Priority
- type ReadTaskResponse
- type ReadTasksResponse
- type RequestEditorFn
- type SearchTaskJSONRequestBody
- type SearchTaskResponse
- type SearchTasksRequest
- type SearchTasksResponse
- type Task
- type UpdateTaskJSONRequestBody
- type UpdateTaskResponse
- type UpdateTasksRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateTaskRequest ¶
func NewCreateTaskRequest(server string, body CreateTaskJSONRequestBody) (*http.Request, error)
NewCreateTaskRequest calls the generic CreateTask builder with application/json body
func NewCreateTaskRequestWithBody ¶
func NewCreateTaskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateTaskRequestWithBody generates requests for CreateTask with any type of body
func NewDeleteTaskRequest ¶
NewDeleteTaskRequest generates requests for DeleteTask
func NewReadTaskRequest ¶
NewReadTaskRequest generates requests for ReadTask
func NewSearchTaskRequest ¶
func NewSearchTaskRequest(server string, body SearchTaskJSONRequestBody) (*http.Request, error)
NewSearchTaskRequest calls the generic SearchTask builder with application/json body
func NewSearchTaskRequestWithBody ¶
func NewSearchTaskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewSearchTaskRequestWithBody generates requests for SearchTask with any type of body
func NewUpdateTaskRequest ¶
func NewUpdateTaskRequest(server string, taskId string, body UpdateTaskJSONRequestBody) (*http.Request, error)
NewUpdateTaskRequest calls the generic UpdateTask builder with application/json 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) CreateTask ¶
func (c *Client) CreateTask(ctx context.Context, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateTaskWithBody ¶
func (*Client) DeleteTask ¶
func (*Client) SearchTask ¶
func (c *Client) SearchTask(ctx context.Context, body SearchTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) SearchTaskWithBody ¶
func (*Client) UpdateTask ¶
func (c *Client) UpdateTask(ctx context.Context, taskId string, body UpdateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // SearchTask request with any body SearchTaskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) SearchTask(ctx context.Context, body SearchTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateTask request with any body CreateTaskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateTask(ctx context.Context, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTask request DeleteTask(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error) // ReadTask request ReadTask(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateTask request with any body UpdateTaskWithBody(ctx context.Context, taskId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateTask(ctx context.Context, taskId string, body UpdateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
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) CreateTaskWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
CreateTaskWithBodyWithResponse request with arbitrary body returning *CreateTaskResponse
func (*ClientWithResponses) CreateTaskWithResponse ¶
func (c *ClientWithResponses) CreateTaskWithResponse(ctx context.Context, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error)
func (*ClientWithResponses) DeleteTaskWithResponse ¶
func (c *ClientWithResponses) DeleteTaskWithResponse(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*DeleteTaskResponse, error)
DeleteTaskWithResponse request returning *DeleteTaskResponse
func (*ClientWithResponses) ReadTaskWithResponse ¶
func (c *ClientWithResponses) ReadTaskWithResponse(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*ReadTaskResponse, error)
ReadTaskWithResponse request returning *ReadTaskResponse
func (*ClientWithResponses) SearchTaskWithBodyWithResponse ¶
func (c *ClientWithResponses) SearchTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchTaskResponse, error)
SearchTaskWithBodyWithResponse request with arbitrary body returning *SearchTaskResponse
func (*ClientWithResponses) SearchTaskWithResponse ¶
func (c *ClientWithResponses) SearchTaskWithResponse(ctx context.Context, body SearchTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchTaskResponse, error)
func (*ClientWithResponses) UpdateTaskWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateTaskWithBodyWithResponse(ctx context.Context, taskId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTaskResponse, error)
UpdateTaskWithBodyWithResponse request with arbitrary body returning *UpdateTaskResponse
func (*ClientWithResponses) UpdateTaskWithResponse ¶
func (c *ClientWithResponses) UpdateTaskWithResponse(ctx context.Context, taskId string, body UpdateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTaskResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // SearchTask request with any body SearchTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SearchTaskResponse, error) SearchTaskWithResponse(ctx context.Context, body SearchTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*SearchTaskResponse, error) // CreateTask request with any body CreateTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error) CreateTaskWithResponse(ctx context.Context, body CreateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTaskResponse, error) // DeleteTask request DeleteTaskWithResponse(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*DeleteTaskResponse, error) // ReadTask request ReadTaskWithResponse(ctx context.Context, taskId string, reqEditors ...RequestEditorFn) (*ReadTaskResponse, error) // UpdateTask request with any body UpdateTaskWithBodyWithResponse(ctx context.Context, taskId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTaskResponse, error) UpdateTaskWithResponse(ctx context.Context, taskId string, body UpdateTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTaskResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateTaskJSONRequestBody ¶
type CreateTaskJSONRequestBody CreateTasksRequest
CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.
type CreateTaskResponse ¶
type CreateTaskResponse struct { Body []byte HTTPResponse *http.Response JSON201 *struct { Task *Task `json:"task,omitempty"` } JSON400 *struct { Error *string `json:"error,omitempty"` } JSON500 *struct { Error *string `json:"error,omitempty"` } }
func ParseCreateTaskResponse ¶
func ParseCreateTaskResponse(rsp *http.Response) (*CreateTaskResponse, error)
ParseCreateTaskResponse parses an HTTP response from a CreateTaskWithResponse call
func (CreateTaskResponse) Status ¶
func (r CreateTaskResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTaskResponse) StatusCode ¶
func (r CreateTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateTasksRequest ¶
type CreateTasksRequest struct { Dates *Dates `json:"dates,omitempty"` Description *string `json:"description,omitempty"` Priority *Priority `json:"priority,omitempty"` }
CreateTasksRequest defines model for CreateTasksRequest.
type CreateTasksResponse ¶
type CreateTasksResponse struct {
Task *Task `json:"task,omitempty"`
}
CreateTasksResponse defines model for CreateTasksResponse.
type DeleteTaskResponse ¶
type DeleteTaskResponse struct { Body []byte HTTPResponse *http.Response JSON500 *struct { Error *string `json:"error,omitempty"` } }
func ParseDeleteTaskResponse ¶
func ParseDeleteTaskResponse(rsp *http.Response) (*DeleteTaskResponse, error)
ParseDeleteTaskResponse parses an HTTP response from a DeleteTaskWithResponse call
func (DeleteTaskResponse) Status ¶
func (r DeleteTaskResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteTaskResponse) StatusCode ¶
func (r DeleteTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrorResponse ¶
type ErrorResponse struct {
Error *string `json:"error,omitempty"`
}
ErrorResponse defines model for ErrorResponse.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ReadTaskResponse ¶
type ReadTaskResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Task *Task `json:"task,omitempty"` } JSON500 *struct { Error *string `json:"error,omitempty"` } }
func ParseReadTaskResponse ¶
func ParseReadTaskResponse(rsp *http.Response) (*ReadTaskResponse, error)
ParseReadTaskResponse parses an HTTP response from a ReadTaskWithResponse call
func (ReadTaskResponse) Status ¶
func (r ReadTaskResponse) Status() string
Status returns HTTPResponse.Status
func (ReadTaskResponse) StatusCode ¶
func (r ReadTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReadTasksResponse ¶
type ReadTasksResponse struct {
Task *Task `json:"task,omitempty"`
}
ReadTasksResponse defines model for ReadTasksResponse.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SearchTaskJSONRequestBody ¶
type SearchTaskJSONRequestBody SearchTasksRequest
SearchTaskJSONRequestBody defines body for SearchTask for application/json ContentType.
type SearchTaskResponse ¶
type SearchTaskResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Tasks *[]Task `json:"tasks,omitempty"` Total *int64 `json:"total,omitempty"` } JSON400 *struct { Error *string `json:"error,omitempty"` } JSON500 *struct { Error *string `json:"error,omitempty"` } }
func ParseSearchTaskResponse ¶
func ParseSearchTaskResponse(rsp *http.Response) (*SearchTaskResponse, error)
ParseSearchTaskResponse parses an HTTP response from a SearchTaskWithResponse call
func (SearchTaskResponse) Status ¶
func (r SearchTaskResponse) Status() string
Status returns HTTPResponse.Status
func (SearchTaskResponse) StatusCode ¶
func (r SearchTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SearchTasksRequest ¶
type SearchTasksRequest struct { Description *string `json:"description"` From *int64 `json:"from,omitempty"` IsDone *bool `json:"is_done"` Priority *Priority `json:"priority,omitempty"` Size *int64 `json:"size,omitempty"` }
SearchTasksRequest defines model for SearchTasksRequest.
type SearchTasksResponse ¶
type SearchTasksResponse struct { Tasks *[]Task `json:"tasks,omitempty"` Total *int64 `json:"total,omitempty"` }
SearchTasksResponse defines model for SearchTasksResponse.
type Task ¶
type Task struct { Dates *Dates `json:"dates,omitempty"` Description *string `json:"description,omitempty"` Id *string `json:"id,omitempty"` IsDone *bool `json:"is_done,omitempty"` Priority *Priority `json:"priority,omitempty"` }
Task defines model for Task.
type UpdateTaskJSONRequestBody ¶
type UpdateTaskJSONRequestBody UpdateTasksRequest
UpdateTaskJSONRequestBody defines body for UpdateTask for application/json ContentType.
type UpdateTaskResponse ¶
type UpdateTaskResponse struct { Body []byte HTTPResponse *http.Response JSON400 *struct { Error *string `json:"error,omitempty"` } JSON500 *struct { Error *string `json:"error,omitempty"` } }
func ParseUpdateTaskResponse ¶
func ParseUpdateTaskResponse(rsp *http.Response) (*UpdateTaskResponse, error)
ParseUpdateTaskResponse parses an HTTP response from a UpdateTaskWithResponse call
func (UpdateTaskResponse) Status ¶
func (r UpdateTaskResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateTaskResponse) StatusCode ¶
func (r UpdateTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode