Documentation ¶
Index ¶
- type MentorRepository
- func (m *MentorRepository) CreateMentor(ctx context.Context, tx *sqlx.Tx, name string) error
- func (m *MentorRepository) DeleteMentor(ctx context.Context, tx *sqlx.Tx, id int) error
- func (m *MentorRepository) GetMentor(ctx context.Context, id int) (model.Mentor, error)
- func (m *MentorRepository) RunInTx(ctx context.Context, fn func(*sqlx.Tx) error) error
- func (m *MentorRepository) UpdateMentor(ctx context.Context, tx *sqlx.Tx, mentor model.Mentor) error
- type StudentRepo
- func (r *StudentRepo) CreateNewStudent(ctx context.Context, tx *sqlx.Tx, name string, role string) error
- func (r *StudentRepo) DeleteStudent(ctx context.Context, tx *sqlx.Tx, id int) error
- func (r *StudentRepo) GetStudent(ctx context.Context, id int) (model.Student, error)
- func (r *StudentRepo) RunInTx(ctx context.Context, fn func(*sqlx.Tx) error) error
- func (r *StudentRepo) UpdateStudent(ctx context.Context, tx *sqlx.Tx, student model.Student) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MentorRepository ¶
type MentorRepository struct {
// contains filtered or unexported fields
}
func NewMentorRepo ¶
func NewMentorRepo(logger *zap.Logger, db *db.PgDb) *MentorRepository
func (*MentorRepository) CreateMentor ¶
func (*MentorRepository) DeleteMentor ¶
func (*MentorRepository) UpdateMentor ¶
type StudentRepo ¶
type StudentRepo struct {
// contains filtered or unexported fields
}
Stores Student Info
func NewStudentRepo ¶
func NewStudentRepo(logger *zap.Logger, db *db.PgDb) *StudentRepo
func (*StudentRepo) CreateNewStudent ¶
func (r *StudentRepo) CreateNewStudent(ctx context.Context, tx *sqlx.Tx, name string, role string) error
Create A New Student
func (*StudentRepo) DeleteStudent ¶
Delete a Student
func (*StudentRepo) GetStudent ¶
Get Student, Without TX
func (*StudentRepo) UpdateStudent ¶
Click to show internal directories.
Click to hide internal directories.