Documentation ¶
Index ¶
- type DatabaseRepository
- func (repo *DatabaseRepository) Add(ctx context.Context, name string) (int, error)
- func (repo *DatabaseRepository) FetchAll(ctx context.Context) ([]app.User, error)
- func (repo *DatabaseRepository) FetchByID(ctx context.Context, id int) (*app.User, error)
- func (repo *DatabaseRepository) Ping(ctx context.Context) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseRepository ¶
type DatabaseRepository struct {
// contains filtered or unexported fields
}
DatabaseRepository implements the UserRepository interface.
func NewDatabaseRepository ¶
func NewDatabaseRepository(db *pgxpool.Pool) *DatabaseRepository
NewDatabaseRepository returns a new DatabaseRepository.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service wraps the user repository.
func NewService ¶
func NewService(repo app.UserRepository) *Service
NewService returns a new Service.
Click to show internal directories.
Click to hide internal directories.