backup

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupMetadata

type BackupMetadata struct {
	KeyID        string
	Algorithm    string
	Version      int
	CreatedAt    time.Time
	BackupHash   string
	EncryptedKey []byte
	Tags         map[string]string
}

type BackupStatus

type BackupStatus string
const (
	StatusPending   BackupStatus = "pending"
	StatusComplete  BackupStatus = "complete"
	StatusVerified  BackupStatus = "verified"
	StatusCorrupted BackupStatus = "corrupted"
)

type KeyBackupManager

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

func NewKeyBackupManager

func NewKeyBackupManager(
	keyStore *keystore.HSMKeyStore,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) (*KeyBackupManager, error)

func (*KeyBackupManager) BackupKey

func (m *KeyBackupManager) BackupKey(ctx context.Context, keyID string, keyData []byte) error

func (*KeyBackupManager) RestoreKey

func (m *KeyBackupManager) RestoreKey(ctx context.Context, keyID string) ([]byte, error)

type QuantumBackup

type QuantumBackup struct {
	ID            string
	KeyID         string
	Algorithm     string
	CreatedAt     time.Time
	ExpiresAt     time.Time
	Status        BackupStatus
	DataHash      string
	BackupHash    string
	VerifiedCount int
	Metadata      map[string]interface{}
}

type QuantumBackupManager

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

func NewQuantumBackupManager

func NewQuantumBackupManager(
	keyExchange *quantum.KeyExchange,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *QuantumBackupManager

func (*QuantumBackupManager) CreateBackup

func (qb *QuantumBackupManager) CreateBackup(ctx context.Context, keyID string, data []byte, metadata map[string]interface{}) (*QuantumBackup, error)

func (*QuantumBackupManager) VerifyBackup

func (qb *QuantumBackupManager) VerifyBackup(ctx context.Context, backupID string) error

Jump to

Keyboard shortcuts

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