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 NewUpdateAgentStatusRequest(server string, id openapi_types.UUID, body UpdateAgentStatusJSONRequestBody) (*http.Request, error)
- func NewUpdateAgentStatusRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateSourceInventoryRequest(server string, id openapi_types.UUID, ...) (*http.Request, error)
- func NewUpdateSourceInventoryRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) UpdateAgentStatus(ctx context.Context, id openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) UpdateAgentStatusWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateSourceInventory(ctx context.Context, id openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) UpdateSourceInventoryWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) UpdateAgentStatusWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, ...) (*UpdateAgentStatusResponse, error)
- func (c *ClientWithResponses) UpdateAgentStatusWithResponse(ctx context.Context, id openapi_types.UUID, ...) (*UpdateAgentStatusResponse, error)
- func (c *ClientWithResponses) UpdateSourceInventoryWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, ...) (*UpdateSourceInventoryResponse, error)
- func (c *ClientWithResponses) UpdateSourceInventoryWithResponse(ctx context.Context, id openapi_types.UUID, ...) (*UpdateSourceInventoryResponse, error)
- type ClientWithResponsesInterface
- type HttpRequestDoer
- type RequestEditorFn
- type UpdateAgentStatusResponse
- type UpdateSourceInventoryResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUpdateAgentStatusRequest ¶
func NewUpdateAgentStatusRequest(server string, id openapi_types.UUID, body UpdateAgentStatusJSONRequestBody) (*http.Request, error)
NewUpdateAgentStatusRequest calls the generic UpdateAgentStatus builder with application/json body
func NewUpdateAgentStatusRequestWithBody ¶
func NewUpdateAgentStatusRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)
NewUpdateAgentStatusRequestWithBody generates requests for UpdateAgentStatus with any type of body
func NewUpdateSourceInventoryRequest ¶
func NewUpdateSourceInventoryRequest(server string, id openapi_types.UUID, body UpdateSourceInventoryJSONRequestBody) (*http.Request, error)
NewUpdateSourceInventoryRequest calls the generic UpdateSourceInventory 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) UpdateAgentStatus ¶
func (c *Client) UpdateAgentStatus(ctx context.Context, id openapi_types.UUID, body UpdateAgentStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateAgentStatusWithBody ¶
func (*Client) UpdateSourceInventory ¶
func (c *Client) UpdateSourceInventory(ctx context.Context, id openapi_types.UUID, body UpdateSourceInventoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateSourceInventoryWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// UpdateAgentStatusWithBody request with any body
UpdateAgentStatusWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateAgentStatus(ctx context.Context, id openapi_types.UUID, body UpdateAgentStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateSourceInventoryWithBody request with any body
UpdateSourceInventoryWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateSourceInventory(ctx context.Context, id openapi_types.UUID, body UpdateSourceInventoryJSONRequestBody, 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) UpdateAgentStatusWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateAgentStatusWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAgentStatusResponse, error)
UpdateAgentStatusWithBodyWithResponse request with arbitrary body returning *UpdateAgentStatusResponse
func (*ClientWithResponses) UpdateAgentStatusWithResponse ¶
func (c *ClientWithResponses) UpdateAgentStatusWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateAgentStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAgentStatusResponse, error)
func (*ClientWithResponses) UpdateSourceInventoryWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateSourceInventoryWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSourceInventoryResponse, error)
UpdateSourceInventoryWithBodyWithResponse request with arbitrary body returning *UpdateSourceInventoryResponse
func (*ClientWithResponses) UpdateSourceInventoryWithResponse ¶
func (c *ClientWithResponses) UpdateSourceInventoryWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateSourceInventoryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSourceInventoryResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// UpdateAgentStatusWithBodyWithResponse request with any body
UpdateAgentStatusWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAgentStatusResponse, error)
UpdateAgentStatusWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateAgentStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAgentStatusResponse, error)
// UpdateSourceInventoryWithBodyWithResponse request with any body
UpdateSourceInventoryWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSourceInventoryResponse, error)
UpdateSourceInventoryWithResponse(ctx context.Context, id openapi_types.UUID, body UpdateSourceInventoryJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSourceInventoryResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
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 UpdateAgentStatusResponse ¶
type UpdateAgentStatusResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *externalRef0.Error
JSON401 *externalRef0.Error
JSON403 *externalRef0.Error
JSON404 *externalRef0.Error
JSON500 *externalRef0.Error
}
func ParseUpdateAgentStatusResponse ¶
func ParseUpdateAgentStatusResponse(rsp *http.Response) (*UpdateAgentStatusResponse, error)
ParseUpdateAgentStatusResponse parses an HTTP response from a UpdateAgentStatusWithResponse call
func (UpdateAgentStatusResponse) Status ¶
func (r UpdateAgentStatusResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateAgentStatusResponse) StatusCode ¶
func (r UpdateAgentStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateSourceInventoryResponse ¶
type UpdateSourceInventoryResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *externalRef0.Source
JSON400 *externalRef0.Error
JSON401 *externalRef0.Error
JSON403 *externalRef0.Error
JSON404 *externalRef0.Error
JSON500 *externalRef0.Error
}
func ParseUpdateSourceInventoryResponse ¶
func ParseUpdateSourceInventoryResponse(rsp *http.Response) (*UpdateSourceInventoryResponse, error)
ParseUpdateSourceInventoryResponse parses an HTTP response from a UpdateSourceInventoryWithResponse call
func (UpdateSourceInventoryResponse) Status ¶
func (r UpdateSourceInventoryResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateSourceInventoryResponse) StatusCode ¶
func (r UpdateSourceInventoryResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode