Documentation ¶
Overview ¶
Package instances provides primitives to interact with the openapi HTTP API.
Code generated by github.com/do87/oapi-codegen version v0.5.1 DO NOT EDIT.
Index ¶
- func NewDeprovisionRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- func NewGetRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- func NewListRequest(ctx context.Context, server string, projectID string) (*http.Request, error)
- func NewProvisionRequest(ctx context.Context, server string, projectID string, ...) (*http.Request, error)
- func NewProvisionRequestWithBody(ctx context.Context, server string, projectID string, contentType string, ...) (*http.Request, error)
- func NewUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- type BadRequest
- type Client
- func (c *Client) Deprovision(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) Get(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) List(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Provision(ctx context.Context, projectID string, body ProvisionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) ProvisionWithBody(ctx context.Context, projectID string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Update(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientWithResponses
- func (c *ClientWithResponses) DeprovisionWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*DeprovisionResponse, error)
- func (c *ClientWithResponses) GetWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*GetResponse, error)
- func (c *ClientWithResponses) ListWithResponse(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListResponse, error)
- func (c *ClientWithResponses) ParseDeprovisionResponse(rsp *http.Response) (*DeprovisionResponse, error)
- func (c *ClientWithResponses) ParseGetResponse(rsp *http.Response) (*GetResponse, error)
- func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)
- func (c *ClientWithResponses) ParseProvisionResponse(rsp *http.Response) (*ProvisionResponse, error)
- func (c *ClientWithResponses) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)
- func (c *ClientWithResponses) ProvisionWithBodyWithResponse(ctx context.Context, projectID string, contentType string, body io.Reader, ...) (*ProvisionResponse, error)
- func (c *ClientWithResponses) ProvisionWithResponse(ctx context.Context, projectID string, body ProvisionJSONRequestBody, ...) (*ProvisionResponse, error)
- func (c *ClientWithResponses) UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*UpdateResponse, error)
- func (c *ClientWithResponses) UpdateWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*UpdateResponse, error)
- type ClientWithResponsesInterface
- type DeprovisionResponse
- type Error
- type GetResponse
- type Instance
- type InstanceID
- type InstanceList
- type InstanceProvisionRequest
- type InstanceUpdateRequest
- type LastOperation
- type LastOperationState
- type LastOperationType
- type ListResponse
- type NotFound
- type Object
- type ProvisionJSONRequestBody
- type ProvisionResponse
- type RequestEditorFn
- type UpdateJSONRequestBody
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDeprovisionRequest ¶
func NewDeprovisionRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
NewDeprovisionRequest generates requests for Deprovision
func NewGetRequest ¶
func NewGetRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
NewGetRequest generates requests for Get
func NewListRequest ¶
NewListRequest generates requests for List
func NewProvisionRequest ¶
func NewProvisionRequest(ctx context.Context, server string, projectID string, body ProvisionJSONRequestBody) (*http.Request, error)
NewProvisionRequest calls the generic Provision builder with application/json body
func NewProvisionRequestWithBody ¶
func NewProvisionRequestWithBody(ctx context.Context, server string, projectID string, contentType string, body io.Reader) (*http.Request, error)
NewProvisionRequestWithBody generates requests for Provision with any type of 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 common.Client }
Client which conforms to the OpenAPI3 specification for this service.
func (*Client) Deprovision ¶
func (*Client) Provision ¶
func (c *Client) Provision(ctx context.Context, projectID string, body ProvisionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ProvisionWithBody ¶
type ClientInterface ¶
type ClientInterface interface { // List request List(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*http.Response, error) // Provision request with any body ProvisionWithBody(ctx context.Context, projectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Provision(ctx context.Context, projectID string, body ProvisionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // Deprovision request Deprovision(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error) // Get request Get(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error) // Update request with any body UpdateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Update(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, httpClient common.Client) *ClientWithResponses
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) DeprovisionWithResponse ¶
func (c *ClientWithResponses) DeprovisionWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*DeprovisionResponse, error)
DeprovisionWithResponse request returning *DeprovisionResponse
func (*ClientWithResponses) GetWithResponse ¶
func (c *ClientWithResponses) GetWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*GetResponse, error)
GetWithResponse request returning *GetResponse
func (*ClientWithResponses) ListWithResponse ¶
func (c *ClientWithResponses) ListWithResponse(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListResponse, error)
ListWithResponse request returning *ListResponse
func (*ClientWithResponses) ParseDeprovisionResponse ¶
func (c *ClientWithResponses) ParseDeprovisionResponse(rsp *http.Response) (*DeprovisionResponse, error)
ParseDeprovisionResponse parses an HTTP response from a DeprovisionWithResponse call
func (*ClientWithResponses) ParseGetResponse ¶
func (c *ClientWithResponses) ParseGetResponse(rsp *http.Response) (*GetResponse, error)
ParseGetResponse parses an HTTP response from a GetWithResponse call
func (*ClientWithResponses) ParseListResponse ¶
func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)
ParseListResponse parses an HTTP response from a ListWithResponse call
func (*ClientWithResponses) ParseProvisionResponse ¶
func (c *ClientWithResponses) ParseProvisionResponse(rsp *http.Response) (*ProvisionResponse, error)
ParseProvisionResponse parses an HTTP response from a ProvisionWithResponse call
func (*ClientWithResponses) ParseUpdateResponse ¶
func (c *ClientWithResponses) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)
ParseUpdateResponse parses an HTTP response from a UpdateWithResponse call
func (*ClientWithResponses) ProvisionWithBodyWithResponse ¶
func (c *ClientWithResponses) ProvisionWithBodyWithResponse(ctx context.Context, projectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProvisionResponse, error)
ProvisionWithBodyWithResponse request with arbitrary body returning *ProvisionResponse
func (*ClientWithResponses) ProvisionWithResponse ¶
func (c *ClientWithResponses) ProvisionWithResponse(ctx context.Context, projectID string, body ProvisionJSONRequestBody, reqEditors ...RequestEditorFn) (*ProvisionResponse, error)
func (*ClientWithResponses) UpdateWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error)
UpdateWithBodyWithResponse request with arbitrary body returning *UpdateResponse
func (*ClientWithResponses) UpdateWithResponse ¶
func (c *ClientWithResponses) UpdateWithResponse(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // List request ListWithResponse(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListResponse, error) // Provision request with any body ProvisionWithBodyWithResponse(ctx context.Context, projectID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProvisionResponse, error) ProvisionWithResponse(ctx context.Context, projectID string, body ProvisionJSONRequestBody, reqEditors ...RequestEditorFn) (*ProvisionResponse, error) // Deprovision request DeprovisionWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*DeprovisionResponse, error) // Get request GetWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*GetResponse, error) // Update request with any body UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error) UpdateWithResponse(ctx context.Context, projectID string, instanceID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeprovisionResponse ¶
type DeprovisionResponse struct { Body []byte HTTPResponse *http.Response JSON400 *Error JSON404 *Error HasError error // Aggregated error }
func (DeprovisionResponse) Status ¶
func (r DeprovisionResponse) Status() string
Status returns HTTPResponse.Status
func (DeprovisionResponse) StatusCode ¶
func (r DeprovisionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (DeprovisionResponse) WaitHandler ¶
func (r DeprovisionResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, instanceID string) *wait.Handler
type GetResponse ¶
type GetResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Instance JSON404 *Error JSON410 *Error HasError error // Aggregated error }
func (GetResponse) StatusCode ¶
func (r GetResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Instance ¶
type Instance struct { CFGUID string `json:"cfGuid"` CFSpaceGUID string `json:"cfSpaceGuid"` DashboardUrl string `json:"dashboardUrl"` ImageUrl string `json:"imageUrl"` InstanceID *string `json:"instanceId,omitempty"` LastOperation LastOperation `json:"lastOperation"` Name string `json:"name"` OrganizationGUID *string `json:"organizationGuid,omitempty"` Parameters Object `json:"parameters"` PlanID string `json:"planId"` }
Instance defines model for Instance.
type InstanceID ¶
type InstanceID struct {
InstanceID string `json:"instanceId"`
}
InstanceID defines model for InstanceID.
type InstanceList ¶
type InstanceList struct {
Instances []Instance `json:"instances"`
}
InstanceList defines model for InstanceList.
type InstanceProvisionRequest ¶
type InstanceProvisionRequest struct { InstanceName string `json:"instanceName"` Parameters *Object `json:"parameters,omitempty"` PlanID string `json:"planId"` }
InstanceProvisionRequest defines model for InstanceProvisionRequest.
type InstanceUpdateRequest ¶
type InstanceUpdateRequest struct { Parameters *Object `json:"parameters,omitempty"` PlanID string `json:"planId"` }
InstanceUpdateRequest defines model for InstanceUpdateRequest.
type LastOperation ¶
type LastOperation struct { Description string `json:"description"` State LastOperationState `json:"state"` Type LastOperationType `json:"type"` }
LastOperation defines model for lastOperation.
type LastOperationState ¶
type LastOperationState string
LastOperationState defines model for LastOperation.State.
const ( FAILED LastOperationState = "failed" IN_PROGRESS LastOperationState = "in progress" SUCCEEDED LastOperationState = "succeeded" )
Defines values for LastOperationState.
type LastOperationType ¶
type LastOperationType string
LastOperationType defines model for LastOperation.Type.
const ( CREATE LastOperationType = "create" DELETE LastOperationType = "delete" UPDATE LastOperationType = "update" )
Defines values for LastOperationType.
type ListResponse ¶
type ListResponse struct { Body []byte HTTPResponse *http.Response JSON200 *InstanceList JSON404 *Error HasError error // Aggregated error }
func (ListResponse) Status ¶
func (r ListResponse) Status() string
Status returns HTTPResponse.Status
func (ListResponse) StatusCode ¶
func (r ListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ProvisionJSONRequestBody ¶
type ProvisionJSONRequestBody = InstanceProvisionRequest
ProvisionJSONRequestBody defines body for Provision for application/json ContentType.
type ProvisionResponse ¶
type ProvisionResponse struct { Body []byte HTTPResponse *http.Response JSON202 *InstanceID JSON400 *Error JSON409 *Error HasError error // Aggregated error }
func (ProvisionResponse) Status ¶
func (r ProvisionResponse) Status() string
Status returns HTTPResponse.Status
func (ProvisionResponse) StatusCode ¶
func (r ProvisionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (ProvisionResponse) WaitHandler ¶
func (r ProvisionResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, instanceID string) *wait.Handler
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type UpdateJSONRequestBody ¶
type UpdateJSONRequestBody = InstanceUpdateRequest
UpdateJSONRequestBody defines body for Update for application/json ContentType.
type UpdateResponse ¶
type UpdateResponse struct { Body []byte HTTPResponse *http.Response JSON400 *Error JSON404 *Error HasError error // Aggregated error }
func (UpdateResponse) Status ¶
func (r UpdateResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateResponse) StatusCode ¶
func (r UpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
func (UpdateResponse) WaitHandler ¶
func (r UpdateResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, instanceID string) *wait.Handler