Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorCode(err error) string
- func NewDB(cfg *config.Container) db.EngineMaker
- func NewUserRepository(db db.EngineMaker) user.UserRepositoryPort
- type UserRepository
- func (r *UserRepository) DeleteAll(ctx context.Context) error
- func (r *UserRepository) DeleteOne(ctx context.Context, id uuid.UUID) error
- func (r *UserRepository) GetByEmail(ctx context.Context, email string) (entity.User, error)
- func (r *UserRepository) GetByID(ctx context.Context, id uuid.UUID) (entity.User, error)
- func (r *UserRepository) Insert(ctx context.Context, userModel *entity.User) (*uuid.UUID, error)
- func (r *UserRepository) Update(ctx context.Context, userModel *entity.User) (*entity.User, error)
Constants ¶
View Source
const ( ForeignKeyViolation = "23503" UniqueViolation = "23505" )
Variables ¶
View Source
var ErrRecordNotFound = pgx.ErrNoRows
View Source
var ErrUniqueViolation = &pgconn.PgError{ Code: UniqueViolation, }
View Source
var (
UserRepositorySet = wire.NewSet(NewUserRepository)
)
Functions ¶
func NewUserRepository ¶
func NewUserRepository(db db.EngineMaker) user.UserRepositoryPort
Types ¶
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func (*UserRepository) GetByEmail ¶
Click to show internal directories.
Click to hide internal directories.