Documentation
¶
Index ¶
- type PersonList
- func (pl *PersonList) AddPerson(ctx context.Context, person *models.Person) (id int64, err error)
- func (pl *PersonList) EditPerson(ctx context.Context, person *models.Person) (err error)
- func (pl *PersonList) GetList() (personList []models.Person, err error)
- func (pl *PersonList) GetPerson(ctx context.Context, id int64) (person *models.Person, err error)
- func (pl *PersonList) RemovePerson(ctx context.Context, id int64) (err error)
- type PersonProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PersonList ¶
type PersonList struct {
// contains filtered or unexported fields
}
func New ¶
func New(log *slog.Logger, personProvider PersonProvider) *PersonList
func (*PersonList) EditPerson ¶
func (*PersonList) GetList ¶
func (pl *PersonList) GetList() (personList []models.Person, err error)
func (*PersonList) RemovePerson ¶
func (pl *PersonList) RemovePerson(ctx context.Context, id int64) (err error)
type PersonProvider ¶
type PersonProvider interface { AddPerson(ctx context.Context, person *models.Person) (int64, error) GetPerson(ctx context.Context, id int64) (*models.Person, error) EditPerson(ctx context.Context, person *models.Person) error RemovePerson(ctx context.Context, id int64) error GetList() ([]models.Person, error) }
Click to show internal directories.
Click to hide internal directories.