Documentation
¶
Overview ¶
Package resource_manager provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- func NewCreateInstanceRequest(server string, params *CreateInstanceParams, ...) (*http.Request, error)
- func NewCreateInstanceRequestWithBody(server string, params *CreateInstanceParams, contentType string, ...) (*http.Request, error)
- func NewDeleteInstanceRequest(server string, instanceId InstanceIdPath, params *DeleteInstanceParams) (*http.Request, error)
- func NewGetInstanceRequest(server string, instanceId InstanceIdPath, params *GetInstanceParams) (*http.Request, error)
- func NewListInstancesRequest(server string, params *ListInstancesParams) (*http.Request, error)
- type Client
- func (c *Client) CreateInstance(ctx context.Context, params *CreateInstanceParams, ...) (*http.Response, error)
- func (c *Client) CreateInstanceWithBody(ctx context.Context, params *CreateInstanceParams, contentType string, ...) (*http.Response, error)
- func (c *Client) DeleteInstance(ctx context.Context, instanceId InstanceIdPath, params *DeleteInstanceParams, ...) (*http.Response, error)
- func (c *Client) GetInstance(ctx context.Context, instanceId InstanceIdPath, params *GetInstanceParams, ...) (*http.Response, error)
- func (c *Client) ListInstances(ctx context.Context, params *ListInstancesParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateInstanceWithBodyWithResponse(ctx context.Context, params *CreateInstanceParams, contentType string, ...) (*CreateInstanceResponse, error)
- func (c *ClientWithResponses) CreateInstanceWithResponse(ctx context.Context, params *CreateInstanceParams, ...) (*CreateInstanceResponse, error)
- func (c *ClientWithResponses) DeleteInstanceWithResponse(ctx context.Context, instanceId InstanceIdPath, params *DeleteInstanceParams, ...) (*DeleteInstanceResponse, error)
- func (c *ClientWithResponses) GetInstanceWithResponse(ctx context.Context, instanceId InstanceIdPath, params *GetInstanceParams, ...) (*GetInstanceResponse, error)
- func (c *ClientWithResponses) ListInstancesWithResponse(ctx context.Context, params *ListInstancesParams, ...) (*ListInstancesResponse, error)
- type ClientWithResponsesInterface
- type CreateInstanceResponse
- type DeleteInstanceResponse
- type GetInstanceResponse
- type HttpRequestDoer
- type ListInstancesResponse
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateInstanceRequest ¶
func NewCreateInstanceRequest(server string, params *CreateInstanceParams, body CreateInstanceJSONRequestBody) (*http.Request, error)
NewCreateInstanceRequest calls the generic CreateInstance builder with application/json body
func NewCreateInstanceRequestWithBody ¶
func NewCreateInstanceRequestWithBody(server string, params *CreateInstanceParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateInstanceRequestWithBody generates requests for CreateInstance with any type of body
func NewDeleteInstanceRequest ¶
func NewDeleteInstanceRequest(server string, instanceId InstanceIdPath, params *DeleteInstanceParams) (*http.Request, error)
NewDeleteInstanceRequest generates requests for DeleteInstance
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) CreateInstance ¶
func (*Client) CreateInstanceWithBody ¶
func (*Client) DeleteInstance ¶
func (*Client) GetInstance ¶
func (*Client) ListInstances ¶
type ClientInterface ¶
type ClientInterface interface {
// ListInstances request
ListInstances(ctx context.Context, params *ListInstancesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateInstanceWithBody request with any body
CreateInstanceWithBody(ctx context.Context, params *CreateInstanceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateInstance(ctx context.Context, params *CreateInstanceParams, body CreateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteInstance request
DeleteInstance(ctx context.Context, instanceId InstanceIdPath, params *DeleteInstanceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetInstance request
GetInstance(ctx context.Context, instanceId InstanceIdPath, params *GetInstanceParams, 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) CreateInstanceWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateInstanceWithBodyWithResponse(ctx context.Context, params *CreateInstanceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)
CreateInstanceWithBodyWithResponse request with arbitrary body returning *CreateInstanceResponse
func (*ClientWithResponses) CreateInstanceWithResponse ¶
func (c *ClientWithResponses) CreateInstanceWithResponse(ctx context.Context, params *CreateInstanceParams, body CreateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)
func (*ClientWithResponses) DeleteInstanceWithResponse ¶
func (c *ClientWithResponses) DeleteInstanceWithResponse(ctx context.Context, instanceId InstanceIdPath, params *DeleteInstanceParams, reqEditors ...RequestEditorFn) (*DeleteInstanceResponse, error)
DeleteInstanceWithResponse request returning *DeleteInstanceResponse
func (*ClientWithResponses) GetInstanceWithResponse ¶
func (c *ClientWithResponses) GetInstanceWithResponse(ctx context.Context, instanceId InstanceIdPath, params *GetInstanceParams, reqEditors ...RequestEditorFn) (*GetInstanceResponse, error)
GetInstanceWithResponse request returning *GetInstanceResponse
func (*ClientWithResponses) ListInstancesWithResponse ¶
func (c *ClientWithResponses) ListInstancesWithResponse(ctx context.Context, params *ListInstancesParams, reqEditors ...RequestEditorFn) (*ListInstancesResponse, error)
ListInstancesWithResponse request returning *ListInstancesResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListInstancesWithResponse request
ListInstancesWithResponse(ctx context.Context, params *ListInstancesParams, reqEditors ...RequestEditorFn) (*ListInstancesResponse, error)
// CreateInstanceWithBodyWithResponse request with any body
CreateInstanceWithBodyWithResponse(ctx context.Context, params *CreateInstanceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)
CreateInstanceWithResponse(ctx context.Context, params *CreateInstanceParams, body CreateInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInstanceResponse, error)
// DeleteInstanceWithResponse request
DeleteInstanceWithResponse(ctx context.Context, instanceId InstanceIdPath, params *DeleteInstanceParams, reqEditors ...RequestEditorFn) (*DeleteInstanceResponse, error)
// GetInstanceWithResponse request
GetInstanceWithResponse(ctx context.Context, instanceId InstanceIdPath, params *GetInstanceParams, reqEditors ...RequestEditorFn) (*GetInstanceResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateInstanceResponse ¶
type CreateInstanceResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *ServiceTypeInstance
ApplicationproblemJSON400 *Error
ApplicationproblemJSON404 *Error
ApplicationproblemJSON409 *Error
ApplicationproblemJSON422 *Error
ApplicationproblemJSONDefault *Error
}
func ParseCreateInstanceResponse ¶
func ParseCreateInstanceResponse(rsp *http.Response) (*CreateInstanceResponse, error)
ParseCreateInstanceResponse parses an HTTP response from a CreateInstanceWithResponse call
func (CreateInstanceResponse) ContentType ¶
func (r CreateInstanceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateInstanceResponse) Status ¶
func (r CreateInstanceResponse) Status() string
Status returns HTTPResponse.Status
func (CreateInstanceResponse) StatusCode ¶
func (r CreateInstanceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteInstanceResponse ¶
type DeleteInstanceResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON400 *Error
ApplicationproblemJSON404 *Error
ApplicationproblemJSONDefault *Error
}
func ParseDeleteInstanceResponse ¶
func ParseDeleteInstanceResponse(rsp *http.Response) (*DeleteInstanceResponse, error)
ParseDeleteInstanceResponse parses an HTTP response from a DeleteInstanceWithResponse call
func (DeleteInstanceResponse) ContentType ¶
func (r DeleteInstanceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteInstanceResponse) Status ¶
func (r DeleteInstanceResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteInstanceResponse) StatusCode ¶
func (r DeleteInstanceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetInstanceResponse ¶
type GetInstanceResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ServiceTypeInstance
ApplicationproblemJSON400 *Error
ApplicationproblemJSON404 *Error
ApplicationproblemJSONDefault *Error
}
func ParseGetInstanceResponse ¶
func ParseGetInstanceResponse(rsp *http.Response) (*GetInstanceResponse, error)
ParseGetInstanceResponse parses an HTTP response from a GetInstanceWithResponse call
func (GetInstanceResponse) ContentType ¶
func (r GetInstanceResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetInstanceResponse) Status ¶
func (r GetInstanceResponse) Status() string
Status returns HTTPResponse.Status
func (GetInstanceResponse) StatusCode ¶
func (r GetInstanceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListInstancesResponse ¶
type ListInstancesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ServiceTypeInstanceList
ApplicationproblemJSON400 *Error
ApplicationproblemJSONDefault *Error
}
func ParseListInstancesResponse ¶
func ParseListInstancesResponse(rsp *http.Response) (*ListInstancesResponse, error)
ParseListInstancesResponse parses an HTTP response from a ListInstancesWithResponse call
func (ListInstancesResponse) ContentType ¶
func (r ListInstancesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListInstancesResponse) Status ¶
func (r ListInstancesResponse) Status() string
Status returns HTTPResponse.Status
func (ListInstancesResponse) StatusCode ¶
func (r ListInstancesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode