Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCollection ¶
func GetCollection(ientity models.IEntity) *mongo.Collection
Types ¶
type Repository ¶
func NewRepository ¶
func NewRepository[T models.IEntity]() Repository[T]
func (*Repository[T]) Delete ¶
func (repository *Repository[T]) Delete(entity T) error
func (*Repository[T]) FindAll ¶
func (repository *Repository[T]) FindAll() ([]T, error)
func (*Repository[T]) FindByID ¶
func (repository *Repository[T]) FindByID(id string) (T, error)
func (*Repository[T]) Insert ¶
func (repository *Repository[T]) Insert(entity T) error
func (*Repository[T]) Update ¶
func (repository *Repository[T]) Update(entity T) error
Click to show internal directories.
Click to hide internal directories.