entity_repository

package
v0.0.0-...-81cac2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 1 Imported by: 0

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL