serverbackup

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func NewConfiguration

func NewConfiguration() *config.Configuration

NewConfiguration returns a new Configuration object

func ParameterValueToString

func ParameterValueToString(obj interface{}, key string) string

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

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

APIClient manages communication with the STACKIT Server Backup Management API API v1.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error)

NewAPIClient creates a new API client. Optionally receives configuration options

func (*APIClient) CreateBackup

func (a *APIClient) CreateBackup(ctx context.Context, projectId string, serverId string) ApiCreateBackupRequest

CreateBackup create backup

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@return ApiCreateBackupRequest

func (*APIClient) CreateBackupExecute

func (a *APIClient) CreateBackupExecute(ctx context.Context, projectId string, serverId string) (*BackupJob, error)

func (*APIClient) CreateBackupSchedule

func (a *APIClient) CreateBackupSchedule(ctx context.Context, projectId string, serverId string) ApiCreateBackupScheduleRequest

CreateBackupSchedule create backup schedule

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@return ApiCreateBackupScheduleRequest

func (*APIClient) CreateBackupScheduleExecute

func (a *APIClient) CreateBackupScheduleExecute(ctx context.Context, projectId string, serverId string) (*BackupSchedule, error)

func (*APIClient) DeleteBackup

func (a *APIClient) DeleteBackup(ctx context.Context, projectId string, serverId string, backupId string) ApiDeleteBackupRequest

DeleteBackup delete backup

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupId id of the backup
@return ApiDeleteBackupRequest

func (*APIClient) DeleteBackupExecute

func (a *APIClient) DeleteBackupExecute(ctx context.Context, projectId string, serverId string, backupId string) error

func (*APIClient) DeleteBackupSchedule

func (a *APIClient) DeleteBackupSchedule(ctx context.Context, projectId string, serverId string, backupScheduleId string) ApiDeleteBackupScheduleRequest

DeleteBackupSchedule delete backup schedule

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupScheduleId backup schedule id
@return ApiDeleteBackupScheduleRequest

func (*APIClient) DeleteBackupScheduleExecute

func (a *APIClient) DeleteBackupScheduleExecute(ctx context.Context, projectId string, serverId string, backupScheduleId string) error

func (*APIClient) DeleteVolumeBackup

func (a *APIClient) DeleteVolumeBackup(ctx context.Context, projectId string, serverId string, backupId string, volumeBackupId string) ApiDeleteVolumeBackupRequest

DeleteVolumeBackup delete volume backup

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupId id of the backup
@param volumeBackupId id of the volume backup
@return ApiDeleteVolumeBackupRequest

func (*APIClient) DeleteVolumeBackupExecute

func (a *APIClient) DeleteVolumeBackupExecute(ctx context.Context, projectId string, serverId string, backupId string, volumeBackupId string) error

func (*APIClient) DisableService

func (a *APIClient) DisableService(ctx context.Context, projectId string, serverId string) ApiDisableServiceRequest

DisableService disable backup service

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@return ApiDisableServiceRequest

func (*APIClient) DisableServiceExecute

func (a *APIClient) DisableServiceExecute(ctx context.Context, projectId string, serverId string) error

func (*APIClient) EnableService

func (a *APIClient) EnableService(ctx context.Context, projectId string, serverId string) ApiEnableServiceRequest

EnableService enable backup service

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@return ApiEnableServiceRequest

func (*APIClient) EnableServiceExecute

func (a *APIClient) EnableServiceExecute(ctx context.Context, projectId string, serverId string) error

func (*APIClient) GetBackup

func (a *APIClient) GetBackup(ctx context.Context, projectId string, serverId string, backupId string) ApiGetBackupRequest

GetBackup get backup

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupId id of the backup
@return ApiGetBackupRequest

func (*APIClient) GetBackupExecute

func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, serverId string, backupId string) (*Backup, error)

func (*APIClient) GetBackupSchedule

func (a *APIClient) GetBackupSchedule(ctx context.Context, projectId string, serverId string, backupScheduleId string) ApiGetBackupScheduleRequest

GetBackupSchedule get single backup schedule details

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupScheduleId backup schedule id
@return ApiGetBackupScheduleRequest

func (*APIClient) GetBackupScheduleExecute

func (a *APIClient) GetBackupScheduleExecute(ctx context.Context, projectId string, serverId string, backupScheduleId string) (*BackupSchedule, error)

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *config.Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

func (*APIClient) ListBackupSchedules

func (a *APIClient) ListBackupSchedules(ctx context.Context, projectId string, serverId string) ApiListBackupSchedulesRequest

ListBackupSchedules get list of backup schedules

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@return ApiListBackupSchedulesRequest

func (*APIClient) ListBackupSchedulesExecute

func (a *APIClient) ListBackupSchedulesExecute(ctx context.Context, projectId string, serverId string) (*ListBackupSchedules200Response, error)

func (*APIClient) ListBackups

func (a *APIClient) ListBackups(ctx context.Context, projectId string, serverId string) ApiListBackupsRequest

ListBackups get list of backups

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@return ApiListBackupsRequest

func (*APIClient) ListBackupsExecute

func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, serverId string) (*ListBackups200Response, error)

func (*APIClient) RestoreBackup

func (a *APIClient) RestoreBackup(ctx context.Context, projectId string, serverId string, backupId string) ApiRestoreBackupRequest

RestoreBackup trigger restore of the requested backup

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupId id of the backup
@return ApiRestoreBackupRequest

func (*APIClient) RestoreBackupExecute

func (a *APIClient) RestoreBackupExecute(ctx context.Context, projectId string, serverId string, backupId string) error

func (*APIClient) RestoreVolumeBackup

func (a *APIClient) RestoreVolumeBackup(ctx context.Context, projectId string, serverId string, backupId string, volumeBackupId string) ApiRestoreVolumeBackupRequest

RestoreVolumeBackup trigger restore of the requested volume backup

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupId id of the backup
@param volumeBackupId id of the volume backup
@return ApiRestoreVolumeBackupRequest

func (*APIClient) RestoreVolumeBackupExecute

func (a *APIClient) RestoreVolumeBackupExecute(ctx context.Context, projectId string, serverId string, backupId string, volumeBackupId string) error

func (*APIClient) UpdateBackupSchedule

func (a *APIClient) UpdateBackupSchedule(ctx context.Context, projectId string, serverId string, backupScheduleId string) ApiUpdateBackupScheduleRequest

UpdateBackupSchedule update backup schedule

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param projectId portal project id
@param serverId openstack server id
@param backupScheduleId backup schedule id
@return ApiUpdateBackupScheduleRequest

func (*APIClient) UpdateBackupScheduleExecute

func (a *APIClient) UpdateBackupScheduleExecute(ctx context.Context, projectId string, serverId string, backupScheduleId string) (*BackupSchedule, error)

type ApiCreateBackupRequest

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

func (ApiCreateBackupRequest) CreateBackupPayload

func (r ApiCreateBackupRequest) CreateBackupPayload(createBackupPayload CreateBackupPayload) ApiCreateBackupRequest

func (ApiCreateBackupRequest) Execute

func (r ApiCreateBackupRequest) Execute() (*BackupJob, error)

type ApiCreateBackupScheduleRequest

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

func (ApiCreateBackupScheduleRequest) CreateBackupSchedulePayload

func (r ApiCreateBackupScheduleRequest) CreateBackupSchedulePayload(createBackupSchedulePayload CreateBackupSchedulePayload) ApiCreateBackupScheduleRequest

func (ApiCreateBackupScheduleRequest) Execute

type ApiDeleteBackupRequest

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

func (ApiDeleteBackupRequest) Execute

func (r ApiDeleteBackupRequest) Execute() error

type ApiDeleteBackupScheduleRequest

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

func (ApiDeleteBackupScheduleRequest) Execute

type ApiDeleteVolumeBackupRequest

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

func (ApiDeleteVolumeBackupRequest) Execute

func (r ApiDeleteVolumeBackupRequest) Execute() error

type ApiDisableServiceRequest

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

func (ApiDisableServiceRequest) Execute

func (r ApiDisableServiceRequest) Execute() error

type ApiEnableServiceRequest

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

func (ApiEnableServiceRequest) EnableServicePayload

func (r ApiEnableServiceRequest) EnableServicePayload(enableServicePayload EnableServicePayload) ApiEnableServiceRequest

func (ApiEnableServiceRequest) Execute

func (r ApiEnableServiceRequest) Execute() error

type ApiGetBackupRequest

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

func (ApiGetBackupRequest) Execute

func (r ApiGetBackupRequest) Execute() (*Backup, error)

type ApiGetBackupScheduleRequest

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

func (ApiGetBackupScheduleRequest) Execute

type ApiListBackupSchedulesRequest

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

func (ApiListBackupSchedulesRequest) Execute

type ApiListBackupsRequest

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

func (ApiListBackupsRequest) Execute

type ApiRestoreBackupRequest

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

func (ApiRestoreBackupRequest) Execute

func (r ApiRestoreBackupRequest) Execute() error

func (ApiRestoreBackupRequest) RestoreBackupPayload

func (r ApiRestoreBackupRequest) RestoreBackupPayload(restoreBackupPayload RestoreBackupPayload) ApiRestoreBackupRequest

type ApiRestoreVolumeBackupRequest

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

func (ApiRestoreVolumeBackupRequest) Execute

func (ApiRestoreVolumeBackupRequest) RestoreVolumeBackupPayload

