Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Index ¶
- func NewDeleteSessionRequest(server string, sessionId string) (*http.Request, error)
- func NewGetSessionRequest(server string, sessionId string) (*http.Request, error)
- func NewSetSessionRequest(server string, body SetSessionJSONRequestBody) (*http.Request, error)
- func NewSetSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) DeleteSession(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSession(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) SetSession(ctx context.Context, body SetSessionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SetSessionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteSessionWithResponse(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*DeleteSessionResponse, error)
- func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error)
- func (c *ClientWithResponses) SetSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SetSessionResponse, error)
- func (c *ClientWithResponses) SetSessionWithResponse(ctx context.Context, body SetSessionJSONRequestBody, ...) (*SetSessionResponse, error)
- type ClientWithResponsesInterface
- type DeleteSessionResponse
- type Error
- type GetSession
- type GetSessionResponse
- type HttpRequestDoer
- type PostSession
- type RequestEditorFn
- type SetSessionJSONBody
- type SetSessionJSONRequestBody
- type SetSessionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeleteSessionRequest ¶
NewDeleteSessionRequest generates requests for DeleteSession
func NewGetSessionRequest ¶
NewGetSessionRequest generates requests for GetSession
func NewSetSessionRequest ¶
func NewSetSessionRequest(server string, body SetSessionJSONRequestBody) (*http.Request, error)
NewSetSessionRequest calls the generic SetSession 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) DeleteSession ¶
func (*Client) GetSession ¶
func (*Client) SetSession ¶
func (c *Client) SetSession(ctx context.Context, body SetSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // SetSession request with any body SetSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) SetSession(ctx context.Context, body SetSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteSession request DeleteSession(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSession request GetSession(ctx context.Context, sessionId string, 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) DeleteSessionWithResponse ¶
func (c *ClientWithResponses) DeleteSessionWithResponse(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*DeleteSessionResponse, error)
DeleteSessionWithResponse request returning *DeleteSessionResponse
func (*ClientWithResponses) GetSessionWithResponse ¶
func (c *ClientWithResponses) GetSessionWithResponse(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error)
GetSessionWithResponse request returning *GetSessionResponse
func (*ClientWithResponses) SetSessionWithBodyWithResponse ¶
func (c *ClientWithResponses) SetSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSessionResponse, error)
SetSessionWithBodyWithResponse request with arbitrary body returning *SetSessionResponse
func (*ClientWithResponses) SetSessionWithResponse ¶
func (c *ClientWithResponses) SetSessionWithResponse(ctx context.Context, body SetSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSessionResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // SetSession request with any body SetSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetSessionResponse, error) SetSessionWithResponse(ctx context.Context, body SetSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetSessionResponse, error) // DeleteSession request DeleteSessionWithResponse(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*DeleteSessionResponse, error) // GetSession request GetSessionWithResponse(ctx context.Context, sessionId string, reqEditors ...RequestEditorFn) (*GetSessionResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeleteSessionResponse ¶
func ParseDeleteSessionResponse ¶
func ParseDeleteSessionResponse(rsp *http.Response) (*DeleteSessionResponse, error)
ParseDeleteSessionResponse parses an HTTP response from a DeleteSessionWithResponse call
func (DeleteSessionResponse) Status ¶
func (r DeleteSessionResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteSessionResponse) StatusCode ¶
func (r DeleteSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSession ¶
type GetSession struct {
Values *map[string]interface{} `json:"values,omitempty"`
}
GetSession defines model for GetSession.
type GetSessionResponse ¶
type GetSessionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *GetSession JSONDefault *Error }
func ParseGetSessionResponse ¶
func ParseGetSessionResponse(rsp *http.Response) (*GetSessionResponse, error)
ParseGetSessionResponse parses an HTTP response from a GetSessionWithResponse call
func (GetSessionResponse) Status ¶
func (r GetSessionResponse) Status() string
Status returns HTTPResponse.Status
func (GetSessionResponse) StatusCode ¶
func (r GetSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PostSession ¶
type PostSession struct { SessionKey string `json:"sessionKey"` SessionValue map[string]interface{} `json:"sessionValue"` }
PostSession defines model for PostSession.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SetSessionJSONBody ¶
type SetSessionJSONBody = PostSession
SetSessionJSONBody defines parameters for SetSession.
type SetSessionJSONRequestBody ¶
type SetSessionJSONRequestBody = SetSessionJSONBody
SetSessionJSONRequestBody defines body for SetSession for application/json ContentType.
type SetSessionResponse ¶
func ParseSetSessionResponse ¶
func ParseSetSessionResponse(rsp *http.Response) (*SetSessionResponse, error)
ParseSetSessionResponse parses an HTTP response from a SetSessionWithResponse call
func (SetSessionResponse) Status ¶
func (r SetSessionResponse) Status() string
Status returns HTTPResponse.Status
func (SetSessionResponse) StatusCode ¶
func (r SetSessionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode