implementations

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SubmissionsRabbitMQQueueManager

type SubmissionsRabbitMQQueueManager struct {
	SubmissionsQueue *amqp.Queue
}

func GetSubmissionsRabbitMQQueueManagerInstance

func GetSubmissionsRabbitMQQueueManagerInstance() *SubmissionsRabbitMQQueueManager

func (*SubmissionsRabbitMQQueueManager) QueueWork

func (queueManager *SubmissionsRabbitMQQueueManager) QueueWork(work *entities.SubmissionWork) (err error)

Methods implementation

type SubmissionsRealTimeUpdatesQueueMgr added in v0.42.0

type SubmissionsRealTimeUpdatesQueueMgr struct {
	Queue   *amqp.Queue
	Channel <-chan amqp.Delivery
}

func GetSubmissionsRealTimeUpdatesQueueMgrInstance added in v0.42.0

func GetSubmissionsRealTimeUpdatesQueueMgrInstance() *SubmissionsRealTimeUpdatesQueueMgr

func (*SubmissionsRealTimeUpdatesQueueMgr) ListenForUpdates added in v0.42.0

func (queueMgr *SubmissionsRealTimeUpdatesQueueMgr) ListenForUpdates()

ListenForUpdates listens for updates in the submission real time updates queue

type SubmissionsRealTimeUpdatesSender added in v0.42.0

type SubmissionsRealTimeUpdatesSender struct {
	// New updates are pushed to this channel
	Updates UpdatesChannel

	// All the open connections
	OpenConnections map[string]UpdatesChannel
}

func GetSubmissionsRealTimeUpdatesSenderInstance added in v0.42.0

func GetSubmissionsRealTimeUpdatesSenderInstance() *SubmissionsRealTimeUpdatesSender

func (*SubmissionsRealTimeUpdatesSender) CreateChannel added in v0.42.0

func (sender *SubmissionsRealTimeUpdatesSender) CreateChannel(submissionUUID string) *UpdatesChannel

Create a channel for a submission

func (*SubmissionsRealTimeUpdatesSender) DeleteChannel added in v0.42.0

func (sender *SubmissionsRealTimeUpdatesSender) DeleteChannel(submissionUUID string)

Delete a channel for a submission

func (*SubmissionsRealTimeUpdatesSender) Listen added in v0.42.0

func (sender *SubmissionsRealTimeUpdatesSender) Listen()

listen listens for new updates and new connections

func (*SubmissionsRealTimeUpdatesSender) SendUpdate added in v0.42.0

SendUpdate sends an update to the updates channel

type SubmissionsRepositoryImpl

type SubmissionsRepositoryImpl struct {
	Connection *sql.DB
}

func GetSubmissionsRepositoryInstance

func GetSubmissionsRepositoryInstance() *SubmissionsRepositoryImpl

func (*SubmissionsRepositoryImpl) GetStudentSubmission

func (repository *SubmissionsRepositoryImpl) GetStudentSubmission(studentUUID string, testBlockUUID string) (submission *entities.Submission, err error)

func (*SubmissionsRepositoryImpl) GetStudentSubmissionArchiveUUIDFromSubmissionUUID

func (repository *SubmissionsRepositoryImpl) GetStudentSubmissionArchiveUUIDFromSubmissionUUID(submissionUUID string) (archiveUUID string, err error)

func (*SubmissionsRepositoryImpl) GetSubmissionWorkMetadata

func (repository *SubmissionsRepositoryImpl) GetSubmissionWorkMetadata(submissionUUID string) (submissionWorkMetadata *entities.SubmissionWork, err error)

func (*SubmissionsRepositoryImpl) ResetSubmissionStatus

func (repository *SubmissionsRepositoryImpl) ResetSubmissionStatus(submissionUUID string) (err error)

func (*SubmissionsRepositoryImpl) SaveSubmission

func (repository *SubmissionsRepositoryImpl) SaveSubmission(dto *dtos.CreateSubmissionDTO) (submissionUUID string, err error)

type UpdatesChannel added in v0.42.0

type UpdatesChannel chan *dtos.SubmissionStatusUpdateDTO

Jump to

Keyboard shortcuts

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