infrastructure

package
v0.0.0-...-8d61d97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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 (r *ClassDBRepository) CreateOrReplace(ctx context.Context, class *domain.Class) error

func (*ClassDBRepository) CreateQuizClassVisibility

func (r *ClassDBRepository) CreateQuizClassVisibility(ctx context.Context, quizSha1 string, classId uuid.UUID) error

func (*ClassDBRepository) Delete

func (r *ClassDBRepository) Delete(ctx context.Context, classId uuid.UUID) error

func (*ClassDBRepository) DeleteQuizClassVisibility

func (r *ClassDBRepository) DeleteQuizClassVisibility(ctx context.Context, quizSha1 string, classId uuid.UUID) error

func (*ClassDBRepository) ExistsById

func (r *ClassDBRepository) ExistsById(ctx context.Context, classId uuid.UUID) bool

func (*ClassDBRepository) FindAll

func (r *ClassDBRepository) FindAll(ctx context.Context, limit uint16, offset uint16) ([]*domain.Class, error)

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

type HealthDBRepository

type HealthDBRepository struct {
	domain.HealthRepository
	// contains filtered or unexported fields
}

func NewHealthRepository

func NewHealthRepository(w *ConnectionWrapper) *HealthDBRepository

func (*HealthDBRepository) Ping

func (r *HealthDBRepository) Ping(ctx context.Context) bool

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 (r *QuizDBRepository) ActivateOnlyVersion(ctx context.Context, filename string, version int) error

func (*QuizDBRepository) AddSessionAnswer

func (r *QuizDBRepository) AddSessionAnswer(ctx context.Context, sessionUuid uuid.UUID, questionSha1 string, answerSha1 string, checked bool) error

func (*QuizDBRepository) CountAllActive

func (r *QuizDBRepository) CountAllActive(ctx context.Context, userId string) (uint32, error)

func (*QuizDBRepository) CountAllSessions

func (r *QuizDBRepository) CountAllSessions(ctx context.Context, quizActive bool, userId string) (uint32, error)

func (*QuizDBRepository) Create

func (r *QuizDBRepository) Create(ctx context.Context, quiz *domain.Quiz) error

func (*QuizDBRepository) FindAllActive

func (r *QuizDBRepository) FindAllActive(ctx context.Context, userId string, limit uint16, offset uint16) ([]*domain.Quiz, error)

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 (r *QuizDBRepository) FindAllSessions(ctx context.Context, quizActive bool, userId string, limit uint16, offset uint16) ([]*domain.Session, error)

func (*QuizDBRepository) FindFullBySha1

func (r *QuizDBRepository) FindFullBySha1(ctx context.Context, sha1 string, userId string) (*domain.Quiz, error)

func (*QuizDBRepository) FindLatestVersionByFilename

func (r *QuizDBRepository) FindLatestVersionByFilename(ctx context.Context, filename string) (*domain.Quiz, error)

func (*QuizDBRepository) FindQuizSessionByUuid

func (r *QuizDBRepository) FindQuizSessionByUuid(ctx context.Context, sessionUuid uuid.UUID) (*domain.QuizSessionDetail, error)

func (*QuizDBRepository) StartSession

func (r *QuizDBRepository) StartSession(ctx context.Context, userId string, quizSha1 string) (uuid.UUID, error)

type UserDBRepository

type UserDBRepository struct {
	domain.UserRepository
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository(w *ConnectionWrapper) *UserDBRepository

func (*UserDBRepository) AssignUserToClass

func (r *UserDBRepository) AssignUserToClass(ctx context.Context, userId string, classId uuid.UUID) error

func (*UserDBRepository) CreateOrReplaceUser

func (r *UserDBRepository) CreateOrReplaceUser(ctx context.Context, user *domain.User) error

func (*UserDBRepository) FindActiveUserById

func (r *UserDBRepository) FindActiveUserById(ctx context.Context, id string) (*domain.User, error)

func (*UserDBRepository) FindAllUser

func (r *UserDBRepository) FindAllUser(ctx context.Context) ([]*domain.User, error)

func (*UserDBRepository) FindUserById

func (r *UserDBRepository) FindUserById(ctx context.Context, id string) (*domain.User, error)

func (*UserDBRepository) UpdateUserActive

func (r *UserDBRepository) UpdateUserActive(ctx context.Context, id string, active bool) error

func (*UserDBRepository) UpdateUserInfo

func (r *UserDBRepository) UpdateUserInfo(ctx context.Context, user *domain.User) error

func (*UserDBRepository) UpdateUserRole

func (r *UserDBRepository) UpdateUserRole(ctx context.Context, userId string, role domain.Role) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL