123456789101112 |
- package dbmanager
- // DbManager defines the interface for database operations
- type DbManager[T Entity] interface {
- Connect() error
- Disconnect() error
- Create(entityType string, entity T) error
- GetByID(entityType string, id string) (T, error)
- Update(entityType string, entity T) error
- Delete(entityType string, id string) error
- List(entityType string, filter map[string]interface{}) ([]T, error)
- }
|