util

package
v1.1.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAllKeysExistInSecret

func CheckAllKeysExistInSecret(secret *corev1.Secret, keys ...string) (string, bool)

CheckAllKeysExistInSecret check if all keys are included in the specific secret

func GenerateGcsCertEnvVar

func GenerateGcsCertEnvVar(gcs *v1alpha1.GcsStorageProvider) ([]corev1.EnvVar, string, error)

GenerateGcsCertEnvVar generate the env info in order to access google cloud storage

func GenerateS3CertEnvVar

func GenerateS3CertEnvVar(s3 *v1alpha1.S3StorageProvider) ([]corev1.EnvVar, string, error)

GenerateS3CertEnvVar generate the env info in order to access S3 compliant storage

func GenerateStorageCertEnv

func GenerateStorageCertEnv(ns string, provider v1alpha1.StorageProvider, secretLister corelisters.SecretLister) ([]corev1.EnvVar, string, error)

GenerateStorageCertEnv generate the env info in order to access backend backup storage

func GenerateTidbPasswordEnv

func GenerateTidbPasswordEnv(ns, name, tidbSecretName string, secretLister corelisters.SecretLister) ([]corev1.EnvVar, string, error)

GenerateTidbPasswordEnv generate the password EnvVar

func GetBackupBucketName

func GetBackupBucketName(backup *v1alpha1.Backup) (string, string, error)

GetBackupBucketName return the bucket name for remote storage

func GetBackupDataPath

func GetBackupDataPath(provider v1alpha1.StorageProvider) (string, string, error)

GetBackupDataPath return the full path of backup data

func GetStorageType

func GetStorageType(provider v1alpha1.StorageProvider) v1alpha1.BackupStorageType

GetStorageType return the backup storage type according to the specified StorageProvider

func ValidateBackup

func ValidateBackup(backup *v1alpha1.Backup) error

func ValidateRestore

func ValidateRestore(restore *v1alpha1.Restore) error

ValidateRestore checks whether a restore spec is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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