Documentation ¶
Overview ¶
Package issue1039 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/jKiler/oapi-codegen version v1.0.0-00010101000000-000000000000 DO NOT EDIT.
Package issue1039 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/jKiler/oapi-codegen version v1.0.0-00010101000000-000000000000 DO NOT EDIT.
Package issue1039 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/jKiler/oapi-codegen version v1.0.0-00010101000000-000000000000 DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func NewExamplePatchRequest(server string, body ExamplePatchJSONRequestBody) (*http.Request, error)
- func NewExamplePatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type ChiServerOptions
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ExamplePatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*ExamplePatchResponse, error)
- func (c *ClientWithResponses) ExamplePatchWithResponse(ctx context.Context, body ExamplePatchJSONRequestBody, ...) (*ExamplePatchResponse, error)
- type ClientWithResponsesInterface
- type ComplexOptionalNullable
- type ComplexRequiredNullable
- type ExamplePatchJSONRequestBody
- type ExamplePatchResponse
- type HttpRequestDoer
- type InvalidParamFormatError
- type MiddlewareFunc
- type PatchRequest
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type SimpleOptionalNonNullable
- type SimpleOptionalNullable
- type SimpleRequiredNullable
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type Unimplemented
- type UnmarshalingParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewExamplePatchRequest ¶
func NewExamplePatchRequest(server string, body ExamplePatchJSONRequestBody) (*http.Request, error)
NewExamplePatchRequest calls the generic ExamplePatch builder with application/json body
Types ¶
type ChiServerOptions ¶
type ChiServerOptions struct { BaseURL string BaseRouter chi.Router Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
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) ExamplePatch ¶
func (c *Client) ExamplePatch(ctx context.Context, body ExamplePatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // ExamplePatchWithBody request with any body ExamplePatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) ExamplePatch(ctx context.Context, body ExamplePatchJSONRequestBody, 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) ExamplePatchWithBodyWithResponse ¶
func (c *ClientWithResponses) ExamplePatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExamplePatchResponse, error)
ExamplePatchWithBodyWithResponse request with arbitrary body returning *ExamplePatchResponse
func (*ClientWithResponses) ExamplePatchWithResponse ¶
func (c *ClientWithResponses) ExamplePatchWithResponse(ctx context.Context, body ExamplePatchJSONRequestBody, reqEditors ...RequestEditorFn) (*ExamplePatchResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // ExamplePatchWithBodyWithResponse request with any body ExamplePatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ExamplePatchResponse, error) ExamplePatchWithResponse(ctx context.Context, body ExamplePatchJSONRequestBody, reqEditors ...RequestEditorFn) (*ExamplePatchResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ComplexOptionalNullable ¶
type ComplexOptionalNullable struct { // AliasName Optional and nullable AliasName nullable.Nullable[string] `json:"alias_name,omitempty"` // Name Optional and non nullable Name *string `json:"name,omitempty"` }
ComplexOptionalNullable Complex, optional and nullable
type ComplexRequiredNullable ¶
type ComplexRequiredNullable struct { // Name Optional and non nullable Name *string `json:"name,omitempty"` }
ComplexRequiredNullable Complex required and nullable
type ExamplePatchJSONRequestBody ¶
type ExamplePatchJSONRequestBody = PatchRequest
ExamplePatchJSONRequestBody defines body for ExamplePatch for application/json ContentType.
type ExamplePatchResponse ¶
func ParseExamplePatchResponse ¶
func ParseExamplePatchResponse(rsp *http.Response) (*ExamplePatchResponse, error)
ParseExamplePatchResponse parses an HTTP response from a ExamplePatchWithResponse call
func (ExamplePatchResponse) Status ¶
func (r ExamplePatchResponse) Status() string
Status returns HTTPResponse.Status
func (ExamplePatchResponse) StatusCode ¶
func (r ExamplePatchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type PatchRequest ¶
type PatchRequest struct { // ComplexOptionalNullable Complex, optional and nullable ComplexOptionalNullable nullable.Nullable[ComplexOptionalNullable] `json:"complex_optional_nullable,omitempty"` // ComplexRequiredNullable Complex required and nullable ComplexRequiredNullable nullable.Nullable[ComplexRequiredNullable] `json:"complex_required_nullable"` // SimpleOptionalNonNullable Simple optional and non nullable SimpleOptionalNonNullable *SimpleOptionalNonNullable `json:"simple_optional_non_nullable,omitempty"` // SimpleOptionalNullable Simple optional and nullable SimpleOptionalNullable nullable.Nullable[SimpleOptionalNullable] `json:"simple_optional_nullable,omitempty"` // SimpleRequiredNullable Simple required and nullable SimpleRequiredNullable nullable.Nullable[SimpleRequiredNullable] `json:"simple_required_nullable"` }
PatchRequest A request to patch an existing user object.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServerInterface ¶
type ServerInterface interface { // (PATCH /example) ExamplePatch(w http.ResponseWriter, r *http.Request) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) ExamplePatch ¶
func (siw *ServerInterfaceWrapper) ExamplePatch(w http.ResponseWriter, r *http.Request)
ExamplePatch operation middleware
type SimpleOptionalNonNullable ¶
type SimpleOptionalNonNullable = string
SimpleOptionalNonNullable Simple optional and non nullable
type SimpleOptionalNullable ¶
type SimpleOptionalNullable = int
SimpleOptionalNullable Simple optional and nullable
type SimpleRequiredNullable ¶
type SimpleRequiredNullable = int
SimpleRequiredNullable Simple required and nullable
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) ExamplePatch ¶
func (_ Unimplemented) ExamplePatch(w http.ResponseWriter, r *http.Request)
(PATCH /example)
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
Directories ¶
Path | Synopsis |
---|---|
Package defaultbehaviour provides primitives to interact with the openapi HTTP API.
|
Package defaultbehaviour provides primitives to interact with the openapi HTTP API. |