Documentation
¶
Index ¶
- type MySQLDekRepository
- func (m *MySQLDekRepository) Create(ctx context.Context, dek *cryptoDomain.Dek) error
- func (m *MySQLDekRepository) Get(ctx context.Context, dekID uuid.UUID) (*cryptoDomain.Dek, error)
- func (m *MySQLDekRepository) GetBatchNotKekID(ctx context.Context, kekID uuid.UUID, limit int) ([]*cryptoDomain.Dek, error)
- func (m *MySQLDekRepository) Update(ctx context.Context, dek *cryptoDomain.Dek) error
- type MySQLKekRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLDekRepository ¶
type MySQLDekRepository struct {
// contains filtered or unexported fields
}
MySQLDekRepository implements DEK persistence for MySQL. Uses BINARY(16) for UUIDs and BLOB for binary data with transaction support.
func NewMySQLDekRepository ¶
func NewMySQLDekRepository(db *sql.DB) *MySQLDekRepository
NewMySQLDekRepository creates a new MySQL DEK repository.
func (*MySQLDekRepository) Create ¶
func (m *MySQLDekRepository) Create(ctx context.Context, dek *cryptoDomain.Dek) error
Create inserts a new DEK into the MySQL database.
func (*MySQLDekRepository) Get ¶
func (m *MySQLDekRepository) Get(ctx context.Context, dekID uuid.UUID) (*cryptoDomain.Dek, error)
Get retrieves a DEK by its ID from the MySQL database.
func (*MySQLDekRepository) GetBatchNotKekID ¶
func (m *MySQLDekRepository) GetBatchNotKekID( ctx context.Context, kekID uuid.UUID, limit int, ) ([]*cryptoDomain.Dek, error)
GetBatchNotKekID retrieves a batch of DEKs that are not encrypted with the given KEK ID.
func (*MySQLDekRepository) Update ¶
func (m *MySQLDekRepository) Update(ctx context.Context, dek *cryptoDomain.Dek) error
Update modifies an existing DEK in the MySQL database.
type MySQLKekRepository ¶
type MySQLKekRepository struct {
// contains filtered or unexported fields
}
MySQLKekRepository implements KEK persistence for MySQL. Uses BINARY(16) for UUIDs and BLOB for binary data with transaction support.
func NewMySQLKekRepository ¶
func NewMySQLKekRepository(db *sql.DB) *MySQLKekRepository
NewMySQLKekRepository creates a new MySQL KEK repository.
func (*MySQLKekRepository) Create ¶
func (m *MySQLKekRepository) Create(ctx context.Context, kek *cryptoDomain.Kek) error
Create inserts a new KEK into the MySQL database.
func (*MySQLKekRepository) List ¶
func (m *MySQLKekRepository) List(ctx context.Context) ([]*cryptoDomain.Kek, error)
List retrieves all KEKs ordered by version descending (newest first).
func (*MySQLKekRepository) Update ¶
func (m *MySQLKekRepository) Update(ctx context.Context, kek *cryptoDomain.Kek) error
Update modifies an existing KEK in the MySQL database.