MCPcopy Create free account
hub / github.com/StevenYangCoder/dbkeeper-core / SnapshotsRepository

Interface SnapshotsRepository

internal/application/service.go:38–45  ·  view source on GitHub ↗

SnapshotsRepository 定义快照元数据持久化接口。 负责初始化数据库结构和插入备份记录。 使用场景:存储本地和远程备份的元数据信息,支持历史查询和审计。 默认实现:internal/infrastructure/persistence.SQLiteRepository

Source from the content-addressed store, hash-verified

36// 使用场景:存储本地和远程备份的元数据信息,支持历史查询和审计。
37// 默认实现:internal/infrastructure/persistence.SQLiteRepository
38type SnapshotsRepository interface {
39 // InitSchema 初始化数据库表结构(幂等操作,可重复调用)。
40 InitSchema(ctx context.Context) error
41 // InsertSnapshotsAttachment 插入本地备份元数据记录。
42 InsertSnapshotsAttachment(ctx context.Context, att domain.SnapshotAttachment) error
43 // InsertStorageSnapshotsAttachment 插入远端存储备份元数据记录。
44 InsertStorageSnapshotsAttachment(ctx context.Context, att domain.StorageSnapshotAttachment) error
45}
46
47// IDGenerator 定义 ID 生成器接口。
48// 使用场景:为本地备份记录和远端存储记录生成全局唯一的主键 ID。

Callers 3

RunMethod · 0.65
executeSnapshotMethod · 0.65
saveStorageMetadataMethod · 0.65

Implementers 1

SQLiteRepositoryinternal/infrastructure/persistence/sq

Calls

no outgoing calls

Tested by

no test coverage detected