Documentation ¶
Overview ¶
Package backups provides primitives to interact with the openapi HTTP API.
Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT.
Index ¶
- Constants
- func NewGetInstanceBackupRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewGetInstanceBackupsRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- func NewPutInstanceBackupsRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewPutInstanceBackupsRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- type Client
- func (c *Client) GetInstanceBackup(ctx context.Context, projectID string, instanceID string, backupID string, ...) (*http.Response, error)
- func (c *Client) GetInstanceBackups(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) PutInstanceBackups(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) PutInstanceBackupsWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientWithResponses
- func (c *ClientWithResponses) GetInstanceBackupWithResponse(ctx context.Context, projectID string, instanceID string, backupID string, ...) (*GetInstanceBackupResponse, error)
- func (c *ClientWithResponses) GetInstanceBackupsWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*GetInstanceBackupsResponse, error)
- func (c *ClientWithResponses) ParseGetInstanceBackupResponse(rsp *http.Response) (*GetInstanceBackupResponse, error)
- func (c *ClientWithResponses) ParseGetInstanceBackupsResponse(rsp *http.Response) (*GetInstanceBackupsResponse, error)
- func (c *ClientWithResponses) ParsePutInstanceBackupsResponse(rsp *http.Response) (*PutInstanceBackupsResponse, error)
- func (c *ClientWithResponses) PutInstanceBackupsWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*PutInstanceBackupsResponse, error)
- func (c *ClientWithResponses) PutInstanceBackupsWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*PutInstanceBackupsResponse, error)
- type ClientWithResponsesInterface
- type GetInstanceBackupResponse
- type GetInstanceBackupsResponse
- type InstanceBackup
- type InstanceError
- type InstanceGetBackupResponse
- type InstanceListBackupResponse
- type InstanceUpdateBackupScheduleRequest
- type PutInstanceBackupsJSONRequestBody
- type PutInstanceBackupsResponse
- type RequestEditorFn
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewGetInstanceBackupRequest ¶
func NewGetInstanceBackupRequest(ctx context.Context, server string, projectID string, instanceID string, backupID string) (*http.Request, error)
NewGetInstanceBackupRequest generates requests for GetInstanceBackup
func NewGetInstanceBackupsRequest ¶
func NewGetInstanceBackupsRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
NewGetInstanceBackupsRequest generates requests for GetInstanceBackups
func NewPutInstanceBackupsRequest ¶
func NewPutInstanceBackupsRequest(ctx context.Context, server string, projectID string, instanceID string, body PutInstanceBackupsJSONRequestBody) (*http.Request, error)
NewPutInstanceBackupsRequest calls the generic PutInstanceBackups builder with application/json body
func NewPutInstanceBackupsRequestWithBody ¶
func NewPutInstanceBackupsRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)
NewPutInstanceBackupsRequestWithBody generates requests for PutInstanceBackups 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) GetInstanceBackup ¶
func (*Client) GetInstanceBackups ¶
func (*Client) PutInstanceBackups ¶
func (c *Client) PutInstanceBackups(ctx context.Context, projectID string, instanceID string, body PutInstanceBackupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // GetInstanceBackups request GetInstanceBackups(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error) // PutInstanceBackups request with any body PutInstanceBackupsWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PutInstanceBackups(ctx context.Context, projectID string, instanceID string, body PutInstanceBackupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetInstanceBackup request GetInstanceBackup(ctx context.Context, projectID string, instanceID string, backupID string, 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) GetInstanceBackupWithResponse ¶
func (c *ClientWithResponses) GetInstanceBackupWithResponse(ctx context.Context, projectID string, instanceID string, backupID string, reqEditors ...RequestEditorFn) (*GetInstanceBackupResponse, error)
GetInstanceBackupWithResponse request returning *GetInstanceBackupResponse
func (*ClientWithResponses) GetInstanceBackupsWithResponse ¶
func (c *ClientWithResponses) GetInstanceBackupsWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*GetInstanceBackupsResponse, error)
GetInstanceBackupsWithResponse request returning *GetInstanceBackupsResponse
func (*ClientWithResponses) ParseGetInstanceBackupResponse ¶
func (c *ClientWithResponses) ParseGetInstanceBackupResponse(rsp *http.Response) (*GetInstanceBackupResponse, error)
ParseGetInstanceBackupResponse parses an HTTP response from a GetInstanceBackupWithResponse call
func (*ClientWithResponses) ParseGetInstanceBackupsResponse ¶
func (c *ClientWithResponses) ParseGetInstanceBackupsResponse(rsp *http.Response) (*GetInstanceBackupsResponse, error)
ParseGetInstanceBackupsResponse parses an HTTP response from a GetInstanceBackupsWithResponse call
func (*ClientWithResponses) ParsePutInstanceBackupsResponse ¶
func (c *ClientWithResponses) ParsePutInstanceBackupsResponse(rsp *http.Response) (*PutInstanceBackupsResponse, error)
ParsePutInstanceBackupsResponse parses an HTTP response from a PutInstanceBackupsWithResponse call
func (*ClientWithResponses) PutInstanceBackupsWithBodyWithResponse ¶
func (c *ClientWithResponses) PutInstanceBackupsWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutInstanceBackupsResponse, error)
PutInstanceBackupsWithBodyWithResponse request with arbitrary body returning *PutInstanceBackupsResponse
func (*ClientWithResponses) PutInstanceBackupsWithResponse ¶
func (c *ClientWithResponses) PutInstanceBackupsWithResponse(ctx context.Context, projectID string, instanceID string, body PutInstanceBackupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutInstanceBackupsResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetInstanceBackups request GetInstanceBackupsWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*GetInstanceBackupsResponse, error) // PutInstanceBackups request with any body PutInstanceBackupsWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutInstanceBackupsResponse, error) PutInstanceBackupsWithResponse(ctx context.Context, projectID string, instanceID string, body PutInstanceBackupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutInstanceBackupsResponse, error) // GetInstanceBackup request GetInstanceBackupWithResponse(ctx context.Context, projectID string, instanceID string, backupID string, reqEditors ...RequestEditorFn) (*GetInstanceBackupResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetInstanceBackupResponse ¶
type GetInstanceBackupResponse struct { Body []byte HTTPResponse *http.Response JSON200 *InstanceGetBackupResponse JSON400 *InstanceError HasError error // Aggregated error }
func (GetInstanceBackupResponse) Status ¶
func (r GetInstanceBackupResponse) Status() string
Status returns HTTPResponse.Status
func (GetInstanceBackupResponse) StatusCode ¶
func (r GetInstanceBackupResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetInstanceBackupsResponse ¶
type GetInstanceBackupsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *InstanceListBackupResponse JSON400 *InstanceError HasError error // Aggregated error }
func (GetInstanceBackupsResponse) Status ¶
func (r GetInstanceBackupsResponse) Status() string
Status returns HTTPResponse.Status
func (GetInstanceBackupsResponse) StatusCode ¶
func (r GetInstanceBackupsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type InstanceBackup ¶
type InstanceBackup struct { EndTime *string `json:"endTime,omitempty"` Error *string `json:"error,omitempty"` ID *string `json:"id,omitempty"` Labels *[]string `json:"labels,omitempty"` Name *string `json:"name,omitempty"` Options *map[string]string `json:"options,omitempty"` StartTime *string `json:"startTime,omitempty"` }
InstanceBackup defines model for instance.Backup.
type InstanceError ¶
type InstanceError struct { Code *int `json:"code,omitempty"` Fields *map[string][]string `json:"fields,omitempty"` Message *string `json:"message,omitempty"` Type *string `json:"type,omitempty"` }
InstanceError defines model for instance.Error.
type InstanceGetBackupResponse ¶
type InstanceGetBackupResponse struct {
Item *InstanceBackup `json:"item,omitempty"`
}
InstanceGetBackupResponse defines model for instance.GetBackupResponse.
type InstanceListBackupResponse ¶
type InstanceListBackupResponse struct { Count *int `json:"count,omitempty"` Items *[]InstanceBackup `json:"items,omitempty"` }
InstanceListBackupResponse defines model for instance.ListBackupResponse.
type InstanceUpdateBackupScheduleRequest ¶
type InstanceUpdateBackupScheduleRequest struct {
BackupSchedule *string `json:"backupSchedule,omitempty"`
}
InstanceUpdateBackupScheduleRequest defines model for instance.UpdateBackupScheduleRequest.
type PutInstanceBackupsJSONRequestBody ¶
type PutInstanceBackupsJSONRequestBody = InstanceUpdateBackupScheduleRequest
PutInstanceBackupsJSONRequestBody defines body for PutInstanceBackups for application/json ContentType.
type PutInstanceBackupsResponse ¶
type PutInstanceBackupsResponse struct { Body []byte HTTPResponse *http.Response JSON400 *InstanceError HasError error // Aggregated error }
func (PutInstanceBackupsResponse) Status ¶
func (r PutInstanceBackupsResponse) Status() string
Status returns HTTPResponse.Status
func (PutInstanceBackupsResponse) StatusCode ¶
func (r PutInstanceBackupsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode