SubmissionSource

Supplies submission metadata and bounded file downloads in Hanami-owned models.

Implementations must validate authenticated file URLs before attaching the supplied token and must stop reading once the caller's byte limit is exceeded.

Functions

Link copied to clipboard
abstract suspend fun downloadFile(file: SubmissionFileReference, token: String, maxBytes: Int): ByteArray

Downloads file without buffering more than maxBytes.

Link copied to clipboard
abstract suspend fun exercise(exerciseId: Long, token: String): ExerciseRecord

Returns grading metadata for exerciseId as visible to token.

Link copied to clipboard
abstract suspend fun gradingSubmissions(courseId: Long, exerciseId: Long, token: String): List<GradingSubmissionSummary>

Returns grading summaries for every submission to exerciseId.

Link copied to clipboard
abstract suspend fun submission(submissionId: Long, token: String): SubmissionRecord

Returns metadata for submissionId as visible to token.

Link copied to clipboard
abstract suspend fun submissionTags(courseId: Long, exerciseId: Long, token: String): Map<Long, List<String>>

Returns normalized tag slugs grouped by submission ID.