feat: implement repository layer for data access

- Add CertificateRepository with CRUD operations
- Implement CertificateAuthorityRepository for CA management
- Add CertificateRequestRepository for CSR handling
- Include UserRepository and OrganizationRepository
- Implement proper error handling and validation
- Add support for soft deletes and relationships
- Include query optimization and filtering capabilities
This commit is contained in:
Björn Benouarets
2025-09-30 11:44:40 +02:00
parent 6e817a8bd2
commit ccf65ec6c6
6 changed files with 369 additions and 0 deletions

10
repositories/index.go Normal file
View File

@@ -0,0 +1,10 @@
package repositories
type Repository interface {
GetByID(id string) (interface{}, error) // Get a single entity by ID
GetAll() ([]interface{}, error) // Get all entities
Create(entity interface{}) error // Create a new entity
Update(entity interface{}) error // Update an entity
Delete(id string) error // Delete an entity by ID
HardDelete(entity interface{}) error // Hard delete an entity
}