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:
10
repositories/index.go
Normal file
10
repositories/index.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user