Documentation
¶
Index ¶
- type Backups
- func (srv *Backups) CreateArchive(Services []string, optionalSetters ...CreateArchiveOption) (*models.BackupArchive, error)
- func (srv *Backups) CreatePolicy(PolicyId string, Services []string, Retention int, Schedule string, ...) (*models.BackupPolicy, error)
- func (srv *Backups) CreateRestoration(ArchiveId string, Services []string, ...) (*models.BackupRestoration, error)
- func (srv *Backups) DeleteArchive(ArchiveId string) (*interface{}, error)
- func (srv *Backups) DeletePolicy(PolicyId string) (*interface{}, error)
- func (srv *Backups) GetArchive(ArchiveId string) (*models.BackupArchive, error)
- func (srv *Backups) GetPolicy(PolicyId string) (*models.BackupPolicy, error)
- func (srv *Backups) GetRestoration(RestorationId string) (*models.BackupRestoration, error)
- func (srv *Backups) ListArchives(optionalSetters ...ListArchivesOption) (*models.BackupArchiveList, error)
- func (srv *Backups) ListPolicies(optionalSetters ...ListPoliciesOption) (*models.BackupPolicyList, error)
- func (srv *Backups) ListRestorations(optionalSetters ...ListRestorationsOption) (*models.BackupRestorationList, error)
- func (srv *Backups) UpdatePolicy(PolicyId string, optionalSetters ...UpdatePolicyOption) (*models.BackupPolicy, error)
- func (srv *Backups) WithCreateArchiveResourceId(v string) CreateArchiveOption
- func (srv *Backups) WithCreatePolicyEnabled(v bool) CreatePolicyOption
- func (srv *Backups) WithCreatePolicyName(v string) CreatePolicyOption
- func (srv *Backups) WithCreatePolicyResourceId(v string) CreatePolicyOption
- func (srv *Backups) WithCreateRestorationNewResourceId(v string) CreateRestorationOption
- func (srv *Backups) WithCreateRestorationNewResourceName(v string) CreateRestorationOption
- func (srv *Backups) WithListArchivesQueries(v []string) ListArchivesOption
- func (srv *Backups) WithListPoliciesQueries(v []string) ListPoliciesOption
- func (srv *Backups) WithListRestorationsQueries(v []string) ListRestorationsOption
- func (srv *Backups) WithUpdatePolicyEnabled(v bool) UpdatePolicyOption
- func (srv *Backups) WithUpdatePolicyName(v string) UpdatePolicyOption
- func (srv *Backups) WithUpdatePolicyRetention(v int) UpdatePolicyOption
- func (srv *Backups) WithUpdatePolicySchedule(v string) UpdatePolicyOption
- type CreateArchiveOption
- type CreateArchiveOptions
- type CreatePolicyOption
- type CreatePolicyOptions
- type CreateRestorationOption
- type CreateRestorationOptions
- type ListArchivesOption
- type ListArchivesOptions
- type ListPoliciesOption
- type ListPoliciesOptions
- type ListRestorationsOption
- type ListRestorationsOptions
- type UpdatePolicyOption
- type UpdatePolicyOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backups ¶
type Backups struct {
// contains filtered or unexported fields
}
Backups service
func (*Backups) CreateArchive ¶
func (srv *Backups) CreateArchive(Services []string, optionalSetters ...CreateArchiveOption) (*models.BackupArchive, error)
CreateArchive create a new archive asynchronously for a project.
func (*Backups) CreatePolicy ¶
func (srv *Backups) CreatePolicy(PolicyId string, Services []string, Retention int, Schedule string, optionalSetters ...CreatePolicyOption) (*models.BackupPolicy, error)
CreatePolicy create a new backup policy.
func (*Backups) CreateRestoration ¶
func (srv *Backups) CreateRestoration(ArchiveId string, Services []string, optionalSetters ...CreateRestorationOption) (*models.BackupRestoration, error)
CreateRestoration create and trigger a new restoration for a backup on a project.
For a backup of one database, the restoration resolves its destination before it is queued. When `newResourceId` is omitted, the archived database is restored in place and its own ID is returned in `options`. Pass a different `newResourceId` to restore alongside it as a new database instead.
The restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.
To list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.
When restoring a DocumentsDB or VectorsDB database from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification and lands the data there. An in-place restore swaps the database onto that backing only once the restore has succeeded, and retires the backing it displaced only once that swap is confirmed, so the source keeps serving its own data until the restored data is in place and any failure leaves it untouched. A serverless source has no dedicated backing to clone and restores onto the archived database instead.
func (*Backups) DeleteArchive ¶
DeleteArchive delete an existing archive for a project.
func (*Backups) DeletePolicy ¶
DeletePolicy delete a policy using it's ID.
func (*Backups) GetArchive ¶
func (srv *Backups) GetArchive(ArchiveId string) (*models.BackupArchive, error)
GetArchive get a backup archive using it's ID.
func (*Backups) GetPolicy ¶
func (srv *Backups) GetPolicy(PolicyId string) (*models.BackupPolicy, error)
GetPolicy get a backup policy using it's ID.
func (*Backups) GetRestoration ¶
func (srv *Backups) GetRestoration(RestorationId string) (*models.BackupRestoration, error)
GetRestoration get the current status of a backup restoration.
func (*Backups) ListArchives ¶
func (srv *Backups) ListArchives(optionalSetters ...ListArchivesOption) (*models.BackupArchiveList, error)
ListArchives list all archives for a project.
func (*Backups) ListPolicies ¶
func (srv *Backups) ListPolicies(optionalSetters ...ListPoliciesOption) (*models.BackupPolicyList, error)
ListPolicies list all policies for a project.
func (*Backups) ListRestorations ¶
func (srv *Backups) ListRestorations(optionalSetters ...ListRestorationsOption) (*models.BackupRestorationList, error)
ListRestorations list all backup restorations for a project.
func (*Backups) UpdatePolicy ¶
func (srv *Backups) UpdatePolicy(PolicyId string, optionalSetters ...UpdatePolicyOption) (*models.BackupPolicy, error)
UpdatePolicy update an existing policy using it's ID.
func (*Backups) WithCreateArchiveResourceId ¶
func (srv *Backups) WithCreateArchiveResourceId(v string) CreateArchiveOption
func (*Backups) WithCreatePolicyEnabled ¶
func (srv *Backups) WithCreatePolicyEnabled(v bool) CreatePolicyOption
func (*Backups) WithCreatePolicyName ¶
func (srv *Backups) WithCreatePolicyName(v string) CreatePolicyOption
func (*Backups) WithCreatePolicyResourceId ¶
func (srv *Backups) WithCreatePolicyResourceId(v string) CreatePolicyOption
func (*Backups) WithCreateRestorationNewResourceId ¶
func (srv *Backups) WithCreateRestorationNewResourceId(v string) CreateRestorationOption
func (*Backups) WithCreateRestorationNewResourceName ¶
func (srv *Backups) WithCreateRestorationNewResourceName(v string) CreateRestorationOption
func (*Backups) WithListArchivesQueries ¶
func (srv *Backups) WithListArchivesQueries(v []string) ListArchivesOption
func (*Backups) WithListPoliciesQueries ¶
func (srv *Backups) WithListPoliciesQueries(v []string) ListPoliciesOption
func (*Backups) WithListRestorationsQueries ¶
func (srv *Backups) WithListRestorationsQueries(v []string) ListRestorationsOption
func (*Backups) WithUpdatePolicyEnabled ¶
func (srv *Backups) WithUpdatePolicyEnabled(v bool) UpdatePolicyOption
func (*Backups) WithUpdatePolicyName ¶
func (srv *Backups) WithUpdatePolicyName(v string) UpdatePolicyOption
func (*Backups) WithUpdatePolicyRetention ¶
func (srv *Backups) WithUpdatePolicyRetention(v int) UpdatePolicyOption
func (*Backups) WithUpdatePolicySchedule ¶
func (srv *Backups) WithUpdatePolicySchedule(v string) UpdatePolicyOption
type CreateArchiveOption ¶
type CreateArchiveOption func(*CreateArchiveOptions)
type CreateArchiveOptions ¶
type CreateArchiveOptions struct {
ResourceId string
// contains filtered or unexported fields
}
func (CreateArchiveOptions) New ¶
func (options CreateArchiveOptions) New() *CreateArchiveOptions
type CreatePolicyOption ¶
type CreatePolicyOption func(*CreatePolicyOptions)
type CreatePolicyOptions ¶
type CreatePolicyOptions struct {
Name string
ResourceId string
Enabled bool
// contains filtered or unexported fields
}
func (CreatePolicyOptions) New ¶
func (options CreatePolicyOptions) New() *CreatePolicyOptions
type CreateRestorationOption ¶
type CreateRestorationOption func(*CreateRestorationOptions)
type CreateRestorationOptions ¶
type CreateRestorationOptions struct {
NewResourceId string
NewResourceName string
// contains filtered or unexported fields
}
func (CreateRestorationOptions) New ¶
func (options CreateRestorationOptions) New() *CreateRestorationOptions
type ListArchivesOption ¶
type ListArchivesOption func(*ListArchivesOptions)
type ListArchivesOptions ¶
type ListArchivesOptions struct {
Queries []string
// contains filtered or unexported fields
}
func (ListArchivesOptions) New ¶
func (options ListArchivesOptions) New() *ListArchivesOptions
type ListPoliciesOption ¶
type ListPoliciesOption func(*ListPoliciesOptions)
type ListPoliciesOptions ¶
type ListPoliciesOptions struct {
Queries []string
// contains filtered or unexported fields
}
func (ListPoliciesOptions) New ¶
func (options ListPoliciesOptions) New() *ListPoliciesOptions
type ListRestorationsOption ¶
type ListRestorationsOption func(*ListRestorationsOptions)
type ListRestorationsOptions ¶
type ListRestorationsOptions struct {
Queries []string
// contains filtered or unexported fields
}
func (ListRestorationsOptions) New ¶
func (options ListRestorationsOptions) New() *ListRestorationsOptions
type UpdatePolicyOption ¶
type UpdatePolicyOption func(*UpdatePolicyOptions)
type UpdatePolicyOptions ¶
type UpdatePolicyOptions struct {
Name string
Retention int
Schedule string
Enabled bool
// contains filtered or unexported fields
}
func (UpdatePolicyOptions) New ¶
func (options UpdatePolicyOptions) New() *UpdatePolicyOptions