Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityRepository ¶
type EntityRepository[e any] struct { // contains filtered or unexported fields }
func NewRepository ¶
func NewRepository[e any](db *gorm.DB) *EntityRepository[e]
func (*EntityRepository[e]) Create ¶
func (r *EntityRepository[e]) Create(entity *e) (*e, error)
func (*EntityRepository[e]) Delete ¶
func (r *EntityRepository[e]) Delete(entity *e) error
func (*EntityRepository[e]) GetAll ¶
func (r *EntityRepository[e]) GetAll() ([]*e, error)
func (*EntityRepository[e]) GetByID ¶
func (r *EntityRepository[e]) GetByID(id uint) (*e, error)
func (*EntityRepository[e]) Update ¶
func (r *EntityRepository[e]) Update(entity *e) (*e, error)
Click to show internal directories.
Click to hide internal directories.