Documentation ¶
Index ¶
- type AuthDBRepository
- type ClassDBRepository
- func (r *ClassDBRepository) CountAll(ctx context.Context) (uint32, error)
- func (r *ClassDBRepository) CreateOrReplace(ctx context.Context, class *domain.Class) error
- func (r *ClassDBRepository) CreateQuizClassVisibility(ctx context.Context, quizSha1 string, classId uuid.UUID) error
- func (r *ClassDBRepository) Delete(ctx context.Context, classId uuid.UUID) error
- func (r *ClassDBRepository) DeleteQuizClassVisibility(ctx context.Context, quizSha1 string, classId uuid.UUID) error
- func (r *ClassDBRepository) ExistsById(ctx context.Context, classId uuid.UUID) bool
- func (r *ClassDBRepository) FindAll(ctx context.Context, limit uint16, offset uint16) ([]*domain.Class, error)
- type ConnectionWrapper
- type GithubAccessTokenCaller
- type HealthDBRepository
- type MaintenanceDBRepository
- type QuizDBRepository
- func (r *QuizDBRepository) ActivateOnlyVersion(ctx context.Context, filename string, version int) error
- func (r *QuizDBRepository) AddSessionAnswer(ctx context.Context, sessionUuid uuid.UUID, questionSha1 string, ...) error
- func (r *QuizDBRepository) CountAllActive(ctx context.Context, userId string) (uint32, error)
- func (r *QuizDBRepository) CountAllSessions(ctx context.Context, quizActive bool, userId string) (uint32, error)
- func (r *QuizDBRepository) Create(ctx context.Context, quiz *domain.Quiz) error
- func (r *QuizDBRepository) FindAllActive(ctx context.Context, userId string, limit uint16, offset uint16) ([]*domain.Quiz, error)
- func (r *QuizDBRepository) FindAllQuizSessions(ctx context.Context, userId string, classId string, limit uint16, ...) ([]*domain.QuizSession, error)
- func (r *QuizDBRepository) FindAllSessions(ctx context.Context, quizActive bool, userId string, limit uint16, ...) ([]*domain.Session, error)
- func (r *QuizDBRepository) FindFullBySha1(ctx context.Context, sha1 string, userId string) (*domain.Quiz, error)
- func (r *QuizDBRepository) FindLatestVersionByFilename(ctx context.Context, filename string) (*domain.Quiz, error)
- func (r *QuizDBRepository) FindQuizSessionByUuid(ctx context.Context, sessionUuid uuid.UUID) (*domain.QuizSessionDetail, error)
- func (r *QuizDBRepository) StartSession(ctx context.Context, userId string, quizSha1 string) (uuid.UUID, error)
- type UserDBRepository
- func (r *UserDBRepository) AssignUserToClass(ctx context.Context, userId string, classId uuid.UUID) error
- func (r *UserDBRepository) CreateOrReplaceUser(ctx context.Context, user *domain.User) error
- func (r *UserDBRepository) FindActiveUserById(ctx context.Context, id string) (*domain.User, error)
- func (r *UserDBRepository) FindAllUser(ctx context.Context) ([]*domain.User, error)
- func (r *UserDBRepository) FindUserById(ctx context.Context, id string) (*domain.User, error)
- func (r *UserDBRepository) UpdateUserActive(ctx context.Context, id string, active bool) error
- func (r *UserDBRepository) UpdateUserInfo(ctx context.Context, user *domain.User) error
- func (r *UserDBRepository) UpdateUserRole(ctx context.Context, userId string, role domain.Role) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthDBRepository ¶
type AuthDBRepository struct { domain.AuthRepository // contains filtered or unexported fields }
func NewAuthRepository ¶
func NewAuthRepository() *AuthDBRepository
func (*AuthDBRepository) CacheToken ¶
func (r *AuthDBRepository) CacheToken(token *domain.AccessToken) error
func (*AuthDBRepository) FindTokenByTokenStr ¶
func (r *AuthDBRepository) FindTokenByTokenStr(tokenStr string) (*domain.AccessToken, error)
type ClassDBRepository ¶
type ClassDBRepository struct { domain.ClassRepository // contains filtered or unexported fields }
func NewClassRepository ¶
func NewClassRepository(w *ConnectionWrapper) *ClassDBRepository
func (*ClassDBRepository) CountAll ¶
func (r *ClassDBRepository) CountAll(ctx context.Context) (uint32, error)
func (*ClassDBRepository) CreateOrReplace ¶
func (*ClassDBRepository) CreateQuizClassVisibility ¶
func (*ClassDBRepository) DeleteQuizClassVisibility ¶
func (*ClassDBRepository) ExistsById ¶
type ConnectionWrapper ¶
type ConnectionWrapper struct {
// contains filtered or unexported fields
}
func NewConnectionWrapper ¶
func NewConnectionWrapper(dbLocation string) *ConnectionWrapper
func (*ConnectionWrapper) Close ¶
func (w *ConnectionWrapper) Close() error
type GithubAccessTokenCaller ¶
type GithubAccessTokenCaller struct { domain.AccessTokenCaller // contains filtered or unexported fields }
func NewGithubAccessTokenCaller ¶
func NewGithubAccessTokenCaller() *GithubAccessTokenCaller
func (*GithubAccessTokenCaller) Get ¶
func (c *GithubAccessTokenCaller) Get(ctx context.Context, token string) (*domain.AccessToken, error)
type HealthDBRepository ¶
type HealthDBRepository struct { domain.HealthRepository // contains filtered or unexported fields }
func NewHealthRepository ¶
func NewHealthRepository(w *ConnectionWrapper) *HealthDBRepository
type MaintenanceDBRepository ¶
type MaintenanceDBRepository struct { domain.MaintenanceRepository // contains filtered or unexported fields }
func NewMaintenanceRepository ¶
func NewMaintenanceRepository(w *ConnectionWrapper) *MaintenanceDBRepository
func (*MaintenanceDBRepository) Dump ¶
func (r *MaintenanceDBRepository) Dump() (fullDbLocation string, err error)
type QuizDBRepository ¶
type QuizDBRepository struct { domain.QuizRepository // contains filtered or unexported fields }
func NewQuizRepository ¶
func NewQuizRepository(w *ConnectionWrapper) *QuizDBRepository
func (*QuizDBRepository) ActivateOnlyVersion ¶
func (*QuizDBRepository) AddSessionAnswer ¶
func (*QuizDBRepository) CountAllActive ¶
func (*QuizDBRepository) CountAllSessions ¶
func (*QuizDBRepository) FindAllActive ¶
func (*QuizDBRepository) FindAllQuizSessions ¶
func (r *QuizDBRepository) FindAllQuizSessions(ctx context.Context, userId string, classId string, limit uint16, offset uint16) ([]*domain.QuizSession, error)
func (*QuizDBRepository) FindAllSessions ¶
func (*QuizDBRepository) FindFullBySha1 ¶
func (*QuizDBRepository) FindLatestVersionByFilename ¶
func (*QuizDBRepository) FindQuizSessionByUuid ¶
func (r *QuizDBRepository) FindQuizSessionByUuid(ctx context.Context, sessionUuid uuid.UUID) (*domain.QuizSessionDetail, error)
func (*QuizDBRepository) StartSession ¶
type UserDBRepository ¶
type UserDBRepository struct { domain.UserRepository // contains filtered or unexported fields }
func NewUserRepository ¶
func NewUserRepository(w *ConnectionWrapper) *UserDBRepository
func (*UserDBRepository) AssignUserToClass ¶
func (*UserDBRepository) CreateOrReplaceUser ¶
func (*UserDBRepository) FindActiveUserById ¶
func (*UserDBRepository) FindAllUser ¶
func (*UserDBRepository) FindUserById ¶
func (*UserDBRepository) UpdateUserActive ¶
func (*UserDBRepository) UpdateUserInfo ¶
func (*UserDBRepository) UpdateUserRole ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.