backup

package
v1.19.0-pre-5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package backup provides primitives to interact with the openapi HTTP API.

Code generated by dev.azure.com/schwarzit/schwarzit.odj.core/_git/stackit-client-generator.git version v1.0.23 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewCreateRequest

func NewCreateRequest(ctx context.Context, server string, projectID string, instanceID string, params *CreateParams) (*http.Request, error)

NewCreateRequest generates requests for Create

func NewListRequest

func NewListRequest(ctx context.Context, server string, projectID string, instanceID string, params *ListParams) (*http.Request, error)

NewListRequest generates requests for List

func NewRestoresCreateRequest

func NewRestoresCreateRequest(ctx context.Context, server string, projectID string, instanceID string, backupDate string, params *RestoresCreateParams) (*http.Request, error)

NewRestoresCreateRequest generates requests for RestoresCreate

func NewRetentionsListRequest

func NewRetentionsListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewRetentionsListRequest generates requests for RetentionsList

func NewSchedulesCreateRequest

func NewSchedulesCreateRequest(ctx context.Context, server string, projectID string, instanceID string, params *SchedulesCreateParams, body SchedulesCreateJSONRequestBody) (*http.Request, error)

NewSchedulesCreateRequest calls the generic SchedulesCreate builder with application/json body

func NewSchedulesCreateRequestWithBody

func NewSchedulesCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, params *SchedulesCreateParams, contentType string, body io.Reader) (*http.Request, error)

NewSchedulesCreateRequestWithBody generates requests for SchedulesCreate with any type of body

func NewSchedulesListRequest

func NewSchedulesListRequest(ctx context.Context, server string, projectID string, instanceID string, params *SchedulesListParams) (*http.Request, error)

NewSchedulesListRequest generates requests for SchedulesList

Types

type BackupResponse

type BackupResponse struct {
	AlertConfigBackups  []string `json:"alertConfigBackups"`
	AlertRulesBackups   []string `json:"alertRulesBackups"`
	GrafanaBackups      []string `json:"grafanaBackups"`
	Message             string   `json:"message"`
	ScrapeConfigBackups []string `json:"scrapeConfigBackups"`
}

BackupResponse defines model for BackupResponse.

type BackupRetentionResponse

type BackupRetentionResponse struct {
	AlertConfigBackupRetention  string `json:"alertConfigBackupRetention"`
	AlertRulesBackupRetention   string `json:"alertRulesBackupRetention"`
	GrafanaBackupRetention      string `json:"grafanaBackupRetention"`
	Message                     string `json:"message"`
	ScrapeConfigBackupRetention string `json:"scrapeConfigBackupRetention"`
}

BackupRetentionResponse defines model for BackupRetentionResponse.

type BackupScheduleModelJson

type BackupScheduleModelJson struct {
	Schedule   string            `json:"schedule"`
	ScheduleID openapiTypes.UUID `json:"scheduleId"`
}

BackupScheduleModelJson defines model for BackupScheduleModelJson.

type BackupSchedulePostResponse

type BackupSchedulePostResponse struct {
	Message  string `json:"message"`
	Schedule string `json:"schedule"`
}

BackupSchedulePostResponse defines model for BackupSchedulePostResponse.

type BackupScheduleResponse

type BackupScheduleResponse struct {
	AlertConfigBackupSchedules  *[]BackupScheduleModelJson `json:"alertConfigBackupSchedules,omitempty"`
	AlertRulesBackupSchedules   *[]BackupScheduleModelJson `json:"alertRulesBackupSchedules,omitempty"`
	GrafanaBackupSchedules      *[]BackupScheduleModelJson `json:"grafanaBackupSchedules,omitempty"`
	Message                     string                     `json:"message"`
	ScrapeConfigBackupSchedules *[]BackupScheduleModelJson `json:"scrapeConfigBackupSchedules,omitempty"`
}

BackupScheduleResponse defines model for BackupScheduleResponse.

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 contracts.BaseClientInterface
}

Client which conforms to the OpenAPI3 specification for this service.

func NewRawClient

func NewRawClient(server string, httpClient contracts.BaseClientInterface) *Client

NewRawClient Creates a new Client, with reasonable defaults

func (*Client) CreateRaw

func (c *Client) CreateRaw(ctx context.Context, projectID string, instanceID string, params *CreateParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListRaw

func (c *Client) ListRaw(ctx context.Context, projectID string, instanceID string, params *ListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RestoresCreateRaw

func (c *Client) RestoresCreateRaw(ctx context.Context, projectID string, instanceID string, backupDate string, params *RestoresCreateParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RetentionsListRaw

func (c *Client) RetentionsListRaw(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SchedulesCreateRaw

func (c *Client) SchedulesCreateRaw(ctx context.Context, projectID string, instanceID string, params *SchedulesCreateParams, body SchedulesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SchedulesCreateRawWithBody

func (c *Client) SchedulesCreateRawWithBody(ctx context.Context, projectID string, instanceID string, params *SchedulesCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SchedulesListRaw

func (c *Client) SchedulesListRaw(ctx context.Context, projectID string, instanceID string, params *SchedulesListParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientWithResponses

type ClientWithResponses struct {
	// contains filtered or unexported fields
}

ClientWithResponses builds on rawClientInterface to offer response payloads

func NewClient

func NewClient(server string, httpClient contracts.BaseClientInterface) *ClientWithResponses

NewClient creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) Create

func (c *ClientWithResponses) Create(ctx context.Context, projectID string, instanceID string, params *CreateParams, reqEditors ...RequestEditorFn) (*CreateResponse, error)

Create request returning *CreateResponse

func (*ClientWithResponses) List

func (c *ClientWithResponses) List(ctx context.Context, projectID string, instanceID string, params *ListParams, reqEditors ...RequestEditorFn) (*ListResponse, error)

List request returning *ListResponse

func (*ClientWithResponses) ParseCreateResponse

func (c *ClientWithResponses) ParseCreateResponse(rsp *http.Response) (*CreateResponse, error)

ParseCreateResponse parses an HTTP response from a Create call

func (*ClientWithResponses) ParseListResponse

func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)

ParseListResponse parses an HTTP response from a List call

func (*ClientWithResponses) ParseRestoresCreateResponse

func (c *ClientWithResponses) ParseRestoresCreateResponse(rsp *http.Response) (*RestoresCreateResponse, error)

ParseRestoresCreateResponse parses an HTTP response from a RestoresCreate call

func (*ClientWithResponses) ParseRetentionsListResponse

func (c *ClientWithResponses) ParseRetentionsListResponse(rsp *http.Response) (*RetentionsListResponse, error)

ParseRetentionsListResponse parses an HTTP response from a RetentionsList call

func (*ClientWithResponses) ParseSchedulesCreateResponse

func (c *ClientWithResponses) ParseSchedulesCreateResponse(rsp *http.Response) (*SchedulesCreateResponse, error)

ParseSchedulesCreateResponse parses an HTTP response from a SchedulesCreate call

func (*ClientWithResponses) ParseSchedulesListResponse

func (c *ClientWithResponses) ParseSchedulesListResponse(rsp *http.Response) (*SchedulesListResponse, error)

ParseSchedulesListResponse parses an HTTP response from a SchedulesList call

func (*ClientWithResponses) RestoresCreate

func (c *ClientWithResponses) RestoresCreate(ctx context.Context, projectID string, instanceID string, backupDate string, params *RestoresCreateParams, reqEditors ...RequestEditorFn) (*RestoresCreateResponse, error)

RestoresCreate request returning *RestoresCreateResponse

func (*ClientWithResponses) RetentionsList

func (c *ClientWithResponses) RetentionsList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RetentionsListResponse, error)

RetentionsList request returning *RetentionsListResponse

func (*ClientWithResponses) SchedulesCreate

func (c *ClientWithResponses) SchedulesCreate(ctx context.Context, projectID string, instanceID string, params *SchedulesCreateParams, body SchedulesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesCreateResponse, error)

func (*ClientWithResponses) SchedulesCreateWithBody

func (c *ClientWithResponses) SchedulesCreateWithBody(ctx context.Context, projectID string, instanceID string, params *SchedulesCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesCreateResponse, error)

SchedulesCreateWithBody request with arbitrary body returning *SchedulesCreateResponse

func (*ClientWithResponses) SchedulesList

func (c *ClientWithResponses) SchedulesList(ctx context.Context, projectID string, instanceID string, params *SchedulesListParams, reqEditors ...RequestEditorFn) (*SchedulesListResponse, error)

SchedulesList request returning *SchedulesListResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// RestoresCreate request
	RestoresCreate(ctx context.Context, projectID string, instanceID string, backupDate string, params *RestoresCreateParams, reqEditors ...RequestEditorFn) (*RestoresCreateResponse, error)

	// RetentionsList request
	RetentionsList(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*RetentionsListResponse, error)

	// SchedulesList request
	SchedulesList(ctx context.Context, projectID string, instanceID string, params *SchedulesListParams, reqEditors ...RequestEditorFn) (*SchedulesListResponse, error)

	// SchedulesCreate request with any body
	SchedulesCreateWithBody(ctx context.Context, projectID string, instanceID string, params *SchedulesCreateParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SchedulesCreateResponse, error)

	SchedulesCreate(ctx context.Context, projectID string, instanceID string, params *SchedulesCreateParams, body SchedulesCreateJSONRequestBody, reqEditors ...RequestEditorFn) (*SchedulesCreateResponse, error)

	// List request
	List(ctx context.Context, projectID string, instanceID string, params *ListParams, reqEditors ...RequestEditorFn) (*ListResponse, error)

	// Create request
	Create(ctx context.Context, projectID string, instanceID string, params *CreateParams, reqEditors ...RequestEditorFn) (*CreateResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateParams

type CreateParams struct {
	// BackupTarget List of backup targets
	BackupTarget *[]CreateParamsBackupTarget `form:"backupTarget,omitempty" json:"backupTarget,omitempty"`
}

CreateParams defines parameters for Create.

type CreateParamsBackupTarget

type CreateParamsBackupTarget string

CreateParamsBackupTarget defines parameters for Create.

const (
	ALERT_CONFIG  CreateParamsBackupTarget = "alertConfig"
	ALERT_RULES   CreateParamsBackupTarget = "alertRules"
	GRAFANA       CreateParamsBackupTarget = "grafana"
	SCRAPE_CONFIG CreateParamsBackupTarget = "scrapeConfig"
)

Defines values for CreateParamsBackupTarget.

type CreateResponse

type CreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Message
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (CreateResponse) Status

func (r CreateResponse) Status() string

Status returns HTTPResponse.Status

func (CreateResponse) StatusCode

func (r CreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	Errors  *[]map[string]string `json:"errors,omitempty"`
	Message string               `json:"message"`
}

Error defines model for Error.

type ListParams

type ListParams struct {
	// BackupTarget List of backup targets
	BackupTarget *[]ListParamsBackupTarget `form:"backupTarget,omitempty" json:"backupTarget,omitempty"`
}

ListParams defines parameters for List.

type ListParamsBackupTarget

type ListParamsBackupTarget string

ListParamsBackupTarget defines parameters for List.

const (
	LIST_PARAMS_BACKUP_TARGET_ALERT_CONFIG  ListParamsBackupTarget = "alertConfig"
	LIST_PARAMS_BACKUP_TARGET_ALERT_RULES   ListParamsBackupTarget = "alertRules"
	LIST_PARAMS_BACKUP_TARGET_GRAFANA       ListParamsBackupTarget = "grafana"
	LIST_PARAMS_BACKUP_TARGET_SCRAPE_CONFIG ListParamsBackupTarget = "scrapeConfig"
)

Defines values for ListParamsBackupTarget.

type ListResponse

type ListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BackupResponse
	JSON403      *PermissionDenied
	JSON502      *Message
	Error        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 Message

type Message struct {
	Message string `json:"message"`
}

Message defines model for Message.

type PermissionDenied

type PermissionDenied struct {
	Detail string `json:"detail"`
}

PermissionDenied defines model for PermissionDenied.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RestoresCreateParams

type RestoresCreateParams struct {
	// RestoreTarget List of restore targets
	RestoreTarget RestoresCreateParamsRestoreTarget `form:"restoreTarget" json:"restoreTarget"`
}

RestoresCreateParams defines parameters for RestoresCreate.

type RestoresCreateParamsRestoreTarget

type RestoresCreateParamsRestoreTarget string

RestoresCreateParamsRestoreTarget defines parameters for RestoresCreate.

const (
	RESTORES_CREATE_PARAMS_RESTORE_TARGET_ALERT_CONFIG  RestoresCreateParamsRestoreTarget = "alertConfig"
	RESTORES_CREATE_PARAMS_RESTORE_TARGET_ALERT_RULES   RestoresCreateParamsRestoreTarget = "alertRules"
	RESTORES_CREATE_PARAMS_RESTORE_TARGET_GRAFANA       RestoresCreateParamsRestoreTarget = "grafana"
	RESTORES_CREATE_PARAMS_RESTORE_TARGET_SCRAPE_CONFIG RestoresCreateParamsRestoreTarget = "scrapeConfig"
)

Defines values for RestoresCreateParamsRestoreTarget.

type RestoresCreateResponse

type RestoresCreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Message
	JSON403      *PermissionDenied
	JSON404      *Message
	Error        error // Aggregated error
}

func (RestoresCreateResponse) Status

func (r RestoresCreateResponse) Status() string

Status returns HTTPResponse.Status

func (RestoresCreateResponse) StatusCode

func (r RestoresCreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RetentionsListResponse

type RetentionsListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BackupRetentionResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (RetentionsListResponse) Status

func (r RetentionsListResponse) Status() string

Status returns HTTPResponse.Status

func (RetentionsListResponse) StatusCode

func (r RetentionsListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SchedulesCreateJSONBody

type SchedulesCreateJSONBody struct {
	// Schedule The schedule for how often to create a backup.
	// `Additional Validators:`
	// * must be a valid cronjob format
	// * must run less than hourly
	Schedule string `json:"schedule"`
}

SchedulesCreateJSONBody defines parameters for SchedulesCreate.

type SchedulesCreateJSONRequestBody

type SchedulesCreateJSONRequestBody SchedulesCreateJSONBody

SchedulesCreateJSONRequestBody defines body for SchedulesCreate for application/json ContentType.

type SchedulesCreateParams

type SchedulesCreateParams struct {
	// BackupTarget List of backup targets
	BackupTarget *[]SchedulesCreateParamsBackupTarget `form:"backupTarget,omitempty" json:"backupTarget,omitempty"`
}

SchedulesCreateParams defines parameters for SchedulesCreate.

type SchedulesCreateParamsBackupTarget

type SchedulesCreateParamsBackupTarget string

SchedulesCreateParamsBackupTarget defines parameters for SchedulesCreate.

const (
	SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_ALERT_CONFIG  SchedulesCreateParamsBackupTarget = "alertConfig"
	SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_ALERT_RULES   SchedulesCreateParamsBackupTarget = "alertRules"
	SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_GRAFANA       SchedulesCreateParamsBackupTarget = "grafana"
	SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_SCRAPE_CONFIG SchedulesCreateParamsBackupTarget = "scrapeConfig"
)

Defines values for SchedulesCreateParamsBackupTarget.

type SchedulesCreateResponse

type SchedulesCreateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *BackupSchedulePostResponse
	JSON400      *Error
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (SchedulesCreateResponse) Status

func (r SchedulesCreateResponse) Status() string

Status returns HTTPResponse.Status

func (SchedulesCreateResponse) StatusCode

func (r SchedulesCreateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SchedulesListParams

type SchedulesListParams struct {
	// BackupTarget List of backup targets
	BackupTarget *[]SchedulesListParamsBackupTarget `form:"backupTarget,omitempty" json:"backupTarget,omitempty"`
}

SchedulesListParams defines parameters for SchedulesList.

type SchedulesListParamsBackupTarget

type SchedulesListParamsBackupTarget string

SchedulesListParamsBackupTarget defines parameters for SchedulesList.

const (
	SCHEDULES_LIST_PARAMS_BACKUP_TARGET_ALERT_CONFIG  SchedulesListParamsBackupTarget = "alertConfig"
	SCHEDULES_LIST_PARAMS_BACKUP_TARGET_ALERT_RULES   SchedulesListParamsBackupTarget = "alertRules"
	SCHEDULES_LIST_PARAMS_BACKUP_TARGET_GRAFANA       SchedulesListParamsBackupTarget = "grafana"
	SCHEDULES_LIST_PARAMS_BACKUP_TARGET_SCRAPE_CONFIG SchedulesListParamsBackupTarget = "scrapeConfig"
)

Defines values for SchedulesListParamsBackupTarget.

type SchedulesListResponse

type SchedulesListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BackupScheduleResponse
	JSON403      *PermissionDenied
	Error        error // Aggregated error
}

func (SchedulesListResponse) Status

func (r SchedulesListResponse) Status() string

Status returns HTTPResponse.Status

func (SchedulesListResponse) StatusCode

func (r SchedulesListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL