package data // An interface to manage generic structure objects persistently. Should use an // IDatastore as the interface that actually stores and retrieves the data from // an external source. type IRepository[T IIdentifiable] interface { Create(t T) error Update(t T) error Delete(t T) error GetAll() ([]T, error) GetById(id string) (T, error) GetByCriteria(c ISortCriteria[T]) ([]T, error) }