func (r ApiRestoreVolumeBackupRequest) RestoreVolumeBackupPayload(restoreVolumeBackupPayload RestoreVolumeBackupPayload) ApiRestoreVolumeBackupRequest

type ApiUpdateBackupScheduleRequest

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

func (ApiUpdateBackupScheduleRequest) Execute

func (ApiUpdateBackupScheduleRequest) UpdateBackupSchedulePayload

func (r ApiUpdateBackupScheduleRequest) UpdateBackupSchedulePayload(updateBackupSchedulePayload UpdateBackupSchedulePayload) ApiUpdateBackupScheduleRequest

type Backup

type Backup struct {
	// REQUIRED
	CreatedAt *string `json:"createdAt"`
	// REQUIRED
	ExpireAt *string `json:"expireAt"`
	// REQUIRED
	Id             *string `json:"id"`
	LastRestoredAt *string `json:"lastRestoredAt,omitempty"`
	// REQUIRED
	Name *string `json:"name"`
	Size *int64  `json:"size,omitempty"`
	// REQUIRED
	Status        *string                     `json:"status"`
	VolumeBackups *[]BackupVolumeBackupsInner `json:"volumeBackups,omitempty"`
}

type BackupJob

type BackupJob struct {
	// REQUIRED
	Id *string `json:"id"`
}

type BackupProperties

type BackupProperties struct {
	// Max 255 characters
	// REQUIRED
	Name *string `json:"name"`
	// Values are set in days (1-36500)
	// REQUIRED
	RetentionPeriod *int64    `json:"retentionPeriod"`
	VolumeIds       *[]string `json:"volumeIds,omitempty"`
}

type BackupSchedule

type BackupSchedule struct {
	BackupProperties *BackupProperties `json:"backupProperties,omitempty"`
	// REQUIRED
	Enabled *bool `json:"enabled"`
	// REQUIRED
	Id *int64 `json:"id"`
	// REQUIRED
	Name *string `json:"name"`
	// REQUIRED
	Rrule *string `json:"rrule"`
}

type BackupVolumeBackupsInner

type BackupVolumeBackupsInner struct {
	Id                   *string `json:"id,omitempty"`
	LastRestoredAt       *string `json:"lastRestoredAt,omitempty"`
	LastRestoredVolumeId *string `json:"lastRestoredVolumeId,omitempty"`
	Size                 *int64  `json:"size,omitempty"`
	Status               *string `json:"status,omitempty"`
	VolumeId             *string `json:"volumeId,omitempty"`
}

type CreateBackupPayload

type CreateBackupPayload struct {
	// Max 255 characters
	// REQUIRED
	Name *string `json:"name"`
	// Values are set in days (1-36500)
	// REQUIRED
	RetentionPeriod *int64    `json:"retentionPeriod"`
	VolumeIds       *[]string `json:"volumeIds,omitempty"`
}

type CreateBackupSchedulePayload

type CreateBackupSchedulePayload struct {
	BackupProperties *BackupProperties `json:"backupProperties,omitempty"`
	// REQUIRED
	Enabled *bool `json:"enabled"`
	// Max 255 characters
	// REQUIRED
	Name *string `json:"name"`
	// REQUIRED
	Rrule *string `json:"rrule"`
}

type DefaultApiService

type DefaultApiService service

DefaultApiService DefaultApi service

type EnableServicePayload

type EnableServicePayload struct {
	BackupPolicyId *string `json:"backupPolicyId,omitempty"`
}

type ListBackupSchedules200Response

type ListBackupSchedules200Response struct {
	Items *[]BackupSchedule `json:"items,omitempty"`
}

type ListBackups200Response

type ListBackups200Response struct {
	Items *[]Backup `json:"items,omitempty"`
}

type MappedNullable

type MappedNullable interface {
	ToMap() (map[string]interface{}, error)
}

type NullableBool

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

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableFloat32

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

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

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

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableInt

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

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

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

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

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

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableString

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

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableTime

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

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type RestoreBackupPayload

type RestoreBackupPayload struct {
	// REQUIRED
	StartServerAfterRestore *bool     `json:"startServerAfterRestore"`
	VolumeIds               *[]string `json:"volumeIds,omitempty"`
}

type RestoreVolumeBackupPayload

type RestoreVolumeBackupPayload struct {
	// REQUIRED
	RestoreVolumeId *string `json:"restoreVolumeId"`
}

type UpdateBackupSchedulePayload

type UpdateBackupSchedulePayload struct {
	BackupProperties *BackupProperties `json:"backupProperties,omitempty"`
	// REQUIRED
	Enabled *bool `json:"enabled"`
	// Max 255 characters
	// REQUIRED
	Name *string `json:"name"`
	// REQUIRED
	Rrule *string `json:"rrule"`
}

Jump to

Keyboard shortcuts

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