Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.
Index ¶
- func NewCreateEnrollmentRequestRequest(server string, body CreateEnrollmentRequestJSONRequestBody) (*http.Request, error)
- func NewCreateEnrollmentRequestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetRenderedDeviceRequest(server string, name string, params *GetRenderedDeviceParams) (*http.Request, error)
- func NewReadEnrollmentRequestRequest(server string, name string) (*http.Request, error)
- func NewReplaceDeviceStatusRequest(server string, name string, body ReplaceDeviceStatusJSONRequestBody) (*http.Request, error)
- func NewReplaceDeviceStatusRequestWithBody(server string, name string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) CreateEnrollmentRequest(ctx context.Context, body CreateEnrollmentRequestJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateEnrollmentRequestWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetRenderedDevice(ctx context.Context, name string, params *GetRenderedDeviceParams, ...) (*http.Response, error)
- func (c *Client) ReadEnrollmentRequest(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ReplaceDeviceStatus(ctx context.Context, name string, body ReplaceDeviceStatusJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ReplaceDeviceStatusWithBody(ctx context.Context, name string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateEnrollmentRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateEnrollmentRequestResponse, error)
- func (c *ClientWithResponses) CreateEnrollmentRequestWithResponse(ctx context.Context, body CreateEnrollmentRequestJSONRequestBody, ...) (*CreateEnrollmentRequestResponse, error)
- func (c *ClientWithResponses) GetRenderedDeviceWithResponse(ctx context.Context, name string, params *GetRenderedDeviceParams, ...) (*GetRenderedDeviceResponse, error)
- func (c *ClientWithResponses) ReadEnrollmentRequestWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ReadEnrollmentRequestResponse, error)
- func (c *ClientWithResponses) ReplaceDeviceStatusWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, ...) (*ReplaceDeviceStatusResponse, error)
- func (c *ClientWithResponses) ReplaceDeviceStatusWithResponse(ctx context.Context, name string, body ReplaceDeviceStatusJSONRequestBody, ...) (*ReplaceDeviceStatusResponse, error)
- type ClientWithResponsesInterface
- type CreateEnrollmentRequestResponse
- type GetRenderedDeviceResponse
- type HttpRequestDoer
- type ReadEnrollmentRequestResponse
- type ReplaceDeviceStatusResponse
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateEnrollmentRequestRequest ¶
func NewCreateEnrollmentRequestRequest(server string, body CreateEnrollmentRequestJSONRequestBody) (*http.Request, error)
NewCreateEnrollmentRequestRequest calls the generic CreateEnrollmentRequest builder with application/json body
func NewCreateEnrollmentRequestRequestWithBody ¶
func NewCreateEnrollmentRequestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateEnrollmentRequestRequestWithBody generates requests for CreateEnrollmentRequest with any type of body
func NewGetRenderedDeviceRequest ¶ added in v0.5.0
func NewGetRenderedDeviceRequest(server string, name string, params *GetRenderedDeviceParams) (*http.Request, error)
NewGetRenderedDeviceRequest generates requests for GetRenderedDevice
func NewReadEnrollmentRequestRequest ¶
NewReadEnrollmentRequestRequest generates requests for ReadEnrollmentRequest
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) CreateEnrollmentRequest ¶
func (*Client) CreateEnrollmentRequestWithBody ¶
func (*Client) GetRenderedDevice ¶ added in v0.5.0
func (*Client) ReadEnrollmentRequest ¶
func (*Client) ReplaceDeviceStatus ¶
type ClientInterface ¶
type ClientInterface interface {
// GetRenderedDevice request
GetRenderedDevice(ctx context.Context, name string, params *GetRenderedDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReplaceDeviceStatusWithBody request with any body
ReplaceDeviceStatusWithBody(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ReplaceDeviceStatus(ctx context.Context, name string, body ReplaceDeviceStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateEnrollmentRequestWithBody request with any body
CreateEnrollmentRequestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateEnrollmentRequest(ctx context.Context, body CreateEnrollmentRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ReadEnrollmentRequest request
ReadEnrollmentRequest(ctx context.Context, name 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) CreateEnrollmentRequestWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateEnrollmentRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEnrollmentRequestResponse, error)
CreateEnrollmentRequestWithBodyWithResponse request with arbitrary body returning *CreateEnrollmentRequestResponse
func (*ClientWithResponses) CreateEnrollmentRequestWithResponse ¶
func (c *ClientWithResponses) CreateEnrollmentRequestWithResponse(ctx context.Context, body CreateEnrollmentRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEnrollmentRequestResponse, error)
func (*ClientWithResponses) GetRenderedDeviceWithResponse ¶ added in v0.5.0
func (c *ClientWithResponses) GetRenderedDeviceWithResponse(ctx context.Context, name string, params *GetRenderedDeviceParams, reqEditors ...RequestEditorFn) (*GetRenderedDeviceResponse, error)
GetRenderedDeviceWithResponse request returning *GetRenderedDeviceResponse
func (*ClientWithResponses) ReadEnrollmentRequestWithResponse ¶
func (c *ClientWithResponses) ReadEnrollmentRequestWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ReadEnrollmentRequestResponse, error)
ReadEnrollmentRequestWithResponse request returning *ReadEnrollmentRequestResponse
func (*ClientWithResponses) ReplaceDeviceStatusWithBodyWithResponse ¶
func (c *ClientWithResponses) ReplaceDeviceStatusWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceDeviceStatusResponse, error)
ReplaceDeviceStatusWithBodyWithResponse request with arbitrary body returning *ReplaceDeviceStatusResponse
func (*ClientWithResponses) ReplaceDeviceStatusWithResponse ¶
func (c *ClientWithResponses) ReplaceDeviceStatusWithResponse(ctx context.Context, name string, body ReplaceDeviceStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceDeviceStatusResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetRenderedDeviceWithResponse request
GetRenderedDeviceWithResponse(ctx context.Context, name string, params *GetRenderedDeviceParams, reqEditors ...RequestEditorFn) (*GetRenderedDeviceResponse, error)
// ReplaceDeviceStatusWithBodyWithResponse request with any body
ReplaceDeviceStatusWithBodyWithResponse(ctx context.Context, name string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ReplaceDeviceStatusResponse, error)
ReplaceDeviceStatusWithResponse(ctx context.Context, name string, body ReplaceDeviceStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*ReplaceDeviceStatusResponse, error)
// CreateEnrollmentRequestWithBodyWithResponse request with any body
CreateEnrollmentRequestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEnrollmentRequestResponse, error)
CreateEnrollmentRequestWithResponse(ctx context.Context, body CreateEnrollmentRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEnrollmentRequestResponse, error)
// ReadEnrollmentRequestWithResponse request
ReadEnrollmentRequestWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ReadEnrollmentRequestResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateEnrollmentRequestResponse ¶
type CreateEnrollmentRequestResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *externalRef0.EnrollmentRequest
JSON400 *externalRef0.Status
JSON401 *externalRef0.Status
JSON403 *externalRef0.Status
JSON409 *externalRef0.Status
JSON503 *externalRef0.Status
}
func ParseCreateEnrollmentRequestResponse ¶
func ParseCreateEnrollmentRequestResponse(rsp *http.Response) (*CreateEnrollmentRequestResponse, error)
ParseCreateEnrollmentRequestResponse parses an HTTP response from a CreateEnrollmentRequestWithResponse call
func (CreateEnrollmentRequestResponse) Status ¶
func (r CreateEnrollmentRequestResponse) Status() string
Status returns HTTPResponse.Status
func (CreateEnrollmentRequestResponse) StatusCode ¶
func (r CreateEnrollmentRequestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRenderedDeviceResponse ¶ added in v0.5.0
type GetRenderedDeviceResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *externalRef0.Device
JSON401 *externalRef0.Status
JSON404 *externalRef0.Status
JSON409 *externalRef0.Status
}
func ParseGetRenderedDeviceResponse ¶ added in v0.5.0
func ParseGetRenderedDeviceResponse(rsp *http.Response) (*GetRenderedDeviceResponse, error)
ParseGetRenderedDeviceResponse parses an HTTP response from a GetRenderedDeviceWithResponse call
func (GetRenderedDeviceResponse) Status ¶ added in v0.5.0
func (r GetRenderedDeviceResponse) Status() string
Status returns HTTPResponse.Status
func (GetRenderedDeviceResponse) StatusCode ¶ added in v0.5.0
func (r GetRenderedDeviceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ReadEnrollmentRequestResponse ¶
type ReadEnrollmentRequestResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *externalRef0.EnrollmentRequest
JSON401 *externalRef0.Status
JSON403 *externalRef0.Status
JSON404 *externalRef0.Status
JSON503 *externalRef0.Status
}
func ParseReadEnrollmentRequestResponse ¶
func ParseReadEnrollmentRequestResponse(rsp *http.Response) (*ReadEnrollmentRequestResponse, error)
ParseReadEnrollmentRequestResponse parses an HTTP response from a ReadEnrollmentRequestWithResponse call
func (ReadEnrollmentRequestResponse) Status ¶
func (r ReadEnrollmentRequestResponse) Status() string
Status returns HTTPResponse.Status
func (ReadEnrollmentRequestResponse) StatusCode ¶
func (r ReadEnrollmentRequestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ReplaceDeviceStatusResponse ¶
type ReplaceDeviceStatusResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *externalRef0.Device
JSON400 *externalRef0.Status
JSON401 *externalRef0.Status
JSON404 *externalRef0.Status
}
func ParseReplaceDeviceStatusResponse ¶
func ParseReplaceDeviceStatusResponse(rsp *http.Response) (*ReplaceDeviceStatusResponse, error)
ParseReplaceDeviceStatusResponse parses an HTTP response from a ReplaceDeviceStatusWithResponse call
func (ReplaceDeviceStatusResponse) Status ¶
func (r ReplaceDeviceStatusResponse) Status() string
Status returns HTTPResponse.Status
func (ReplaceDeviceStatusResponse) StatusCode ¶
func (r ReplaceDeviceStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode