Documentation ¶
Overview ¶
Copyright 2020 the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func WithAnnotations(vals ...string) func(obj metav1.Object)
- func WithClusterName(val string) func(obj metav1.Object)
- func WithDeletionTimestamp(val time.Time) func(obj metav1.Object)
- func WithFinalizers(vals ...string) func(obj metav1.Object)
- func WithGenerateName(val string) func(obj metav1.Object)
- func WithLabels(vals ...string) func(obj metav1.Object)
- func WithLabelsMap(labels map[string]string) func(obj metav1.Object)
- func WithName(val string) func(obj metav1.Object)
- func WithUID(val string) func(obj metav1.Object)
- type BackupRepositoryBuilder
- func (b *BackupRepositoryBuilder) AllowedNamespaces(allowedNamespaces []string) *BackupRepositoryBuilder
- func (b *BackupRepositoryBuilder) BackupRepositoryClaim(backupRepositoryClaimName string) *BackupRepositoryBuilder
- func (b *BackupRepositoryBuilder) RepositoryDriver() *BackupRepositoryBuilder
- func (b *BackupRepositoryBuilder) RepositoryParameters(repositoryParameters map[string]string) *BackupRepositoryBuilder
- func (b *BackupRepositoryBuilder) Result() *backupdriverv1.BackupRepository
- func (b *BackupRepositoryBuilder) SvcBackupRepositoryName(svcBackupRepositoryName string) *BackupRepositoryBuilder
- type BackupRepositoryClaimBuilder
- func (b *BackupRepositoryClaimBuilder) AllowedNamespaces(allowedNamespaces []string) *BackupRepositoryClaimBuilder
- func (b *BackupRepositoryClaimBuilder) BackupRepository(backupRepositoryName string) *BackupRepositoryClaimBuilder
- func (b *BackupRepositoryClaimBuilder) RepositoryDriver() *BackupRepositoryClaimBuilder
- func (b *BackupRepositoryClaimBuilder) RepositoryParameters(repositoryParameters map[string]string) *BackupRepositoryClaimBuilder
- func (b *BackupRepositoryClaimBuilder) Result() *backupdriverv1.BackupRepositoryClaim
- type CloneFromSnapshotBuilder
- func (b *CloneFromSnapshotBuilder) APIGroup(apiGroup *string) *CloneFromSnapshotBuilder
- func (b *CloneFromSnapshotBuilder) BackupRepository(backupRepositoryName string) *CloneFromSnapshotBuilder
- func (b *CloneFromSnapshotBuilder) CancelState(cancelState bool) *CloneFromSnapshotBuilder
- func (b *CloneFromSnapshotBuilder) Kind(kind string) *CloneFromSnapshotBuilder
- func (b *CloneFromSnapshotBuilder) Metadata(metadata []byte) *CloneFromSnapshotBuilder
- func (b *CloneFromSnapshotBuilder) Result() *backupdriverv1.CloneFromSnapshot
- func (b *CloneFromSnapshotBuilder) SnapshotID(snapshotID string) *CloneFromSnapshotBuilder
- type DeleteSnapshotBuilder
- type DownloadBuilder
- func (b *DownloadBuilder) BackupRepositoryName(brName string) *DownloadBuilder
- func (b *DownloadBuilder) CloneFromSnapshotReference(cloneFromSnapshotRef string) *DownloadBuilder
- func (b *DownloadBuilder) CompletionTimestamp(val time.Time) *DownloadBuilder
- func (b *DownloadBuilder) NextRetryTimestamp(val time.Time) *DownloadBuilder
- func (b *DownloadBuilder) ObjectMeta(opts ...ObjectMetaOpt) *DownloadBuilder
- func (b *DownloadBuilder) Phase(phase velerov1api.DownloadPhase) *DownloadBuilder
- func (b *DownloadBuilder) ProcessingNode(node string) *DownloadBuilder
- func (b *DownloadBuilder) ProtectedEntityID(id string) *DownloadBuilder
- func (b *DownloadBuilder) RestoreTimestamp(val time.Time) *DownloadBuilder
- func (b *DownloadBuilder) Result() *velerov1api.Download
- func (b *DownloadBuilder) Retry(cnt int32) *DownloadBuilder
- func (b *DownloadBuilder) SnapshotID(snapshotID string) *DownloadBuilder
- func (b *DownloadBuilder) StartTimestamp(val time.Time) *DownloadBuilder
- func (b *DownloadBuilder) VolumeID(id string) *DownloadBuilder
- type ObjectMetaOpt
- type SnapshotBuilder
- func (b *SnapshotBuilder) BackupRepository(backupRepositoryName string) *SnapshotBuilder
- func (b *SnapshotBuilder) CancelState(cancelState bool) *SnapshotBuilder
- func (b *SnapshotBuilder) ObjectReference(objectToSnapshot core_v1.TypedLocalObjectReference) *SnapshotBuilder
- func (b *SnapshotBuilder) Result() *backupdriverv1.Snapshot
- type UploadBuilder
- func (b *UploadBuilder) BackupRepositoryName(backuprepo string) *UploadBuilder
- func (b *UploadBuilder) BackupTimestamp(val time.Time) *UploadBuilder
- func (b *UploadBuilder) CompletionTimestamp(val time.Time) *UploadBuilder
- func (b *UploadBuilder) CurrentBackOff(backoff int32) *UploadBuilder
- func (b *UploadBuilder) NextRetryTimestamp(val time.Time) *UploadBuilder
- func (b *UploadBuilder) ObjectMeta(opts ...ObjectMetaOpt) *UploadBuilder
- func (b *UploadBuilder) Phase(phase velerov1api.UploadPhase) *UploadBuilder
- func (b *UploadBuilder) ProcessingNode(node string) *UploadBuilder
- func (b *UploadBuilder) Result() *velerov1api.Upload
- func (b *UploadBuilder) Retry(cnt int32) *UploadBuilder
- func (b *UploadBuilder) SnapshotID(snapshotID string) *UploadBuilder
- func (b *UploadBuilder) SnapshotReference(snapshotRef string) *UploadBuilder
- func (b *UploadBuilder) StartTimestamp(val time.Time) *UploadBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAnnotations ¶
WithAnnotations is a functional option that applies the specified annotation keys/values to an object.
func WithClusterName ¶
WithClusterName is a functional option that applies the specified cluster name to an object.
func WithDeletionTimestamp ¶
WithDeletionTimestamp is a functional option that applies the specified deletion timestamp to an object.
func WithFinalizers ¶
WithFinalizers is a functional option that applies the specified finalizers to an object.
func WithGenerateName ¶
WithGenerateName is a functional option that applies the specified generate name to an object.
func WithLabels ¶
WithLabels is a functional option that applies the specified label keys/values to an object.
func WithLabelsMap ¶
WithLabelsMap is a functional option that applies the specified labels map to an object.
Types ¶
type BackupRepositoryBuilder ¶ added in v1.1.0
type BackupRepositoryBuilder struct {
// contains filtered or unexported fields
}
BackupRepositoryBuilder builds BackupRepository objects.
func ForBackupRepository ¶ added in v1.1.0
func ForBackupRepository(name string) *BackupRepositoryBuilder
func (*BackupRepositoryBuilder) AllowedNamespaces ¶ added in v1.1.0
func (b *BackupRepositoryBuilder) AllowedNamespaces(allowedNamespaces []string) *BackupRepositoryBuilder
AllowedNamespaces sets the allowed namespaces for the backup repository.
func (*BackupRepositoryBuilder) BackupRepositoryClaim ¶ added in v1.1.0
func (b *BackupRepositoryBuilder) BackupRepositoryClaim(backupRepositoryClaimName string) *BackupRepositoryBuilder
BackupRepositoryClaim sets the name of the backup repository claim for this specific backup repository.
func (*BackupRepositoryBuilder) RepositoryDriver ¶ added in v1.1.0
func (b *BackupRepositoryBuilder) RepositoryDriver() *BackupRepositoryBuilder
RepositoryDriver sets the repository driver the backup repository. Currently only s3 is supported.
func (*BackupRepositoryBuilder) RepositoryParameters ¶ added in v1.1.0
func (b *BackupRepositoryBuilder) RepositoryParameters(repositoryParameters map[string]string) *BackupRepositoryBuilder
RepositoryParameters sets the parameters for the backup repository, these mostly include the credentials.
func (*BackupRepositoryBuilder) Result ¶ added in v1.1.0
func (b *BackupRepositoryBuilder) Result() *backupdriverv1.BackupRepository
Result returns the built BackupRepository.
func (*BackupRepositoryBuilder) SvcBackupRepositoryName ¶ added in v1.1.0
func (b *BackupRepositoryBuilder) SvcBackupRepositoryName(svcBackupRepositoryName string) *BackupRepositoryBuilder
SvcBackupRepositoryName sets the name of the supervisor backup repository corresponding to this specific backup repository, if it is not empty. This is available only for guest clusters.
type BackupRepositoryClaimBuilder ¶ added in v1.1.0
type BackupRepositoryClaimBuilder struct {
// contains filtered or unexported fields
}
BackupRepositoryClaimBuilder builds BackupRepositoryClaim objects.
func ForBackupRepositoryClaim ¶ added in v1.1.0
func ForBackupRepositoryClaim(ns, name string) *BackupRepositoryClaimBuilder
func (*BackupRepositoryClaimBuilder) AllowedNamespaces ¶ added in v1.1.0
func (b *BackupRepositoryClaimBuilder) AllowedNamespaces(allowedNamespaces []string) *BackupRepositoryClaimBuilder
AllowedNamespaces sets the allowed namespaces for the backup repository claim.
func (*BackupRepositoryClaimBuilder) BackupRepository ¶ added in v1.1.0
func (b *BackupRepositoryClaimBuilder) BackupRepository(backupRepositoryName string) *BackupRepositoryClaimBuilder
BackupRepository sets the name of the backup repository for this specific backup repository claim.
func (*BackupRepositoryClaimBuilder) RepositoryDriver ¶ added in v1.1.0
func (b *BackupRepositoryClaimBuilder) RepositoryDriver() *BackupRepositoryClaimBuilder
RepositoryDriver sets the repository driver the backup repository claim. Currently only s3 is supported.
func (*BackupRepositoryClaimBuilder) RepositoryParameters ¶ added in v1.1.0
func (b *BackupRepositoryClaimBuilder) RepositoryParameters(repositoryParameters map[string]string) *BackupRepositoryClaimBuilder
RepositoryParameters sets the parameters for the backup repository claim, these mostly include the credentials.
func (*BackupRepositoryClaimBuilder) Result ¶ added in v1.1.0
func (b *BackupRepositoryClaimBuilder) Result() *backupdriverv1.BackupRepositoryClaim
Result returns the built BackupRepositoryClaim.
type CloneFromSnapshotBuilder ¶ added in v1.1.0
type CloneFromSnapshotBuilder struct {
// contains filtered or unexported fields
}
SnapshotBuilder builds Snapshot objects.
func ForCloneFromSnapshot ¶ added in v1.1.0
func ForCloneFromSnapshot(ns, name string, labels map[string]string) *CloneFromSnapshotBuilder
func (*CloneFromSnapshotBuilder) APIGroup ¶ added in v1.1.0
func (b *CloneFromSnapshotBuilder) APIGroup(apiGroup *string) *CloneFromSnapshotBuilder
func (*CloneFromSnapshotBuilder) BackupRepository ¶ added in v1.1.0
func (b *CloneFromSnapshotBuilder) BackupRepository(backupRepositoryName string) *CloneFromSnapshotBuilder
BackupRepository sets the name of the backup repository for this specific snapshot.
func (*CloneFromSnapshotBuilder) CancelState ¶ added in v1.1.0
func (b *CloneFromSnapshotBuilder) CancelState(cancelState bool) *CloneFromSnapshotBuilder
Set the spec cancel state
func (*CloneFromSnapshotBuilder) Kind ¶ added in v1.1.0
func (b *CloneFromSnapshotBuilder) Kind(kind string) *CloneFromSnapshotBuilder
func (*CloneFromSnapshotBuilder) Metadata ¶ added in v1.1.0
func (b *CloneFromSnapshotBuilder) Metadata(metadata []byte) *CloneFromSnapshotBuilder
func (*CloneFromSnapshotBuilder) Result ¶ added in v1.1.0
func (b *CloneFromSnapshotBuilder) Result() *backupdriverv1.CloneFromSnapshot
Result returns the built Snapshot.
func (*CloneFromSnapshotBuilder) SnapshotID ¶ added in v1.1.0
func (b *CloneFromSnapshotBuilder) SnapshotID(snapshotID string) *CloneFromSnapshotBuilder
type DeleteSnapshotBuilder ¶ added in v1.1.0
type DeleteSnapshotBuilder struct {
// contains filtered or unexported fields
}
DeleteSnapshotBuilder builds DeleteSnapshot objects.
func ForDeleteSnapshot ¶ added in v1.1.0
func ForDeleteSnapshot(ns, name string) *DeleteSnapshotBuilder
func (*DeleteSnapshotBuilder) BackupRepository ¶ added in v1.1.0
func (b *DeleteSnapshotBuilder) BackupRepository(backupRepositoryName string) *DeleteSnapshotBuilder
BackupRepository sets the name of the backup repository for this specific delete snapshot.
func (*DeleteSnapshotBuilder) Result ¶ added in v1.1.0
func (b *DeleteSnapshotBuilder) Result() *backupdriverv1.DeleteSnapshot
Result returns the built DeleteSnapshot.
func (*DeleteSnapshotBuilder) SnapshotID ¶ added in v1.1.0
func (b *DeleteSnapshotBuilder) SnapshotID(snapshotID string) *DeleteSnapshotBuilder
SnapshotID set the snap-id for this specific delete snapshot request.
type DownloadBuilder ¶
type DownloadBuilder struct {
// contains filtered or unexported fields
}
DownloadBuilder builds Download objects
func ForDownload ¶
func ForDownload(ns, name string) *DownloadBuilder
ForDownload is the constructor for a DownloadBuilder.
func (*DownloadBuilder) BackupRepositoryName ¶ added in v1.1.0
func (b *DownloadBuilder) BackupRepositoryName(brName string) *DownloadBuilder
BackupRepositoryName sets the backuprepository name for the to be restored volume.
func (*DownloadBuilder) CloneFromSnapshotReference ¶ added in v1.1.0
func (b *DownloadBuilder) CloneFromSnapshotReference(cloneFromSnapshotRef string) *DownloadBuilder
CloneFromSnapshotReference sets the reference to the clonefromsnapshot.
func (*DownloadBuilder) CompletionTimestamp ¶
func (b *DownloadBuilder) CompletionTimestamp(val time.Time) *DownloadBuilder
CompletionTimestamp sets the Download's end timestamp.
func (*DownloadBuilder) NextRetryTimestamp ¶
func (b *DownloadBuilder) NextRetryTimestamp(val time.Time) *DownloadBuilder
NextRetryTimestamp sets the timestamp for next retry.
func (*DownloadBuilder) ObjectMeta ¶
func (b *DownloadBuilder) ObjectMeta(opts ...ObjectMetaOpt) *DownloadBuilder
ObjectMeta applies functional options to the Download's ObjectMeta.
func (*DownloadBuilder) Phase ¶
func (b *DownloadBuilder) Phase(phase velerov1api.DownloadPhase) *DownloadBuilder
Phase sets the Download's phase.
func (*DownloadBuilder) ProcessingNode ¶
func (b *DownloadBuilder) ProcessingNode(node string) *DownloadBuilder
ProcessingNode sets the DataManager node that has picked up the Download for processing.
func (*DownloadBuilder) ProtectedEntityID ¶ added in v1.1.0
func (b *DownloadBuilder) ProtectedEntityID(id string) *DownloadBuilder
ProtectedEntityID sets the identifier for the to be restored protected entity in the Spec.
func (*DownloadBuilder) RestoreTimestamp ¶
func (b *DownloadBuilder) RestoreTimestamp(val time.Time) *DownloadBuilder
RestoreTimestamp sets the start time of download creation.
func (*DownloadBuilder) Result ¶
func (b *DownloadBuilder) Result() *velerov1api.Download
Result returns the built Download.
func (*DownloadBuilder) Retry ¶
func (b *DownloadBuilder) Retry(cnt int32) *DownloadBuilder
Retry sets the number of retry time.
func (*DownloadBuilder) SnapshotID ¶
func (b *DownloadBuilder) SnapshotID(snapshotID string) *DownloadBuilder
SnapshotID sets the Download's snapshot ID.
func (*DownloadBuilder) StartTimestamp ¶
func (b *DownloadBuilder) StartTimestamp(val time.Time) *DownloadBuilder
StartTimestamp sets the Download's start timestamp.
func (*DownloadBuilder) VolumeID ¶
func (b *DownloadBuilder) VolumeID(id string) *DownloadBuilder
VolumeID sets the identifier for the restored volume in the Status.
type ObjectMetaOpt ¶
ObjectMetaOpt is a functional option for ObjectMeta.
type SnapshotBuilder ¶ added in v1.1.0
type SnapshotBuilder struct {
// contains filtered or unexported fields
}
SnapshotBuilder builds Snapshot objects.
func ForSnapshot ¶ added in v1.1.0
func ForSnapshot(ns, name string, labels map[string]string) *SnapshotBuilder
func (*SnapshotBuilder) BackupRepository ¶ added in v1.1.0
func (b *SnapshotBuilder) BackupRepository(backupRepositoryName string) *SnapshotBuilder
BackupRepository sets the name of the backup repository for this specific snapshot.
func (*SnapshotBuilder) CancelState ¶ added in v1.1.0
func (b *SnapshotBuilder) CancelState(cancelState bool) *SnapshotBuilder
Set the spec cancel state
func (*SnapshotBuilder) ObjectReference ¶ added in v1.1.0
func (b *SnapshotBuilder) ObjectReference(objectToSnapshot core_v1.TypedLocalObjectReference) *SnapshotBuilder
Set the spec object reference
func (*SnapshotBuilder) Result ¶ added in v1.1.0
func (b *SnapshotBuilder) Result() *backupdriverv1.Snapshot
Result returns the built Snapshot.
type UploadBuilder ¶
type UploadBuilder struct {
// contains filtered or unexported fields
}
UploadBuilder builds Upload objects
func ForUpload ¶
func ForUpload(ns, name string) *UploadBuilder
ForUpload is the constructor for a UploadBuilder.
func (*UploadBuilder) BackupRepositoryName ¶ added in v1.1.0
func (b *UploadBuilder) BackupRepositoryName(backuprepo string) *UploadBuilder
BackupRepository sets the backup repository for upload.
func (*UploadBuilder) BackupTimestamp ¶
func (b *UploadBuilder) BackupTimestamp(val time.Time) *UploadBuilder
BackupTimestamp sets the start time of upload creation.
func (*UploadBuilder) CompletionTimestamp ¶
func (b *UploadBuilder) CompletionTimestamp(val time.Time) *UploadBuilder
CompletionTimestamp sets the Upload's end timestamp.
func (*UploadBuilder) CurrentBackOff ¶
func (b *UploadBuilder) CurrentBackOff(backoff int32) *UploadBuilder
CurrentBackOff sets the current backoff for upload retry.
func (*UploadBuilder) NextRetryTimestamp ¶
func (b *UploadBuilder) NextRetryTimestamp(val time.Time) *UploadBuilder
NextRetryTimestamp sets the timestamp for next retry.
func (*UploadBuilder) ObjectMeta ¶
func (b *UploadBuilder) ObjectMeta(opts ...ObjectMetaOpt) *UploadBuilder
ObjectMeta applies functional options to the Upload's ObjectMeta.
func (*UploadBuilder) Phase ¶
func (b *UploadBuilder) Phase(phase velerov1api.UploadPhase) *UploadBuilder
Phase sets the Upload's phase.
func (*UploadBuilder) ProcessingNode ¶
func (b *UploadBuilder) ProcessingNode(node string) *UploadBuilder
ProcessingNode sets the DataManager node that has picked up the Upload for processing.
func (*UploadBuilder) Result ¶
func (b *UploadBuilder) Result() *velerov1api.Upload
Result returns the built Upload.
func (*UploadBuilder) Retry ¶
func (b *UploadBuilder) Retry(cnt int32) *UploadBuilder
Retry sets the number of retry time.
func (*UploadBuilder) SnapshotID ¶
func (b *UploadBuilder) SnapshotID(snapshotID string) *UploadBuilder
SnapshotID sets the Upload's snapshot ID.
func (*UploadBuilder) SnapshotReference ¶ added in v1.1.0
func (b *UploadBuilder) SnapshotReference(snapshotRef string) *UploadBuilder
SnapshotReference sets the reference to the snapshot.
func (*UploadBuilder) StartTimestamp ¶
func (b *UploadBuilder) StartTimestamp(val time.Time) *UploadBuilder
StartTimestamp sets the Upload's start timestamp.