Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPersonRepository ¶
type IPersonRepository interface { Create(person *model.Person) (*model.Person, error) Delete(personId uint) (*model.Person, error) FindAll() ([]model.Person, error) GetByID(personId uint) (*model.Person, error) }
IPersonRepository defines the interface for person repository operations.
func NewPersonRepository ¶
func NewPersonRepository(db *gorm.DB) IPersonRepository
NewPersonRepository creates a new instance of PersonRepository.
type PersonRepository ¶
PersonRepository implements the IPersonRepository interface.
func (*PersonRepository) Delete ¶
func (r *PersonRepository) Delete(personId uint) (*model.Person, error)
Delete removes a person record from the database by its ID.
Click to show internal directories.
Click to hide internal directories.