Documentation ¶
Overview ¶
Package param provides primitives to interact with the openapi HTTP API.
Code generated by github.com/do87/oapi-codegen version (devel) DO NOT EDIT.
Index ¶
- func NewGetTestRequest(server string, params *GetTestParams) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type GetTestParams
- type GetTestResponse
- type HttpRequestDoer
- type RequestEditorFn
- type Test
- func (t Test) AsTest0() (Test0, error)
- func (t Test) AsTest1() (Test1, error)
- func (t *Test) FromTest0(v Test0) error
- func (t *Test) FromTest1(v Test1) error
- func (t Test) MarshalJSON() ([]byte, error)
- func (t *Test) MergeTest0(v Test0) error
- func (t *Test) MergeTest1(v Test1) error
- func (t *Test) UnmarshalJSON(b []byte) error
- type Test0
- type Test1
- type Test2
- func (t Test2) AsTest20() (Test20, error)
- func (t Test2) AsTest21() (Test21, error)
- func (t *Test2) FromTest20(v Test20) error
- func (t *Test2) FromTest21(v Test21) error
- func (t Test2) MarshalJSON() ([]byte, error)
- func (t *Test2) MergeTest20(v Test20) error
- func (t *Test2) MergeTest21(v Test21) error
- func (t *Test2) UnmarshalJSON(b []byte) error
- type Test20
- type Test21
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetTestRequest ¶
func NewGetTestRequest(server string, params *GetTestParams) (*http.Request, error)
NewGetTestRequest generates requests for GetTest
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) GetTest ¶
func (c *Client) GetTest(ctx context.Context, params *GetTestParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // GetTest request GetTest(ctx context.Context, params *GetTestParams, 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) GetTestWithResponse ¶
func (c *ClientWithResponses) GetTestWithResponse(ctx context.Context, params *GetTestParams, reqEditors ...RequestEditorFn) (*GetTestResponse, error)
GetTestWithResponse request returning *GetTestResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetTest request GetTestWithResponse(ctx context.Context, params *GetTestParams, reqEditors ...RequestEditorFn) (*GetTestResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetTestParams ¶
type GetTestParams struct { Test *Test `form:"test,omitempty" json:"test,omitempty"` Test2 *[]Test2 `form:"test2,omitempty" json:"test2,omitempty"` }
GetTestParams defines parameters for GetTest.
type GetTestResponse ¶
func ParseGetTestResponse ¶
func ParseGetTestResponse(rsp *http.Response) (*GetTestResponse, error)
ParseGetTestResponse parses an HTTP response from a GetTestWithResponse call
func (GetTestResponse) Status ¶
func (r GetTestResponse) Status() string
Status returns HTTPResponse.Status
func (GetTestResponse) StatusCode ¶
func (r GetTestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Test ¶
type Test struct {
// contains filtered or unexported fields
}
Test defines model for test.
func (Test) MarshalJSON ¶
func (*Test) MergeTest0 ¶
MergeTest0 performs a merge with any union data inside the Test, using the provided Test0
func (*Test) MergeTest1 ¶
MergeTest1 performs a merge with any union data inside the Test, using the provided Test1
func (*Test) UnmarshalJSON ¶
type Test2 ¶
type Test2 struct {
// contains filtered or unexported fields
}
Test2 defines model for test2.
func (*Test2) FromTest20 ¶
FromTest20 overwrites any union data inside the Test2 as the provided Test20
func (*Test2) FromTest21 ¶
FromTest21 overwrites any union data inside the Test2 as the provided Test21
func (Test2) MarshalJSON ¶
func (*Test2) MergeTest20 ¶
MergeTest20 performs a merge with any union data inside the Test2, using the provided Test20
func (*Test2) MergeTest21 ¶
MergeTest21 performs a merge with any union data inside the Test2, using the provided Test21