Skip to main content

api

import "github.com/Ask-Atlas/AskAtlas/api/internal/api"

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.

Package api provides the HTTP handlers, structural models, and OpenAPI bindings for the application.

Index

Constants

const (
BearerAuthScopes = "BearerAuth.Scopes"
)

func BearerAuthFunc

func BearerAuthFunc(_ context.Context, input *openapi3filter.AuthenticationInput) error

BearerAuthFunc is an openapi3filter.AuthenticationFunc that asserts the operation's security scheme is HTTP bearer and that an Authorization: Bearer header is present. It does not verify the token.

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func OAPIStrictErrorHandler

func OAPIStrictErrorHandler(w http.ResponseWriter, r *http.Request, err error)

OAPIStrictErrorHandler handles binding errors from the structural request parsing generated by oapi-codegen.

func OAPIValidatorErrorHandler

func OAPIValidatorErrorHandler(w http.ResponseWriter, message string, statusCode int)

OAPIValidatorErrorHandler is a custom ErrorHandler for the OpenAPI request validator middleware.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

type AppError

AppError Standardized error response structure matching application error domains

type AppError struct {
Code int `json:"code"`
Details *map[string]string `json:"details,omitempty"`
Message string `json:"message"`
Status string `json:"status"`
}

type AttachFile201JSONResponse

type AttachFile201JSONResponse FileAttachmentResponse

func (AttachFile201JSONResponse) VisitAttachFileResponse

func (response AttachFile201JSONResponse) VisitAttachFileResponse(w http.ResponseWriter) error

type AttachFile400JSONResponse

type AttachFile400JSONResponse struct{ BadRequestJSONResponse }

func (AttachFile400JSONResponse) VisitAttachFileResponse

func (response AttachFile400JSONResponse) VisitAttachFileResponse(w http.ResponseWriter) error

type AttachFile401JSONResponse

type AttachFile401JSONResponse struct{ UnauthorizedJSONResponse }

func (AttachFile401JSONResponse) VisitAttachFileResponse

func (response AttachFile401JSONResponse) VisitAttachFileResponse(w http.ResponseWriter) error

type AttachFile403JSONResponse

type AttachFile403JSONResponse struct{ ForbiddenJSONResponse }

func (AttachFile403JSONResponse) VisitAttachFileResponse

func (response AttachFile403JSONResponse) VisitAttachFileResponse(w http.ResponseWriter) error

type AttachFile404JSONResponse

type AttachFile404JSONResponse struct{ NotFoundJSONResponse }

func (AttachFile404JSONResponse) VisitAttachFileResponse

func (response AttachFile404JSONResponse) VisitAttachFileResponse(w http.ResponseWriter) error

type AttachFile409JSONResponse

type AttachFile409JSONResponse struct{ ConflictJSONResponse }

func (AttachFile409JSONResponse) VisitAttachFileResponse

func (response AttachFile409JSONResponse) VisitAttachFileResponse(w http.ResponseWriter) error

type AttachFile500JSONResponse

type AttachFile500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (AttachFile500JSONResponse) VisitAttachFileResponse

func (response AttachFile500JSONResponse) VisitAttachFileResponse(w http.ResponseWriter) error

type AttachFileRequestObject

type AttachFileRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
FileId openapi_types.UUID `json:"file_id"`
}

type AttachFileResponseObject

type AttachFileResponseObject interface {
VisitAttachFileResponse(w http.ResponseWriter) error
}

type AttachResource201JSONResponse

type AttachResource201JSONResponse ResourceSummary

func (AttachResource201JSONResponse) VisitAttachResourceResponse

func (response AttachResource201JSONResponse) VisitAttachResourceResponse(w http.ResponseWriter) error

type AttachResource400JSONResponse

type AttachResource400JSONResponse struct{ BadRequestJSONResponse }

func (AttachResource400JSONResponse) VisitAttachResourceResponse

func (response AttachResource400JSONResponse) VisitAttachResourceResponse(w http.ResponseWriter) error

type AttachResource401JSONResponse

type AttachResource401JSONResponse struct{ UnauthorizedJSONResponse }

func (AttachResource401JSONResponse) VisitAttachResourceResponse

func (response AttachResource401JSONResponse) VisitAttachResourceResponse(w http.ResponseWriter) error

type AttachResource404JSONResponse

type AttachResource404JSONResponse struct{ NotFoundJSONResponse }

func (AttachResource404JSONResponse) VisitAttachResourceResponse

func (response AttachResource404JSONResponse) VisitAttachResourceResponse(w http.ResponseWriter) error

type AttachResource409JSONResponse

type AttachResource409JSONResponse struct{ ConflictJSONResponse }

func (AttachResource409JSONResponse) VisitAttachResourceResponse

func (response AttachResource409JSONResponse) VisitAttachResourceResponse(w http.ResponseWriter) error

type AttachResource500JSONResponse

type AttachResource500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (AttachResource500JSONResponse) VisitAttachResourceResponse

func (response AttachResource500JSONResponse) VisitAttachResourceResponse(w http.ResponseWriter) error

type AttachResourceJSONRequestBody

AttachResourceJSONRequestBody defines body for AttachResource for application/json ContentType.

type AttachResourceJSONRequestBody = AttachResourceRequest

type AttachResourceRequest

AttachResourceRequest Request body for POST /api/study-guides/{study_guide_id}/resources. `title` and `url` are required. `type` defaults to `link` when omitted. URL must be http or https (validated server-side; the openapi `format: uri` only checks general syntax).

type AttachResourceRequest struct {
Description *string `json:"description,omitempty"`
Title string `json:"title"`
Type *AttachResourceRequestType `json:"type,omitempty"`
Url string `json:"url"`
}

type AttachResourceRequestObject

type AttachResourceRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
Body *AttachResourceJSONRequestBody
}

type AttachResourceRequestType

AttachResourceRequestType defines model for AttachResourceRequest.Type.

type AttachResourceRequestType string

Defines values for AttachResourceRequestType.

const (
AttachResourceRequestTypeArticle AttachResourceRequestType = "article"
AttachResourceRequestTypeLink AttachResourceRequestType = "link"
AttachResourceRequestTypePdf AttachResourceRequestType = "pdf"
AttachResourceRequestTypeVideo AttachResourceRequestType = "video"
)

func (AttachResourceRequestType) Valid

func (e AttachResourceRequestType) Valid() bool

Valid indicates whether the value is a known member of the AttachResourceRequestType enum.

type AttachResourceResponseObject

type AttachResourceResponseObject interface {
VisitAttachResourceResponse(w http.ResponseWriter) error
}

type BadRequest

BadRequest Standardized error response structure matching application error domains

type BadRequest = AppError

type BadRequestJSONResponse

type BadRequestJSONResponse AppError

type CastStudyGuideVote200JSONResponse

type CastStudyGuideVote200JSONResponse CastVoteResponse

func (CastStudyGuideVote200JSONResponse) VisitCastStudyGuideVoteResponse

func (response CastStudyGuideVote200JSONResponse) VisitCastStudyGuideVoteResponse(w http.ResponseWriter) error

type CastStudyGuideVote400JSONResponse

type CastStudyGuideVote400JSONResponse struct{ BadRequestJSONResponse }

func (CastStudyGuideVote400JSONResponse) VisitCastStudyGuideVoteResponse

func (response CastStudyGuideVote400JSONResponse) VisitCastStudyGuideVoteResponse(w http.ResponseWriter) error

type CastStudyGuideVote401JSONResponse

type CastStudyGuideVote401JSONResponse struct{ UnauthorizedJSONResponse }

func (CastStudyGuideVote401JSONResponse) VisitCastStudyGuideVoteResponse

func (response CastStudyGuideVote401JSONResponse) VisitCastStudyGuideVoteResponse(w http.ResponseWriter) error

type CastStudyGuideVote404JSONResponse

type CastStudyGuideVote404JSONResponse struct{ NotFoundJSONResponse }

func (CastStudyGuideVote404JSONResponse) VisitCastStudyGuideVoteResponse

func (response CastStudyGuideVote404JSONResponse) VisitCastStudyGuideVoteResponse(w http.ResponseWriter) error

type CastStudyGuideVote500JSONResponse

type CastStudyGuideVote500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (CastStudyGuideVote500JSONResponse) VisitCastStudyGuideVoteResponse

func (response CastStudyGuideVote500JSONResponse) VisitCastStudyGuideVoteResponse(w http.ResponseWriter) error

type CastStudyGuideVoteJSONRequestBody

CastStudyGuideVoteJSONRequestBody defines body for CastStudyGuideVote for application/json ContentType.

type CastStudyGuideVoteJSONRequestBody = CastVoteRequest

type CastStudyGuideVoteRequestObject

type CastStudyGuideVoteRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
Body *CastStudyGuideVoteJSONRequestBody
}

type CastStudyGuideVoteResponseObject

type CastStudyGuideVoteResponseObject interface {
VisitCastStudyGuideVoteResponse(w http.ResponseWriter) error
}

type CastVoteRequest

CastVoteRequest Request body for POST /api/study-guides/{study_guide_id}/votes. `vote` is the desired direction. Same-direction submits are no-ops at the SQL layer (the upsert WHERE clause skips the row modification when vote is unchanged).

type CastVoteRequest struct {
Vote CastVoteRequestVote `json:"vote"`
}

type CastVoteRequestVote

CastVoteRequestVote defines model for CastVoteRequest.Vote.

type CastVoteRequestVote string

Defines values for CastVoteRequestVote.

const (
CastVoteRequestVoteDown CastVoteRequestVote = "down"
CastVoteRequestVoteUp CastVoteRequestVote = "up"
)

func (CastVoteRequestVote) Valid

func (e CastVoteRequestVote) Valid() bool

Valid indicates whether the value is a known member of the CastVoteRequestVote enum.

type CastVoteResponse

CastVoteResponse Response body for POST /api/study-guides/{study_guide_id}/votes. Returns the post-upsert state so the UI can patch its local vote_score without a follow-up GET.

type CastVoteResponse struct {
Vote CastVoteResponseVote `json:"vote"`
VoteScore int64 `json:"vote_score"`
}

type CastVoteResponseVote

CastVoteResponseVote defines model for CastVoteResponse.Vote.

type CastVoteResponseVote string

Defines values for CastVoteResponseVote.

const (
CastVoteResponseVoteDown CastVoteResponseVote = "down"
CastVoteResponseVoteUp CastVoteResponseVote = "up"
)

func (CastVoteResponseVote) Valid

func (e CastVoteResponseVote) Valid() bool

Valid indicates whether the value is a known member of the CastVoteResponseVote enum.

type CheckMembership200JSONResponse

type CheckMembership200JSONResponse MembershipCheckResponse

func (CheckMembership200JSONResponse) VisitCheckMembershipResponse

func (response CheckMembership200JSONResponse) VisitCheckMembershipResponse(w http.ResponseWriter) error

type CheckMembership400JSONResponse

type CheckMembership400JSONResponse struct{ BadRequestJSONResponse }

func (CheckMembership400JSONResponse) VisitCheckMembershipResponse

func (response CheckMembership400JSONResponse) VisitCheckMembershipResponse(w http.ResponseWriter) error

type CheckMembership401JSONResponse

type CheckMembership401JSONResponse struct{ UnauthorizedJSONResponse }

func (CheckMembership401JSONResponse) VisitCheckMembershipResponse

func (response CheckMembership401JSONResponse) VisitCheckMembershipResponse(w http.ResponseWriter) error

type CheckMembership404JSONResponse

type CheckMembership404JSONResponse struct{ NotFoundJSONResponse }

func (CheckMembership404JSONResponse) VisitCheckMembershipResponse

func (response CheckMembership404JSONResponse) VisitCheckMembershipResponse(w http.ResponseWriter) error

type CheckMembership500JSONResponse

type CheckMembership500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (CheckMembership500JSONResponse) VisitCheckMembershipResponse

func (response CheckMembership500JSONResponse) VisitCheckMembershipResponse(w http.ResponseWriter) error

type CheckMembershipRequestObject

type CheckMembershipRequestObject struct {
CourseId openapi_types.UUID `json:"course_id"`
SectionId openapi_types.UUID `json:"section_id"`
}

type CheckMembershipResponseObject

type CheckMembershipResponseObject interface {
VisitCheckMembershipResponse(w http.ResponseWriter) error
}

type ChiServerOptions

type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Conflict

Conflict Standardized error response structure matching application error domains

type Conflict = AppError

type ConflictJSONResponse

type ConflictJSONResponse AppError

type CourseDetailResponse

CourseDetailResponse A course with its school summary and the full list of sections

type CourseDetailResponse struct {
CreatedAt time.Time `json:"created_at"`
Department string `json:"department"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
Number string `json:"number"`

// School Compact school payload embedded inside other resources (courses, study guides)
School SchoolSummary `json:"school"`
Sections []SectionSummary `json:"sections"`
Title string `json:"title"`
}

type CourseMemberResponse

CourseMemberResponse A user's membership in a course section

type CourseMemberResponse struct {
JoinedAt time.Time `json:"joined_at"`
Role CourseMemberResponseRole `json:"role"`
SectionId openapi_types.UUID `json:"section_id"`
UserId openapi_types.UUID `json:"user_id"`
}

type CourseMemberResponseRole

CourseMemberResponseRole defines model for CourseMemberResponse.Role.

type CourseMemberResponseRole string

Defines values for CourseMemberResponseRole.

const (
CourseMemberResponseRoleInstructor CourseMemberResponseRole = "instructor"
CourseMemberResponseRoleStudent CourseMemberResponseRole = "student"
CourseMemberResponseRoleTa CourseMemberResponseRole = "ta"
)

func (CourseMemberResponseRole) Valid

func (e CourseMemberResponseRole) Valid() bool

Valid indicates whether the value is a known member of the CourseMemberResponseRole enum.

type CourseResponse

CourseResponse A course (e.g. CPTS 322) with its school summary embedded

type CourseResponse struct {
CreatedAt time.Time `json:"created_at"`
Department string `json:"department"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
Number string `json:"number"`

// School Compact school payload embedded inside other resources (courses, study guides)
School SchoolSummary `json:"school"`
Title string `json:"title"`
}

type CreateFile201JSONResponse

type CreateFile201JSONResponse CreateFileResponse

func (CreateFile201JSONResponse) VisitCreateFileResponse

func (response CreateFile201JSONResponse) VisitCreateFileResponse(w http.ResponseWriter) error

type CreateFile400JSONResponse

type CreateFile400JSONResponse struct{ BadRequestJSONResponse }

func (CreateFile400JSONResponse) VisitCreateFileResponse

func (response CreateFile400JSONResponse) VisitCreateFileResponse(w http.ResponseWriter) error

type CreateFile401JSONResponse

type CreateFile401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateFile401JSONResponse) VisitCreateFileResponse

func (response CreateFile401JSONResponse) VisitCreateFileResponse(w http.ResponseWriter) error

type CreateFile500JSONResponse

type CreateFile500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (CreateFile500JSONResponse) VisitCreateFileResponse

func (response CreateFile500JSONResponse) VisitCreateFileResponse(w http.ResponseWriter) error

type CreateFileJSONRequestBody

CreateFileJSONRequestBody defines body for CreateFile for application/json ContentType.

type CreateFileJSONRequestBody = CreateFileRequest

type CreateFileRequest

CreateFileRequest Payload to create a new file reference

type CreateFileRequest struct {
MimeType CreateFileRequestMimeType `json:"mime_type"`
Name string `json:"name"`
Size int64 `json:"size"`
}

type CreateFileRequestMimeType

CreateFileRequestMimeType defines model for CreateFileRequest.MimeType.

type CreateFileRequestMimeType string

Defines values for CreateFileRequestMimeType.

const (
CreateFileRequestMimeTypeApplicationepubZip CreateFileRequestMimeType = "application/epub+zip"
CreateFileRequestMimeTypeApplicationpdf CreateFileRequestMimeType = "application/pdf"
CreateFileRequestMimeTypeApplicationvndOpenxmlformatsOfficedocumentPresentationmlPresentation CreateFileRequestMimeType = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
CreateFileRequestMimeTypeApplicationvndOpenxmlformatsOfficedocumentWordprocessingmlDocument CreateFileRequestMimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
CreateFileRequestMimeTypeImagejpeg CreateFileRequestMimeType = "image/jpeg"
CreateFileRequestMimeTypeImagepng CreateFileRequestMimeType = "image/png"
CreateFileRequestMimeTypeImagewebp CreateFileRequestMimeType = "image/webp"
CreateFileRequestMimeTypeTextplain CreateFileRequestMimeType = "text/plain"
)

func (CreateFileRequestMimeType) Valid

func (e CreateFileRequestMimeType) Valid() bool

Valid indicates whether the value is a known member of the CreateFileRequestMimeType enum.

type CreateFileRequestObject

type CreateFileRequestObject struct {
Body *CreateFileJSONRequestBody
}

type CreateFileResponse

CreateFileResponse Created file reference with a presigned upload URL

type CreateFileResponse struct {
// File Complete metadata payload describing an uploaded file
File FileResponse `json:"file"`
UploadUrl string `json:"upload_url"`
}

type CreateFileResponseObject

type CreateFileResponseObject interface {
VisitCreateFileResponse(w http.ResponseWriter) error
}

type CreateGrant201JSONResponse

type CreateGrant201JSONResponse GrantResponse

func (CreateGrant201JSONResponse) VisitCreateGrantResponse

func (response CreateGrant201JSONResponse) VisitCreateGrantResponse(w http.ResponseWriter) error

type CreateGrant400JSONResponse

type CreateGrant400JSONResponse struct{ BadRequestJSONResponse }

func (CreateGrant400JSONResponse) VisitCreateGrantResponse

func (response CreateGrant400JSONResponse) VisitCreateGrantResponse(w http.ResponseWriter) error

type CreateGrant401JSONResponse

type CreateGrant401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateGrant401JSONResponse) VisitCreateGrantResponse

func (response CreateGrant401JSONResponse) VisitCreateGrantResponse(w http.ResponseWriter) error

type CreateGrant404JSONResponse

type CreateGrant404JSONResponse struct{ NotFoundJSONResponse }

func (CreateGrant404JSONResponse) VisitCreateGrantResponse

func (response CreateGrant404JSONResponse) VisitCreateGrantResponse(w http.ResponseWriter) error

type CreateGrant500JSONResponse

type CreateGrant500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (CreateGrant500JSONResponse) VisitCreateGrantResponse

func (response CreateGrant500JSONResponse) VisitCreateGrantResponse(w http.ResponseWriter) error

type CreateGrantJSONRequestBody

CreateGrantJSONRequestBody defines body for CreateGrant for application/json ContentType.

type CreateGrantJSONRequestBody = CreateGrantRequest

type CreateGrantRequest

CreateGrantRequest Request body for creating a file grant

type CreateGrantRequest struct {
GranteeId openapi_types.UUID `json:"grantee_id"`
GranteeType CreateGrantRequestGranteeType `json:"grantee_type"`
Permission CreateGrantRequestPermission `json:"permission"`
}

type CreateGrantRequestGranteeType

CreateGrantRequestGranteeType defines model for CreateGrantRequest.GranteeType.

type CreateGrantRequestGranteeType string

Defines values for CreateGrantRequestGranteeType.

const (
CreateGrantRequestGranteeTypeCourse CreateGrantRequestGranteeType = "course"
CreateGrantRequestGranteeTypeStudyGuide CreateGrantRequestGranteeType = "study_guide"
CreateGrantRequestGranteeTypeUser CreateGrantRequestGranteeType = "user"
)

func (CreateGrantRequestGranteeType) Valid

func (e CreateGrantRequestGranteeType) Valid() bool

Valid indicates whether the value is a known member of the CreateGrantRequestGranteeType enum.

type CreateGrantRequestObject

type CreateGrantRequestObject struct {
FileId openapi_types.UUID `json:"file_id"`
Body *CreateGrantJSONRequestBody
}

type CreateGrantRequestPermission

CreateGrantRequestPermission defines model for CreateGrantRequest.Permission.

type CreateGrantRequestPermission string

Defines values for CreateGrantRequestPermission.

const (
CreateGrantRequestPermissionDelete CreateGrantRequestPermission = "delete"
CreateGrantRequestPermissionShare CreateGrantRequestPermission = "share"
CreateGrantRequestPermissionView CreateGrantRequestPermission = "view"
)

func (CreateGrantRequestPermission) Valid

func (e CreateGrantRequestPermission) Valid() bool

Valid indicates whether the value is a known member of the CreateGrantRequestPermission enum.

type CreateGrantResponseObject

type CreateGrantResponseObject interface {
VisitCreateGrantResponse(w http.ResponseWriter) error
}

type CreateQuiz201JSONResponse

type CreateQuiz201JSONResponse QuizDetailResponse

func (CreateQuiz201JSONResponse) VisitCreateQuizResponse

func (response CreateQuiz201JSONResponse) VisitCreateQuizResponse(w http.ResponseWriter) error

type CreateQuiz400JSONResponse

type CreateQuiz400JSONResponse struct{ BadRequestJSONResponse }

func (CreateQuiz400JSONResponse) VisitCreateQuizResponse

func (response CreateQuiz400JSONResponse) VisitCreateQuizResponse(w http.ResponseWriter) error

type CreateQuiz401JSONResponse

type CreateQuiz401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateQuiz401JSONResponse) VisitCreateQuizResponse

func (response CreateQuiz401JSONResponse) VisitCreateQuizResponse(w http.ResponseWriter) error

type CreateQuiz404JSONResponse

type CreateQuiz404JSONResponse struct{ NotFoundJSONResponse }

func (CreateQuiz404JSONResponse) VisitCreateQuizResponse

func (response CreateQuiz404JSONResponse) VisitCreateQuizResponse(w http.ResponseWriter) error

type CreateQuiz500JSONResponse

type CreateQuiz500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (CreateQuiz500JSONResponse) VisitCreateQuizResponse

func (response CreateQuiz500JSONResponse) VisitCreateQuizResponse(w http.ResponseWriter) error

type CreateQuizJSONRequestBody

CreateQuizJSONRequestBody defines body for CreateQuiz for application/json ContentType.

type CreateQuizJSONRequestBody = CreateQuizRequest

type CreateQuizMCQOption

CreateQuizMCQOption A single option for a `multiple-choice` question on the create request. Exactly one option per MCQ question must have `is_correct: true`. The text is rendered to the student verbatim; no normalization is applied server-side.

type CreateQuizMCQOption struct {
IsCorrect bool `json:"is_correct"`
Text string `json:"text"`
}

type CreateQuizQuestion

CreateQuizQuestion A single question on the create-quiz request. The `type` field discriminates which other fields are meaningful:

  • `multiple-choice` -- requires `options`; ignores `correct_answer`.
  • `true-false` -- requires `correct_answer` as a boolean; ignores `options`.
  • `freeform` -- requires `correct_answer` as a non-empty string; ignores `options`.

Cross-field validation is enforced by the service layer with per-field 400 error details when the rules above are violated.

type CreateQuizQuestion struct {
// CorrectAnswer For `true-false` questions this is a boolean; for `freeform`
// questions this is a non-empty string (max 500 chars).
// Ignored for `multiple-choice` questions (correctness is
// embedded in `options[].is_correct`).
CorrectAnswer interface{} `json:"correct_answer,omitempty"`
FeedbackCorrect *string `json:"feedback_correct,omitempty"`
FeedbackIncorrect *string `json:"feedback_incorrect,omitempty"`
Hint *string `json:"hint,omitempty"`
Options *[]CreateQuizMCQOption `json:"options,omitempty"`
Question string `json:"question"`
SortOrder *int `json:"sort_order,omitempty"`
Type CreateQuizQuestionType `json:"type"`
}

type CreateQuizQuestionType

CreateQuizQuestionType defines model for CreateQuizQuestion.Type.

type CreateQuizQuestionType string

Defines values for CreateQuizQuestionType.

const (
CreateQuizQuestionTypeFreeform CreateQuizQuestionType = "freeform"
CreateQuizQuestionTypeMultipleChoice CreateQuizQuestionType = "multiple-choice"
CreateQuizQuestionTypeTrueFalse CreateQuizQuestionType = "true-false"
)

func (CreateQuizQuestionType) Valid

func (e CreateQuizQuestionType) Valid() bool

Valid indicates whether the value is a known member of the CreateQuizQuestionType enum.

type CreateQuizRequest

CreateQuizRequest Request body for POST /api/study-guides/{study_guide_id}/quizzes. The entire quiz (title + N questions + each question's options) is created atomically. If any question fails validation, the whole request is rejected and no rows are written.

`creator_id` is set from the JWT; any value supplied here is ignored (sending one is not an error to keep the wire shape forgiving for frontend builders).

type CreateQuizRequest struct {
Description *string `json:"description,omitempty"`
Questions []CreateQuizQuestion `json:"questions"`
Title string `json:"title"`
}

type CreateQuizRequestObject

type CreateQuizRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
Body *CreateQuizJSONRequestBody
}

type CreateQuizResponseObject

type CreateQuizResponseObject interface {
VisitCreateQuizResponse(w http.ResponseWriter) error
}

type CreateStudyGuide201JSONResponse

type CreateStudyGuide201JSONResponse StudyGuideDetailResponse

func (CreateStudyGuide201JSONResponse) VisitCreateStudyGuideResponse

func (response CreateStudyGuide201JSONResponse) VisitCreateStudyGuideResponse(w http.ResponseWriter) error

type CreateStudyGuide400JSONResponse

type CreateStudyGuide400JSONResponse struct{ BadRequestJSONResponse }

func (CreateStudyGuide400JSONResponse) VisitCreateStudyGuideResponse

func (response CreateStudyGuide400JSONResponse) VisitCreateStudyGuideResponse(w http.ResponseWriter) error

type CreateStudyGuide401JSONResponse

type CreateStudyGuide401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateStudyGuide401JSONResponse) VisitCreateStudyGuideResponse

func (response CreateStudyGuide401JSONResponse) VisitCreateStudyGuideResponse(w http.ResponseWriter) error

type CreateStudyGuide404JSONResponse

type CreateStudyGuide404JSONResponse struct{ NotFoundJSONResponse }

func (CreateStudyGuide404JSONResponse) VisitCreateStudyGuideResponse

func (response CreateStudyGuide404JSONResponse) VisitCreateStudyGuideResponse(w http.ResponseWriter) error

type CreateStudyGuide500JSONResponse

type CreateStudyGuide500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (CreateStudyGuide500JSONResponse) VisitCreateStudyGuideResponse

func (response CreateStudyGuide500JSONResponse) VisitCreateStudyGuideResponse(w http.ResponseWriter) error

type CreateStudyGuideJSONRequestBody

CreateStudyGuideJSONRequestBody defines body for CreateStudyGuide for application/json ContentType.

type CreateStudyGuideJSONRequestBody = CreateStudyGuideRequest

type CreateStudyGuideRequest

CreateStudyGuideRequest Request body for POST /api/courses/{course_id}/study-guides. Only `title` is required. Tags are normalized server-side (trim + lowercase + dedupe); empty tags after trim are rejected with 400. `creator_id` is set from the JWT and ignored if supplied here.

type CreateStudyGuideRequest struct {
Content *string `json:"content,omitempty"`
Description *string `json:"description,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title string `json:"title"`
}

type CreateStudyGuideRequestObject

type CreateStudyGuideRequestObject struct {
CourseId openapi_types.UUID `json:"course_id"`
Body *CreateStudyGuideJSONRequestBody
}

type CreateStudyGuideResponseObject

type CreateStudyGuideResponseObject interface {
VisitCreateStudyGuideResponse(w http.ResponseWriter) error
}

type CreatorSummary

CreatorSummary Compact user payload used as the `creator` of a study guide. Same privacy floor as SectionMemberResponse -- no email, no clerk_id.

type CreatorSummary struct {
FirstName string `json:"first_name"`
Id openapi_types.UUID `json:"id"`
LastName string `json:"last_name"`
}

type DeleteFile204Response

type DeleteFile204Response struct {
}

func (DeleteFile204Response) VisitDeleteFileResponse

func (response DeleteFile204Response) VisitDeleteFileResponse(w http.ResponseWriter) error

type DeleteFile401JSONResponse

type DeleteFile401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteFile401JSONResponse) VisitDeleteFileResponse

func (response DeleteFile401JSONResponse) VisitDeleteFileResponse(w http.ResponseWriter) error

type DeleteFile404JSONResponse

type DeleteFile404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteFile404JSONResponse) VisitDeleteFileResponse

func (response DeleteFile404JSONResponse) VisitDeleteFileResponse(w http.ResponseWriter) error

type DeleteFile500JSONResponse

type DeleteFile500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (DeleteFile500JSONResponse) VisitDeleteFileResponse

func (response DeleteFile500JSONResponse) VisitDeleteFileResponse(w http.ResponseWriter) error

type DeleteFileRequestObject

type DeleteFileRequestObject struct {
FileId openapi_types.UUID `json:"file_id"`
}

type DeleteFileResponseObject

type DeleteFileResponseObject interface {
VisitDeleteFileResponse(w http.ResponseWriter) error
}

type DeleteQuiz204Response

type DeleteQuiz204Response struct {
}

func (DeleteQuiz204Response) VisitDeleteQuizResponse

func (response DeleteQuiz204Response) VisitDeleteQuizResponse(w http.ResponseWriter) error

type DeleteQuiz401JSONResponse

type DeleteQuiz401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteQuiz401JSONResponse) VisitDeleteQuizResponse

func (response DeleteQuiz401JSONResponse) VisitDeleteQuizResponse(w http.ResponseWriter) error

type DeleteQuiz403JSONResponse

type DeleteQuiz403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteQuiz403JSONResponse) VisitDeleteQuizResponse

func (response DeleteQuiz403JSONResponse) VisitDeleteQuizResponse(w http.ResponseWriter) error

type DeleteQuiz404JSONResponse

type DeleteQuiz404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteQuiz404JSONResponse) VisitDeleteQuizResponse

func (response DeleteQuiz404JSONResponse) VisitDeleteQuizResponse(w http.ResponseWriter) error

type DeleteQuiz500JSONResponse

type DeleteQuiz500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (DeleteQuiz500JSONResponse) VisitDeleteQuizResponse

func (response DeleteQuiz500JSONResponse) VisitDeleteQuizResponse(w http.ResponseWriter) error

type DeleteQuizRequestObject

type DeleteQuizRequestObject struct {
QuizId openapi_types.UUID `json:"quiz_id"`
}

type DeleteQuizResponseObject

type DeleteQuizResponseObject interface {
VisitDeleteQuizResponse(w http.ResponseWriter) error
}

type DeleteStudyGuide204Response

type DeleteStudyGuide204Response struct {
}

func (DeleteStudyGuide204Response) VisitDeleteStudyGuideResponse

func (response DeleteStudyGuide204Response) VisitDeleteStudyGuideResponse(w http.ResponseWriter) error

type DeleteStudyGuide400JSONResponse

type DeleteStudyGuide400JSONResponse struct{ BadRequestJSONResponse }

func (DeleteStudyGuide400JSONResponse) VisitDeleteStudyGuideResponse

func (response DeleteStudyGuide400JSONResponse) VisitDeleteStudyGuideResponse(w http.ResponseWriter) error

type DeleteStudyGuide401JSONResponse

type DeleteStudyGuide401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeleteStudyGuide401JSONResponse) VisitDeleteStudyGuideResponse

func (response DeleteStudyGuide401JSONResponse) VisitDeleteStudyGuideResponse(w http.ResponseWriter) error

type DeleteStudyGuide403JSONResponse

type DeleteStudyGuide403JSONResponse struct{ ForbiddenJSONResponse }

func (DeleteStudyGuide403JSONResponse) VisitDeleteStudyGuideResponse

func (response DeleteStudyGuide403JSONResponse) VisitDeleteStudyGuideResponse(w http.ResponseWriter) error

type DeleteStudyGuide404JSONResponse

type DeleteStudyGuide404JSONResponse struct{ NotFoundJSONResponse }

func (DeleteStudyGuide404JSONResponse) VisitDeleteStudyGuideResponse

func (response DeleteStudyGuide404JSONResponse) VisitDeleteStudyGuideResponse(w http.ResponseWriter) error

type DeleteStudyGuide500JSONResponse

type DeleteStudyGuide500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (DeleteStudyGuide500JSONResponse) VisitDeleteStudyGuideResponse

func (response DeleteStudyGuide500JSONResponse) VisitDeleteStudyGuideResponse(w http.ResponseWriter) error

type DeleteStudyGuideRequestObject

type DeleteStudyGuideRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type DeleteStudyGuideResponseObject

type DeleteStudyGuideResponseObject interface {
VisitDeleteStudyGuideResponse(w http.ResponseWriter) error
}

type DetachFile204Response

type DetachFile204Response struct {
}

func (DetachFile204Response) VisitDetachFileResponse

func (response DetachFile204Response) VisitDetachFileResponse(w http.ResponseWriter) error

type DetachFile400JSONResponse

type DetachFile400JSONResponse struct{ BadRequestJSONResponse }

func (DetachFile400JSONResponse) VisitDetachFileResponse

func (response DetachFile400JSONResponse) VisitDetachFileResponse(w http.ResponseWriter) error

type DetachFile401JSONResponse

type DetachFile401JSONResponse struct{ UnauthorizedJSONResponse }

func (DetachFile401JSONResponse) VisitDetachFileResponse

func (response DetachFile401JSONResponse) VisitDetachFileResponse(w http.ResponseWriter) error

type DetachFile403JSONResponse

type DetachFile403JSONResponse struct{ ForbiddenJSONResponse }

func (DetachFile403JSONResponse) VisitDetachFileResponse

func (response DetachFile403JSONResponse) VisitDetachFileResponse(w http.ResponseWriter) error

type DetachFile404JSONResponse

type DetachFile404JSONResponse struct{ NotFoundJSONResponse }

func (DetachFile404JSONResponse) VisitDetachFileResponse

func (response DetachFile404JSONResponse) VisitDetachFileResponse(w http.ResponseWriter) error

type DetachFile500JSONResponse

type DetachFile500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (DetachFile500JSONResponse) VisitDetachFileResponse

func (response DetachFile500JSONResponse) VisitDetachFileResponse(w http.ResponseWriter) error

type DetachFileRequestObject

type DetachFileRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
FileId openapi_types.UUID `json:"file_id"`
}

type DetachFileResponseObject

type DetachFileResponseObject interface {
VisitDetachFileResponse(w http.ResponseWriter) error
}

type DetachResource204Response

type DetachResource204Response struct {
}

func (DetachResource204Response) VisitDetachResourceResponse

func (response DetachResource204Response) VisitDetachResourceResponse(w http.ResponseWriter) error

type DetachResource400JSONResponse

type DetachResource400JSONResponse struct{ BadRequestJSONResponse }

func (DetachResource400JSONResponse) VisitDetachResourceResponse

func (response DetachResource400JSONResponse) VisitDetachResourceResponse(w http.ResponseWriter) error

type DetachResource401JSONResponse

type DetachResource401JSONResponse struct{ UnauthorizedJSONResponse }

func (DetachResource401JSONResponse) VisitDetachResourceResponse

func (response DetachResource401JSONResponse) VisitDetachResourceResponse(w http.ResponseWriter) error

type DetachResource403JSONResponse

type DetachResource403JSONResponse struct{ ForbiddenJSONResponse }

func (DetachResource403JSONResponse) VisitDetachResourceResponse

func (response DetachResource403JSONResponse) VisitDetachResourceResponse(w http.ResponseWriter) error

type DetachResource404JSONResponse

type DetachResource404JSONResponse struct{ NotFoundJSONResponse }

func (DetachResource404JSONResponse) VisitDetachResourceResponse

func (response DetachResource404JSONResponse) VisitDetachResourceResponse(w http.ResponseWriter) error

type DetachResource500JSONResponse

type DetachResource500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (DetachResource500JSONResponse) VisitDetachResourceResponse

func (response DetachResource500JSONResponse) VisitDetachResourceResponse(w http.ResponseWriter) error

type DetachResourceRequestObject

type DetachResourceRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
ResourceId openapi_types.UUID `json:"resource_id"`
}

type DetachResourceResponseObject

type DetachResourceResponseObject interface {
VisitDetachResourceResponse(w http.ResponseWriter) error
}

type EnrollmentCourseSummary

EnrollmentCourseSummary Compact course payload embedded in an EnrollmentResponse

type EnrollmentCourseSummary struct {
Department string `json:"department"`
Id openapi_types.UUID `json:"id"`
Number string `json:"number"`
Title string `json:"title"`
}

type EnrollmentResponse

EnrollmentResponse A single enrollment with embedded section, course, and school

type EnrollmentResponse struct {
// Course Compact course payload embedded in an EnrollmentResponse
Course EnrollmentCourseSummary `json:"course"`
JoinedAt time.Time `json:"joined_at"`
Role EnrollmentResponseRole `json:"role"`

// School Compact school payload embedded in an EnrollmentResponse. Only id +
// acronym -- the full school summary is available via the course
// detail endpoint and would bloat the dashboard payload.
School EnrollmentSchoolSummary `json:"school"`

// Section Compact section payload embedded in an EnrollmentResponse
Section EnrollmentSectionSummary `json:"section"`
}

type EnrollmentResponseRole

EnrollmentResponseRole defines model for EnrollmentResponse.Role.

type EnrollmentResponseRole string

Defines values for EnrollmentResponseRole.

const (
EnrollmentResponseRoleInstructor EnrollmentResponseRole = "instructor"
EnrollmentResponseRoleStudent EnrollmentResponseRole = "student"
EnrollmentResponseRoleTa EnrollmentResponseRole = "ta"
)

func (EnrollmentResponseRole) Valid

func (e EnrollmentResponseRole) Valid() bool

Valid indicates whether the value is a known member of the EnrollmentResponseRole enum.

type EnrollmentSchoolSummary

EnrollmentSchoolSummary Compact school payload embedded in an EnrollmentResponse. Only id + acronym -- the full school summary is available via the course detail endpoint and would bloat the dashboard payload.

type EnrollmentSchoolSummary struct {
Acronym string `json:"acronym"`
Id openapi_types.UUID `json:"id"`
}

type EnrollmentSectionSummary

EnrollmentSectionSummary Compact section payload embedded in an EnrollmentResponse

type EnrollmentSectionSummary struct {
Id openapi_types.UUID `json:"id"`
InstructorName *string `json:"instructor_name,omitempty"`
SectionCode *string `json:"section_code,omitempty"`
Term string `json:"term"`
}

type FileAttachmentResponse

FileAttachmentResponse Response body for POST /api/study-guides/{study_guide_id}/files/{file_id}. Returns the join row's keys + creation timestamp. The file's own metadata (name, mime_type, size) is intentionally NOT included -- the wire shape mirrors the join table since this endpoint only creates the link, not the file. Callers that want full file metadata can hit GET /api/study-guides/{id} which includes the attached file list with privacy floor.

type FileAttachmentResponse struct {
CreatedAt time.Time `json:"created_at"`
FileId openapi_types.UUID `json:"file_id"`
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type FileResponse

FileResponse Complete metadata payload describing an uploaded file

type FileResponse struct {
CreatedAt time.Time `json:"created_at"`
FavoritedAt *time.Time `json:"favorited_at,omitempty"`
Id openapi_types.UUID `json:"id"`
LastViewedAt *time.Time `json:"last_viewed_at,omitempty"`
MimeType string `json:"mime_type"`
Name string `json:"name"`
Size int64 `json:"size"`
Status string `json:"status"`
UpdatedAt time.Time `json:"updated_at"`
}

type Forbidden

Forbidden Standardized error response structure matching application error domains

type Forbidden = AppError

type ForbiddenJSONResponse

type ForbiddenJSONResponse AppError

type GetCourse200JSONResponse

type GetCourse200JSONResponse CourseDetailResponse

func (GetCourse200JSONResponse) VisitGetCourseResponse

func (response GetCourse200JSONResponse) VisitGetCourseResponse(w http.ResponseWriter) error

type GetCourse400JSONResponse

type GetCourse400JSONResponse struct{ BadRequestJSONResponse }

func (GetCourse400JSONResponse) VisitGetCourseResponse

func (response GetCourse400JSONResponse) VisitGetCourseResponse(w http.ResponseWriter) error

type GetCourse401JSONResponse

type GetCourse401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetCourse401JSONResponse) VisitGetCourseResponse

func (response GetCourse401JSONResponse) VisitGetCourseResponse(w http.ResponseWriter) error

type GetCourse404JSONResponse

type GetCourse404JSONResponse struct{ NotFoundJSONResponse }

func (GetCourse404JSONResponse) VisitGetCourseResponse

func (response GetCourse404JSONResponse) VisitGetCourseResponse(w http.ResponseWriter) error

type GetCourse500JSONResponse

type GetCourse500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (GetCourse500JSONResponse) VisitGetCourseResponse

func (response GetCourse500JSONResponse) VisitGetCourseResponse(w http.ResponseWriter) error

type GetCourseRequestObject

type GetCourseRequestObject struct {
CourseId openapi_types.UUID `json:"course_id"`
}

type GetCourseResponseObject

type GetCourseResponseObject interface {
VisitGetCourseResponse(w http.ResponseWriter) error
}

type GetFile200JSONResponse

type GetFile200JSONResponse FileResponse

func (GetFile200JSONResponse) VisitGetFileResponse

func (response GetFile200JSONResponse) VisitGetFileResponse(w http.ResponseWriter) error

type GetFile400JSONResponse

type GetFile400JSONResponse struct{ BadRequestJSONResponse }

func (GetFile400JSONResponse) VisitGetFileResponse

func (response GetFile400JSONResponse) VisitGetFileResponse(w http.ResponseWriter) error

type GetFile401JSONResponse

type GetFile401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetFile401JSONResponse) VisitGetFileResponse

func (response GetFile401JSONResponse) VisitGetFileResponse(w http.ResponseWriter) error

type GetFile403JSONResponse

type GetFile403JSONResponse struct{ ForbiddenJSONResponse }

func (GetFile403JSONResponse) VisitGetFileResponse

func (response GetFile403JSONResponse) VisitGetFileResponse(w http.ResponseWriter) error

type GetFile404JSONResponse

type GetFile404JSONResponse struct{ NotFoundJSONResponse }

func (GetFile404JSONResponse) VisitGetFileResponse

func (response GetFile404JSONResponse) VisitGetFileResponse(w http.ResponseWriter) error

type GetFile500JSONResponse

type GetFile500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (GetFile500JSONResponse) VisitGetFileResponse

func (response GetFile500JSONResponse) VisitGetFileResponse(w http.ResponseWriter) error

type GetFileRequestObject

type GetFileRequestObject struct {
FileId openapi_types.UUID `json:"file_id"`
}

type GetFileResponseObject

type GetFileResponseObject interface {
VisitGetFileResponse(w http.ResponseWriter) error
}

type GetSchool200JSONResponse

type GetSchool200JSONResponse SchoolResponse

func (GetSchool200JSONResponse) VisitGetSchoolResponse

func (response GetSchool200JSONResponse) VisitGetSchoolResponse(w http.ResponseWriter) error

type GetSchool400JSONResponse

type GetSchool400JSONResponse struct{ BadRequestJSONResponse }

func (GetSchool400JSONResponse) VisitGetSchoolResponse

func (response GetSchool400JSONResponse) VisitGetSchoolResponse(w http.ResponseWriter) error

type GetSchool401JSONResponse

type GetSchool401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetSchool401JSONResponse) VisitGetSchoolResponse

func (response GetSchool401JSONResponse) VisitGetSchoolResponse(w http.ResponseWriter) error

type GetSchool404JSONResponse

type GetSchool404JSONResponse struct{ NotFoundJSONResponse }

func (GetSchool404JSONResponse) VisitGetSchoolResponse

func (response GetSchool404JSONResponse) VisitGetSchoolResponse(w http.ResponseWriter) error

type GetSchool500JSONResponse

type GetSchool500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (GetSchool500JSONResponse) VisitGetSchoolResponse

func (response GetSchool500JSONResponse) VisitGetSchoolResponse(w http.ResponseWriter) error

type GetSchoolRequestObject

type GetSchoolRequestObject struct {
SchoolId openapi_types.UUID `json:"school_id"`
}

type GetSchoolResponseObject

type GetSchoolResponseObject interface {
VisitGetSchoolResponse(w http.ResponseWriter) error
}

type GetStudyGuide200JSONResponse

type GetStudyGuide200JSONResponse StudyGuideDetailResponse

func (GetStudyGuide200JSONResponse) VisitGetStudyGuideResponse

func (response GetStudyGuide200JSONResponse) VisitGetStudyGuideResponse(w http.ResponseWriter) error

type GetStudyGuide400JSONResponse

type GetStudyGuide400JSONResponse struct{ BadRequestJSONResponse }

func (GetStudyGuide400JSONResponse) VisitGetStudyGuideResponse

func (response GetStudyGuide400JSONResponse) VisitGetStudyGuideResponse(w http.ResponseWriter) error

type GetStudyGuide401JSONResponse

type GetStudyGuide401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetStudyGuide401JSONResponse) VisitGetStudyGuideResponse

func (response GetStudyGuide401JSONResponse) VisitGetStudyGuideResponse(w http.ResponseWriter) error

type GetStudyGuide404JSONResponse

type GetStudyGuide404JSONResponse struct{ NotFoundJSONResponse }

func (GetStudyGuide404JSONResponse) VisitGetStudyGuideResponse

func (response GetStudyGuide404JSONResponse) VisitGetStudyGuideResponse(w http.ResponseWriter) error

type GetStudyGuide500JSONResponse

type GetStudyGuide500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (GetStudyGuide500JSONResponse) VisitGetStudyGuideResponse

func (response GetStudyGuide500JSONResponse) VisitGetStudyGuideResponse(w http.ResponseWriter) error

type GetStudyGuideRequestObject

type GetStudyGuideRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type GetStudyGuideResponseObject

type GetStudyGuideResponseObject interface {
VisitGetStudyGuideResponse(w http.ResponseWriter) error
}

type GrantResponse

GrantResponse A file permission grant

type GrantResponse struct {
CreatedAt time.Time `json:"created_at"`
FileId openapi_types.UUID `json:"file_id"`
GrantedBy openapi_types.UUID `json:"granted_by"`
GranteeId openapi_types.UUID `json:"grantee_id"`
GranteeType string `json:"grantee_type"`
Id openapi_types.UUID `json:"id"`
Permission string `json:"permission"`
}

type GuideCourseSummary

GuideCourseSummary Compact course payload embedded in StudyGuideDetailResponse. Mirrors EnrollmentCourseSummary but lives here separately so the two surfaces can evolve independently.

type GuideCourseSummary struct {
Department string `json:"department"`
Id openapi_types.UUID `json:"id"`
Number string `json:"number"`
Title string `json:"title"`
}

type InternalServerError

InternalServerError Standardized error response structure matching application error domains

type InternalServerError = AppError

type InternalServerErrorJSONResponse

type InternalServerErrorJSONResponse AppError

type InvalidParamFormatError

type InvalidParamFormatError struct {
ParamName string
Err error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type JoinSection201JSONResponse

type JoinSection201JSONResponse CourseMemberResponse

func (JoinSection201JSONResponse) VisitJoinSectionResponse

func (response JoinSection201JSONResponse) VisitJoinSectionResponse(w http.ResponseWriter) error

type JoinSection400JSONResponse

type JoinSection400JSONResponse struct{ BadRequestJSONResponse }

func (JoinSection400JSONResponse) VisitJoinSectionResponse

func (response JoinSection400JSONResponse) VisitJoinSectionResponse(w http.ResponseWriter) error

type JoinSection401JSONResponse

type JoinSection401JSONResponse struct{ UnauthorizedJSONResponse }

func (JoinSection401JSONResponse) VisitJoinSectionResponse

func (response JoinSection401JSONResponse) VisitJoinSectionResponse(w http.ResponseWriter) error

type JoinSection404JSONResponse

type JoinSection404JSONResponse struct{ NotFoundJSONResponse }

func (JoinSection404JSONResponse) VisitJoinSectionResponse

func (response JoinSection404JSONResponse) VisitJoinSectionResponse(w http.ResponseWriter) error

type JoinSection409JSONResponse

type JoinSection409JSONResponse struct{ ConflictJSONResponse }

func (JoinSection409JSONResponse) VisitJoinSectionResponse

func (response JoinSection409JSONResponse) VisitJoinSectionResponse(w http.ResponseWriter) error

type JoinSection500JSONResponse

type JoinSection500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (JoinSection500JSONResponse) VisitJoinSectionResponse

func (response JoinSection500JSONResponse) VisitJoinSectionResponse(w http.ResponseWriter) error

type JoinSectionRequestObject

type JoinSectionRequestObject struct {
CourseId openapi_types.UUID `json:"course_id"`
SectionId openapi_types.UUID `json:"section_id"`
}

type JoinSectionResponseObject

type JoinSectionResponseObject interface {
VisitJoinSectionResponse(w http.ResponseWriter) error
}

type LeaveSection204Response

type LeaveSection204Response struct {
}

func (LeaveSection204Response) VisitLeaveSectionResponse

func (response LeaveSection204Response) VisitLeaveSectionResponse(w http.ResponseWriter) error

type LeaveSection400JSONResponse

type LeaveSection400JSONResponse struct{ BadRequestJSONResponse }

func (LeaveSection400JSONResponse) VisitLeaveSectionResponse

func (response LeaveSection400JSONResponse) VisitLeaveSectionResponse(w http.ResponseWriter) error

type LeaveSection401JSONResponse

type LeaveSection401JSONResponse struct{ UnauthorizedJSONResponse }

func (LeaveSection401JSONResponse) VisitLeaveSectionResponse

func (response LeaveSection401JSONResponse) VisitLeaveSectionResponse(w http.ResponseWriter) error

type LeaveSection404JSONResponse

type LeaveSection404JSONResponse struct{ NotFoundJSONResponse }

func (LeaveSection404JSONResponse) VisitLeaveSectionResponse

func (response LeaveSection404JSONResponse) VisitLeaveSectionResponse(w http.ResponseWriter) error

type LeaveSection500JSONResponse

type LeaveSection500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (LeaveSection500JSONResponse) VisitLeaveSectionResponse

func (response LeaveSection500JSONResponse) VisitLeaveSectionResponse(w http.ResponseWriter) error

type LeaveSectionRequestObject

type LeaveSectionRequestObject struct {
CourseId openapi_types.UUID `json:"course_id"`
SectionId openapi_types.UUID `json:"section_id"`
}

type LeaveSectionResponseObject

type LeaveSectionResponseObject interface {
VisitLeaveSectionResponse(w http.ResponseWriter) error
}

type ListCourses200JSONResponse

type ListCourses200JSONResponse ListCoursesResponse

func (ListCourses200JSONResponse) VisitListCoursesResponse

func (response ListCourses200JSONResponse) VisitListCoursesResponse(w http.ResponseWriter) error

type ListCourses400JSONResponse

type ListCourses400JSONResponse struct{ BadRequestJSONResponse }

func (ListCourses400JSONResponse) VisitListCoursesResponse

func (response ListCourses400JSONResponse) VisitListCoursesResponse(w http.ResponseWriter) error

type ListCourses401JSONResponse

type ListCourses401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListCourses401JSONResponse) VisitListCoursesResponse

func (response ListCourses401JSONResponse) VisitListCoursesResponse(w http.ResponseWriter) error

type ListCourses500JSONResponse

type ListCourses500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (ListCourses500JSONResponse) VisitListCoursesResponse

func (response ListCourses500JSONResponse) VisitListCoursesResponse(w http.ResponseWriter) error

type ListCoursesParams

ListCoursesParams defines parameters for ListCourses.

type ListCoursesParams struct {
// SchoolId Filter by school UUID
SchoolId *openapi_types.UUID `form:"school_id,omitempty" json:"school_id,omitempty"`

// Department Exact department code match (case-insensitive, e.g. "CPTS")
Department *string `form:"department,omitempty" json:"department,omitempty"`

// Q Search term, matches against title (trigram), department, or number (case-insensitive)
Q *string `form:"q,omitempty" json:"q,omitempty"`

// SortBy Database column to sort the results by
SortBy *ListCoursesParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`

// SortDir Sorting direction (ascending or descending)
SortDir *ListCoursesParamsSortDir `form:"sort_dir,omitempty" json:"sort_dir,omitempty"`

// PageLimit Maximum number of courses to return per page
PageLimit *int `form:"page_limit,omitempty" json:"page_limit,omitempty"`

// Cursor Opaque pagination cursor token obtained from the previous response
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}

type ListCoursesParamsSortBy

ListCoursesParamsSortBy defines parameters for ListCourses.

type ListCoursesParamsSortBy string

Defines values for ListCoursesParamsSortBy.

const (
ListCoursesParamsSortByCreatedAt ListCoursesParamsSortBy = "created_at"
ListCoursesParamsSortByDepartment ListCoursesParamsSortBy = "department"
ListCoursesParamsSortByNumber ListCoursesParamsSortBy = "number"
ListCoursesParamsSortByTitle ListCoursesParamsSortBy = "title"
)

func (ListCoursesParamsSortBy) Valid

func (e ListCoursesParamsSortBy) Valid() bool

Valid indicates whether the value is a known member of the ListCoursesParamsSortBy enum.

type ListCoursesParamsSortDir

ListCoursesParamsSortDir defines parameters for ListCourses.

type ListCoursesParamsSortDir string

Defines values for ListCoursesParamsSortDir.

const (
ListCoursesParamsSortDirAsc ListCoursesParamsSortDir = "asc"
ListCoursesParamsSortDirDesc ListCoursesParamsSortDir = "desc"
)

func (ListCoursesParamsSortDir) Valid

func (e ListCoursesParamsSortDir) Valid() bool

Valid indicates whether the value is a known member of the ListCoursesParamsSortDir enum.

type ListCoursesRequestObject

type ListCoursesRequestObject struct {
Params ListCoursesParams
}

type ListCoursesResponse

ListCoursesResponse A paginated collection of courses

type ListCoursesResponse struct {
Courses []CourseResponse `json:"courses"`
HasMore bool `json:"has_more"`
NextCursor *string `json:"next_cursor,omitempty"`
}

type ListCoursesResponseObject

type ListCoursesResponseObject interface {
VisitListCoursesResponse(w http.ResponseWriter) error
}

type ListFiles200JSONResponse

type ListFiles200JSONResponse ListFilesResponse

func (ListFiles200JSONResponse) VisitListFilesResponse

func (response ListFiles200JSONResponse) VisitListFilesResponse(w http.ResponseWriter) error

type ListFiles400JSONResponse

type ListFiles400JSONResponse struct{ BadRequestJSONResponse }

func (ListFiles400JSONResponse) VisitListFilesResponse

func (response ListFiles400JSONResponse) VisitListFilesResponse(w http.ResponseWriter) error

type ListFiles401JSONResponse

type ListFiles401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListFiles401JSONResponse) VisitListFilesResponse

func (response ListFiles401JSONResponse) VisitListFilesResponse(w http.ResponseWriter) error

type ListFiles500JSONResponse

type ListFiles500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (ListFiles500JSONResponse) VisitListFilesResponse

func (response ListFiles500JSONResponse) VisitListFilesResponse(w http.ResponseWriter) error

type ListFilesParams

ListFilesParams defines parameters for ListFiles.

type ListFilesParams struct {
// Scope Filter files by ownership or access level
Scope *ListFilesParamsScope `form:"scope,omitempty" json:"scope,omitempty"`

// Status Filter files by processing status
Status *ListFilesParamsStatus `form:"status,omitempty" json:"status,omitempty"`

// MimeType Filter by precise document mime-type classification
MimeType *ListFilesParamsMimeType `form:"mime_type,omitempty" json:"mime_type,omitempty"`

// MinSize Minimum file size in bytes
MinSize *int64 `form:"min_size,omitempty" json:"min_size,omitempty"`

// MaxSize Maximum file size in bytes
MaxSize *int64 `form:"max_size,omitempty" json:"max_size,omitempty"`

// CreatedFrom Filter for files created on or after this UTC timestamp
CreatedFrom *time.Time `form:"created_from,omitempty" json:"created_from,omitempty"`

// CreatedTo Filter for files created on or before this UTC timestamp
CreatedTo *time.Time `form:"created_to,omitempty" json:"created_to,omitempty"`

// UpdatedFrom Filter for files updated on or after this UTC timestamp
UpdatedFrom *time.Time `form:"updated_from,omitempty" json:"updated_from,omitempty"`

// UpdatedTo Filter for files updated on or before this UTC timestamp
UpdatedTo *time.Time `form:"updated_to,omitempty" json:"updated_to,omitempty"`

// Q Search term to partially match against file names
Q *string `form:"q,omitempty" json:"q,omitempty"`

// SortBy Database column to sort the results by
SortBy *ListFilesParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`

// SortDir Sorting direction (ascending or descending)
SortDir *ListFilesParamsSortDir `form:"sort_dir,omitempty" json:"sort_dir,omitempty"`

// PageLimit Maximum number of files to return per page
PageLimit *int `form:"page_limit,omitempty" json:"page_limit,omitempty"`

// Cursor Opaque pagination cursor token obtained from the previous response
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}

type ListFilesParamsMimeType

ListFilesParamsMimeType defines parameters for ListFiles.

type ListFilesParamsMimeType string

Defines values for ListFilesParamsMimeType.

const (
ListFilesParamsMimeTypeApplicationepubZip ListFilesParamsMimeType = "application/epub+zip"
ListFilesParamsMimeTypeApplicationpdf ListFilesParamsMimeType = "application/pdf"
ListFilesParamsMimeTypeApplicationvndOpenxmlformatsOfficedocumentPresentationmlPresentation ListFilesParamsMimeType = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
ListFilesParamsMimeTypeApplicationvndOpenxmlformatsOfficedocumentWordprocessingmlDocument ListFilesParamsMimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
ListFilesParamsMimeTypeImagejpeg ListFilesParamsMimeType = "image/jpeg"
ListFilesParamsMimeTypeImagepng ListFilesParamsMimeType = "image/png"
ListFilesParamsMimeTypeImagewebp ListFilesParamsMimeType = "image/webp"
ListFilesParamsMimeTypeTextplain ListFilesParamsMimeType = "text/plain"
)

func (ListFilesParamsMimeType) Valid

func (e ListFilesParamsMimeType) Valid() bool

Valid indicates whether the value is a known member of the ListFilesParamsMimeType enum.

type ListFilesParamsScope

ListFilesParamsScope defines parameters for ListFiles.

type ListFilesParamsScope string

Defines values for ListFilesParamsScope.

const (
Accessible ListFilesParamsScope = "accessible"
Course ListFilesParamsScope = "course"
Owned ListFilesParamsScope = "owned"
StudyGuide ListFilesParamsScope = "study_guide"
)

func (ListFilesParamsScope) Valid

func (e ListFilesParamsScope) Valid() bool

Valid indicates whether the value is a known member of the ListFilesParamsScope enum.

type ListFilesParamsSortBy

ListFilesParamsSortBy defines parameters for ListFiles.

type ListFilesParamsSortBy string

Defines values for ListFilesParamsSortBy.

const (
ListFilesParamsSortByCreatedAt ListFilesParamsSortBy = "created_at"
ListFilesParamsSortByMimeType ListFilesParamsSortBy = "mime_type"
ListFilesParamsSortByName ListFilesParamsSortBy = "name"
ListFilesParamsSortBySize ListFilesParamsSortBy = "size"
ListFilesParamsSortByStatus ListFilesParamsSortBy = "status"
ListFilesParamsSortByUpdatedAt ListFilesParamsSortBy = "updated_at"
)

func (ListFilesParamsSortBy) Valid

func (e ListFilesParamsSortBy) Valid() bool

Valid indicates whether the value is a known member of the ListFilesParamsSortBy enum.

type ListFilesParamsSortDir

ListFilesParamsSortDir defines parameters for ListFiles.

type ListFilesParamsSortDir string

Defines values for ListFilesParamsSortDir.

const (
Asc ListFilesParamsSortDir = "asc"
Desc ListFilesParamsSortDir = "desc"
)

func (ListFilesParamsSortDir) Valid

func (e ListFilesParamsSortDir) Valid() bool

Valid indicates whether the value is a known member of the ListFilesParamsSortDir enum.

type ListFilesParamsStatus

ListFilesParamsStatus defines parameters for ListFiles.

type ListFilesParamsStatus string

Defines values for ListFilesParamsStatus.

const (
Complete ListFilesParamsStatus = "complete"
Failed ListFilesParamsStatus = "failed"
Pending ListFilesParamsStatus = "pending"
)

func (ListFilesParamsStatus) Valid

func (e ListFilesParamsStatus) Valid() bool

Valid indicates whether the value is a known member of the ListFilesParamsStatus enum.

type ListFilesRequestObject

type ListFilesRequestObject struct {
Params ListFilesParams
}

type ListFilesResponse

ListFilesResponse A paginated collection of files

type ListFilesResponse struct {
Files []FileResponse `json:"files"`
HasMore bool `json:"has_more"`
NextCursor *string `json:"next_cursor,omitempty"`
}

type ListFilesResponseObject

type ListFilesResponseObject interface {
VisitListFilesResponse(w http.ResponseWriter) error
}

type ListMyEnrollments200JSONResponse

type ListMyEnrollments200JSONResponse ListMyEnrollmentsResponse

func (ListMyEnrollments200JSONResponse) VisitListMyEnrollmentsResponse

func (response ListMyEnrollments200JSONResponse) VisitListMyEnrollmentsResponse(w http.ResponseWriter) error

type ListMyEnrollments400JSONResponse

type ListMyEnrollments400JSONResponse struct{ BadRequestJSONResponse }

func (ListMyEnrollments400JSONResponse) VisitListMyEnrollmentsResponse

func (response ListMyEnrollments400JSONResponse) VisitListMyEnrollmentsResponse(w http.ResponseWriter) error

type ListMyEnrollments401JSONResponse

type ListMyEnrollments401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListMyEnrollments401JSONResponse) VisitListMyEnrollmentsResponse

func (response ListMyEnrollments401JSONResponse) VisitListMyEnrollmentsResponse(w http.ResponseWriter) error

type ListMyEnrollments500JSONResponse

type ListMyEnrollments500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (ListMyEnrollments500JSONResponse) VisitListMyEnrollmentsResponse

func (response ListMyEnrollments500JSONResponse) VisitListMyEnrollmentsResponse(w http.ResponseWriter) error

type ListMyEnrollmentsParams

ListMyEnrollmentsParams defines parameters for ListMyEnrollments.

type ListMyEnrollmentsParams struct {
// Term Exact-match term filter (e.g. "Spring 2026")
Term *string `form:"term,omitempty" json:"term,omitempty"`

// Role Filter to a specific course-member role
Role *ListMyEnrollmentsParamsRole `form:"role,omitempty" json:"role,omitempty"`
}

type ListMyEnrollmentsParamsRole

ListMyEnrollmentsParamsRole defines parameters for ListMyEnrollments.

type ListMyEnrollmentsParamsRole string

Defines values for ListMyEnrollmentsParamsRole.

const (
ListMyEnrollmentsParamsRoleInstructor ListMyEnrollmentsParamsRole = "instructor"
ListMyEnrollmentsParamsRoleStudent ListMyEnrollmentsParamsRole = "student"
ListMyEnrollmentsParamsRoleTa ListMyEnrollmentsParamsRole = "ta"
)

func (ListMyEnrollmentsParamsRole) Valid

func (e ListMyEnrollmentsParamsRole) Valid() bool

Valid indicates whether the value is a known member of the ListMyEnrollmentsParamsRole enum.

type ListMyEnrollmentsRequestObject

type ListMyEnrollmentsRequestObject struct {
Params ListMyEnrollmentsParams
}

type ListMyEnrollmentsResponse

ListMyEnrollmentsResponse All enrollments for the authenticated user

type ListMyEnrollmentsResponse struct {
Enrollments []EnrollmentResponse `json:"enrollments"`
}

type ListMyEnrollmentsResponseObject

type ListMyEnrollmentsResponseObject interface {
VisitListMyEnrollmentsResponse(w http.ResponseWriter) error
}

type ListQuizzes200JSONResponse

type ListQuizzes200JSONResponse ListQuizzesResponse

func (ListQuizzes200JSONResponse) VisitListQuizzesResponse

func (response ListQuizzes200JSONResponse) VisitListQuizzesResponse(w http.ResponseWriter) error

type ListQuizzes401JSONResponse

type ListQuizzes401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListQuizzes401JSONResponse) VisitListQuizzesResponse

func (response ListQuizzes401JSONResponse) VisitListQuizzesResponse(w http.ResponseWriter) error

type ListQuizzes404JSONResponse

type ListQuizzes404JSONResponse struct{ NotFoundJSONResponse }

func (ListQuizzes404JSONResponse) VisitListQuizzesResponse

func (response ListQuizzes404JSONResponse) VisitListQuizzesResponse(w http.ResponseWriter) error

type ListQuizzes500JSONResponse

type ListQuizzes500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (ListQuizzes500JSONResponse) VisitListQuizzesResponse

func (response ListQuizzes500JSONResponse) VisitListQuizzesResponse(w http.ResponseWriter) error

type ListQuizzesRequestObject

type ListQuizzesRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type ListQuizzesResponse

ListQuizzesResponse A non-paginated collection of quizzes for one study guide. The spec deliberately omits pagination -- guides typically host fewer than ten quizzes and the practice page renders them all in one shot.

type ListQuizzesResponse struct {
Quizzes []QuizListItemResponse `json:"quizzes"`
}

type ListQuizzesResponseObject

type ListQuizzesResponseObject interface {
VisitListQuizzesResponse(w http.ResponseWriter) error
}

type ListSchools200JSONResponse

type ListSchools200JSONResponse ListSchoolsResponse

func (ListSchools200JSONResponse) VisitListSchoolsResponse

func (response ListSchools200JSONResponse) VisitListSchoolsResponse(w http.ResponseWriter) error

type ListSchools400JSONResponse

type ListSchools400JSONResponse struct{ BadRequestJSONResponse }

func (ListSchools400JSONResponse) VisitListSchoolsResponse

func (response ListSchools400JSONResponse) VisitListSchoolsResponse(w http.ResponseWriter) error

type ListSchools401JSONResponse

type ListSchools401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListSchools401JSONResponse) VisitListSchoolsResponse

func (response ListSchools401JSONResponse) VisitListSchoolsResponse(w http.ResponseWriter) error

type ListSchools500JSONResponse

type ListSchools500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (ListSchools500JSONResponse) VisitListSchoolsResponse

func (response ListSchools500JSONResponse) VisitListSchoolsResponse(w http.ResponseWriter) error

type ListSchoolsParams

ListSchoolsParams defines parameters for ListSchools.

type ListSchoolsParams struct {
// Q Search term, partial match against school name (trigram) or exact match against acronym (case-insensitive)
Q *string `form:"q,omitempty" json:"q,omitempty"`

// PageLimit Maximum number of schools to return per page
PageLimit *int `form:"page_limit,omitempty" json:"page_limit,omitempty"`

// Cursor Opaque pagination cursor token obtained from the previous response
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}

type ListSchoolsRequestObject

type ListSchoolsRequestObject struct {
Params ListSchoolsParams
}

type ListSchoolsResponse

ListSchoolsResponse A paginated collection of schools

type ListSchoolsResponse struct {
HasMore bool `json:"has_more"`
NextCursor *string `json:"next_cursor,omitempty"`
Schools []SchoolResponse `json:"schools"`
}

type ListSchoolsResponseObject

type ListSchoolsResponseObject interface {
VisitListSchoolsResponse(w http.ResponseWriter) error
}

type ListSectionMembers200JSONResponse

type ListSectionMembers200JSONResponse ListSectionMembersResponse

func (ListSectionMembers200JSONResponse) VisitListSectionMembersResponse

func (response ListSectionMembers200JSONResponse) VisitListSectionMembersResponse(w http.ResponseWriter) error

type ListSectionMembers400JSONResponse

type ListSectionMembers400JSONResponse struct{ BadRequestJSONResponse }

func (ListSectionMembers400JSONResponse) VisitListSectionMembersResponse

func (response ListSectionMembers400JSONResponse) VisitListSectionMembersResponse(w http.ResponseWriter) error

type ListSectionMembers401JSONResponse

type ListSectionMembers401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListSectionMembers401JSONResponse) VisitListSectionMembersResponse

func (response ListSectionMembers401JSONResponse) VisitListSectionMembersResponse(w http.ResponseWriter) error

type ListSectionMembers404JSONResponse

type ListSectionMembers404JSONResponse struct{ NotFoundJSONResponse }

func (ListSectionMembers404JSONResponse) VisitListSectionMembersResponse

func (response ListSectionMembers404JSONResponse) VisitListSectionMembersResponse(w http.ResponseWriter) error

type ListSectionMembers500JSONResponse

type ListSectionMembers500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (ListSectionMembers500JSONResponse) VisitListSectionMembersResponse

func (response ListSectionMembers500JSONResponse) VisitListSectionMembersResponse(w http.ResponseWriter) error

type ListSectionMembersParams

ListSectionMembersParams defines parameters for ListSectionMembers.

type ListSectionMembersParams struct {
// Role Filter to members with a specific role
Role *ListSectionMembersParamsRole `form:"role,omitempty" json:"role,omitempty"`

// Limit Maximum number of members to return per page
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

// Cursor Opaque keyset cursor token from the previous page
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}

type ListSectionMembersParamsRole

ListSectionMembersParamsRole defines parameters for ListSectionMembers.

type ListSectionMembersParamsRole string

Defines values for ListSectionMembersParamsRole.

const (
ListSectionMembersParamsRoleInstructor ListSectionMembersParamsRole = "instructor"
ListSectionMembersParamsRoleStudent ListSectionMembersParamsRole = "student"
ListSectionMembersParamsRoleTa ListSectionMembersParamsRole = "ta"
)

func (ListSectionMembersParamsRole) Valid

func (e ListSectionMembersParamsRole) Valid() bool

Valid indicates whether the value is a known member of the ListSectionMembersParamsRole enum.

type ListSectionMembersRequestObject

type ListSectionMembersRequestObject struct {
CourseId openapi_types.UUID `json:"course_id"`
SectionId openapi_types.UUID `json:"section_id"`
Params ListSectionMembersParams
}

type ListSectionMembersResponse

ListSectionMembersResponse A paginated collection of section members

type ListSectionMembersResponse struct {
HasMore bool `json:"has_more"`
Members []SectionMemberResponse `json:"members"`
NextCursor *string `json:"next_cursor,omitempty"`
}

type ListSectionMembersResponseObject

type ListSectionMembersResponseObject interface {
VisitListSectionMembersResponse(w http.ResponseWriter) error
}

type ListStudyGuides200JSONResponse

type ListStudyGuides200JSONResponse ListStudyGuidesResponse

func (ListStudyGuides200JSONResponse) VisitListStudyGuidesResponse

func (response ListStudyGuides200JSONResponse) VisitListStudyGuidesResponse(w http.ResponseWriter) error

type ListStudyGuides400JSONResponse

type ListStudyGuides400JSONResponse struct{ BadRequestJSONResponse }

func (ListStudyGuides400JSONResponse) VisitListStudyGuidesResponse

func (response ListStudyGuides400JSONResponse) VisitListStudyGuidesResponse(w http.ResponseWriter) error

type ListStudyGuides401JSONResponse

type ListStudyGuides401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListStudyGuides401JSONResponse) VisitListStudyGuidesResponse

func (response ListStudyGuides401JSONResponse) VisitListStudyGuidesResponse(w http.ResponseWriter) error

type ListStudyGuides404JSONResponse

type ListStudyGuides404JSONResponse struct{ NotFoundJSONResponse }

func (ListStudyGuides404JSONResponse) VisitListStudyGuidesResponse

func (response ListStudyGuides404JSONResponse) VisitListStudyGuidesResponse(w http.ResponseWriter) error

type ListStudyGuides500JSONResponse

type ListStudyGuides500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (ListStudyGuides500JSONResponse) VisitListStudyGuidesResponse

func (response ListStudyGuides500JSONResponse) VisitListStudyGuidesResponse(w http.ResponseWriter) error

type ListStudyGuidesParams

ListStudyGuidesParams defines parameters for ListStudyGuides.

type ListStudyGuidesParams struct {
// Q Case-insensitive partial match against title and tags
Q *string `form:"q,omitempty" json:"q,omitempty"`

// Tag Filter by exact tag (case-sensitive). Repeatable; multiple
// values are AND-matched (a guide must carry every supplied
// tag to be returned).
Tag *[]string `form:"tag,omitempty" json:"tag,omitempty"`

// SortBy Sort field
SortBy *ListStudyGuidesParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`

// SortDir Sort direction
SortDir *ListStudyGuidesParamsSortDir `form:"sort_dir,omitempty" json:"sort_dir,omitempty"`

// PageLimit Maximum number of guides per page
PageLimit *int `form:"page_limit,omitempty" json:"page_limit,omitempty"`

// Cursor Opaque keyset cursor token from the previous page
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
}

type ListStudyGuidesParamsSortBy

ListStudyGuidesParamsSortBy defines parameters for ListStudyGuides.

type ListStudyGuidesParamsSortBy string

Defines values for ListStudyGuidesParamsSortBy.

const (
Newest ListStudyGuidesParamsSortBy = "newest"
Score ListStudyGuidesParamsSortBy = "score"
Updated ListStudyGuidesParamsSortBy = "updated"
Views ListStudyGuidesParamsSortBy = "views"
)

func (ListStudyGuidesParamsSortBy) Valid

func (e ListStudyGuidesParamsSortBy) Valid() bool

Valid indicates whether the value is a known member of the ListStudyGuidesParamsSortBy enum.

type ListStudyGuidesParamsSortDir

ListStudyGuidesParamsSortDir defines parameters for ListStudyGuides.

type ListStudyGuidesParamsSortDir string

Defines values for ListStudyGuidesParamsSortDir.

const (
ListStudyGuidesParamsSortDirAsc ListStudyGuidesParamsSortDir = "asc"
ListStudyGuidesParamsSortDirDesc ListStudyGuidesParamsSortDir = "desc"
)

func (ListStudyGuidesParamsSortDir) Valid

func (e ListStudyGuidesParamsSortDir) Valid() bool

Valid indicates whether the value is a known member of the ListStudyGuidesParamsSortDir enum.

type ListStudyGuidesRequestObject

type ListStudyGuidesRequestObject struct {
CourseId openapi_types.UUID `json:"course_id"`
Params ListStudyGuidesParams
}

type ListStudyGuidesResponse

ListStudyGuidesResponse A paginated collection of study guides for a course

type ListStudyGuidesResponse struct {
HasMore bool `json:"has_more"`
NextCursor *string `json:"next_cursor,omitempty"`
StudyGuides []StudyGuideListItemResponse `json:"study_guides"`
}

type ListStudyGuidesResponseObject

type ListStudyGuidesResponseObject interface {
VisitListStudyGuidesResponse(w http.ResponseWriter) error
}

type MembershipCheckResponse

MembershipCheckResponse Per-section membership status for the authenticated user. `enrolled` is always present; `role` and `joined_at` are non-null only when `enrolled` is true. Both nullable fields are emitted as JSON null (not omitted) so the frontend can safely destructure.

type MembershipCheckResponse struct {
Enrolled bool `json:"enrolled"`
JoinedAt *time.Time `json:"joined_at"`
Role *MembershipCheckResponseRole `json:"role"`
}

type MembershipCheckResponseRole

MembershipCheckResponseRole defines model for MembershipCheckResponse.Role.

type MembershipCheckResponseRole string

Defines values for MembershipCheckResponseRole.

const (
MembershipCheckResponseRoleInstructor MembershipCheckResponseRole = "instructor"
MembershipCheckResponseRoleStudent MembershipCheckResponseRole = "student"
MembershipCheckResponseRoleTa MembershipCheckResponseRole = "ta"
)

func (MembershipCheckResponseRole) Valid

func (e MembershipCheckResponseRole) Valid() bool

Valid indicates whether the value is a known member of the MembershipCheckResponseRole enum.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFound

NotFound Standardized error response structure matching application error domains

type NotFound = AppError

type NotFoundJSONResponse

type NotFoundJSONResponse AppError

type QuizDetailResponse

QuizDetailResponse Full quiz payload returned by POST /api/study-guides/{id}/quizzes (and the future GET /api/quizzes/{quiz_id}). Includes the embedded study guide id, the creator (privacy floor: id + first_name + last_name only), and every question with its options and correct answer.

type QuizDetailResponse struct {
CreatedAt time.Time `json:"created_at"`

// Creator Compact user payload used as the `creator` of a study guide. Same
// privacy floor as SectionMemberResponse -- no email, no clerk_id.
Creator CreatorSummary `json:"creator"`
Description *string `json:"description"`
Id openapi_types.UUID `json:"id"`
Questions []QuizQuestionResponse `json:"questions"`
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
}

type QuizListItemResponse

QuizListItemResponse Compact quiz payload returned by GET /api/study-guides/{id}/quizzes. Richer than QuizSummary (which embeds inside StudyGuideDetailResponse and intentionally stays minimal): includes the creator (privacy floor: id + first_name + last_name only), description, and timestamps so the practice page can render the quiz card without a follow-up GET on the quiz detail.

type QuizListItemResponse struct {
CreatedAt time.Time `json:"created_at"`

// Creator Compact user payload used as the `creator` of a study guide. Same
// privacy floor as SectionMemberResponse -- no email, no clerk_id.
Creator CreatorSummary `json:"creator"`
Description *string `json:"description"`
Id openapi_types.UUID `json:"id"`
QuestionCount int64 `json:"question_count"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
}

type QuizQuestionResponse

QuizQuestionResponse A single question on the quiz detail response. The `options` array is present only on `multiple-choice` questions and lists the option text in display order. `correct_answer` is the text of the correct option for MCQ, the boolean for true-false, and the reference answer string for freeform.

type QuizQuestionResponse struct {
// CorrectAnswer The correct answer for this question. String for
// multiple-choice (the winning option's text) and freeform
// (the reference answer); boolean for true-false.
CorrectAnswer interface{} `json:"correct_answer,omitempty"`
Feedback struct {
Correct *string `json:"correct"`
Incorrect *string `json:"incorrect"`
} `json:"feedback"`
Hint *string `json:"hint"`
Id openapi_types.UUID `json:"id"`
Options *[]string `json:"options,omitempty"`
Question string `json:"question"`
SortOrder int `json:"sort_order"`
Type QuizQuestionResponseType `json:"type"`
}

type QuizQuestionResponseType

QuizQuestionResponseType defines model for QuizQuestionResponse.Type.

type QuizQuestionResponseType string

Defines values for QuizQuestionResponseType.

const (
QuizQuestionResponseTypeFreeform QuizQuestionResponseType = "freeform"
QuizQuestionResponseTypeMultipleChoice QuizQuestionResponseType = "multiple-choice"
QuizQuestionResponseTypeTrueFalse QuizQuestionResponseType = "true-false"
)

func (QuizQuestionResponseType) Valid

func (e QuizQuestionResponseType) Valid() bool

Valid indicates whether the value is a known member of the QuizQuestionResponseType enum.

type QuizSummary

QuizSummary Compact quiz payload embedded in StudyGuideDetailResponse. Privacy floor: id + title + question_count only. Creator id, quiz content, and scoring config are intentionally absent -- the quiz detail endpoint (future ticket ASK-142) is the source of truth for those.

type QuizSummary struct {
Id openapi_types.UUID `json:"id"`
QuestionCount int64 `json:"question_count"`
Title string `json:"title"`
}

type RecommendStudyGuide201JSONResponse

type RecommendStudyGuide201JSONResponse RecommendationResponse

func (RecommendStudyGuide201JSONResponse) VisitRecommendStudyGuideResponse

func (response RecommendStudyGuide201JSONResponse) VisitRecommendStudyGuideResponse(w http.ResponseWriter) error

type RecommendStudyGuide400JSONResponse

type RecommendStudyGuide400JSONResponse struct{ BadRequestJSONResponse }

func (RecommendStudyGuide400JSONResponse) VisitRecommendStudyGuideResponse

func (response RecommendStudyGuide400JSONResponse) VisitRecommendStudyGuideResponse(w http.ResponseWriter) error

type RecommendStudyGuide401JSONResponse

type RecommendStudyGuide401JSONResponse struct{ UnauthorizedJSONResponse }

func (RecommendStudyGuide401JSONResponse) VisitRecommendStudyGuideResponse

func (response RecommendStudyGuide401JSONResponse) VisitRecommendStudyGuideResponse(w http.ResponseWriter) error

type RecommendStudyGuide403JSONResponse

type RecommendStudyGuide403JSONResponse struct{ ForbiddenJSONResponse }

func (RecommendStudyGuide403JSONResponse) VisitRecommendStudyGuideResponse

func (response RecommendStudyGuide403JSONResponse) VisitRecommendStudyGuideResponse(w http.ResponseWriter) error

type RecommendStudyGuide404JSONResponse

type RecommendStudyGuide404JSONResponse struct{ NotFoundJSONResponse }

func (RecommendStudyGuide404JSONResponse) VisitRecommendStudyGuideResponse

func (response RecommendStudyGuide404JSONResponse) VisitRecommendStudyGuideResponse(w http.ResponseWriter) error

type RecommendStudyGuide409JSONResponse

type RecommendStudyGuide409JSONResponse struct{ ConflictJSONResponse }

func (RecommendStudyGuide409JSONResponse) VisitRecommendStudyGuideResponse

func (response RecommendStudyGuide409JSONResponse) VisitRecommendStudyGuideResponse(w http.ResponseWriter) error

type RecommendStudyGuide500JSONResponse

type RecommendStudyGuide500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (RecommendStudyGuide500JSONResponse) VisitRecommendStudyGuideResponse

func (response RecommendStudyGuide500JSONResponse) VisitRecommendStudyGuideResponse(w http.ResponseWriter) error

type RecommendStudyGuideRequestObject

type RecommendStudyGuideRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type RecommendStudyGuideResponseObject

type RecommendStudyGuideResponseObject interface {
VisitRecommendStudyGuideResponse(w http.ResponseWriter) error
}

type RecommendationResponse

RecommendationResponse Response body for POST /api/study-guides/{study_guide_id}/recommendations. Returns the freshly-created recommendation row plus the recommender's compact identity (same privacy floor as CreatorSummary -- no email, no clerk_id).

type RecommendationResponse struct {
CreatedAt time.Time `json:"created_at"`

// RecommendedBy Compact user payload used as the `creator` of a study guide. Same
// privacy floor as SectionMemberResponse -- no email, no clerk_id.
RecommendedBy CreatorSummary `json:"recommended_by"`
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type RemoveStudyGuideRecommendation204Response

type RemoveStudyGuideRecommendation204Response struct {
}

func (RemoveStudyGuideRecommendation204Response) VisitRemoveStudyGuideRecommendationResponse

func (response RemoveStudyGuideRecommendation204Response) VisitRemoveStudyGuideRecommendationResponse(w http.ResponseWriter) error

type RemoveStudyGuideRecommendation400JSONResponse

type RemoveStudyGuideRecommendation400JSONResponse struct{ BadRequestJSONResponse }

func (RemoveStudyGuideRecommendation400JSONResponse) VisitRemoveStudyGuideRecommendationResponse

func (response RemoveStudyGuideRecommendation400JSONResponse) VisitRemoveStudyGuideRecommendationResponse(w http.ResponseWriter) error

type RemoveStudyGuideRecommendation401JSONResponse

type RemoveStudyGuideRecommendation401JSONResponse struct{ UnauthorizedJSONResponse }

func (RemoveStudyGuideRecommendation401JSONResponse) VisitRemoveStudyGuideRecommendationResponse

func (response RemoveStudyGuideRecommendation401JSONResponse) VisitRemoveStudyGuideRecommendationResponse(w http.ResponseWriter) error

type RemoveStudyGuideRecommendation403JSONResponse

type RemoveStudyGuideRecommendation403JSONResponse struct{ ForbiddenJSONResponse }

func (RemoveStudyGuideRecommendation403JSONResponse) VisitRemoveStudyGuideRecommendationResponse

func (response RemoveStudyGuideRecommendation403JSONResponse) VisitRemoveStudyGuideRecommendationResponse(w http.ResponseWriter) error

type RemoveStudyGuideRecommendation404JSONResponse

type RemoveStudyGuideRecommendation404JSONResponse struct{ NotFoundJSONResponse }

func (RemoveStudyGuideRecommendation404JSONResponse) VisitRemoveStudyGuideRecommendationResponse

func (response RemoveStudyGuideRecommendation404JSONResponse) VisitRemoveStudyGuideRecommendationResponse(w http.ResponseWriter) error

type RemoveStudyGuideRecommendation500JSONResponse

type RemoveStudyGuideRecommendation500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (RemoveStudyGuideRecommendation500JSONResponse) VisitRemoveStudyGuideRecommendationResponse

func (response RemoveStudyGuideRecommendation500JSONResponse) VisitRemoveStudyGuideRecommendationResponse(w http.ResponseWriter) error

type RemoveStudyGuideRecommendationRequestObject

type RemoveStudyGuideRecommendationRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type RemoveStudyGuideRecommendationResponseObject

type RemoveStudyGuideRecommendationResponseObject interface {
VisitRemoveStudyGuideRecommendationResponse(w http.ResponseWriter) error
}

type RemoveStudyGuideVote204Response

type RemoveStudyGuideVote204Response struct {
}

func (RemoveStudyGuideVote204Response) VisitRemoveStudyGuideVoteResponse

func (response RemoveStudyGuideVote204Response) VisitRemoveStudyGuideVoteResponse(w http.ResponseWriter) error

type RemoveStudyGuideVote400JSONResponse

type RemoveStudyGuideVote400JSONResponse struct{ BadRequestJSONResponse }

func (RemoveStudyGuideVote400JSONResponse) VisitRemoveStudyGuideVoteResponse

func (response RemoveStudyGuideVote400JSONResponse) VisitRemoveStudyGuideVoteResponse(w http.ResponseWriter) error

type RemoveStudyGuideVote401JSONResponse

type RemoveStudyGuideVote401JSONResponse struct{ UnauthorizedJSONResponse }

func (RemoveStudyGuideVote401JSONResponse) VisitRemoveStudyGuideVoteResponse

func (response RemoveStudyGuideVote401JSONResponse) VisitRemoveStudyGuideVoteResponse(w http.ResponseWriter) error

type RemoveStudyGuideVote404JSONResponse

type RemoveStudyGuideVote404JSONResponse struct{ NotFoundJSONResponse }

func (RemoveStudyGuideVote404JSONResponse) VisitRemoveStudyGuideVoteResponse

func (response RemoveStudyGuideVote404JSONResponse) VisitRemoveStudyGuideVoteResponse(w http.ResponseWriter) error

type RemoveStudyGuideVote500JSONResponse

type RemoveStudyGuideVote500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (RemoveStudyGuideVote500JSONResponse) VisitRemoveStudyGuideVoteResponse

func (response RemoveStudyGuideVote500JSONResponse) VisitRemoveStudyGuideVoteResponse(w http.ResponseWriter) error

type RemoveStudyGuideVoteRequestObject

type RemoveStudyGuideVoteRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
}

type RemoveStudyGuideVoteResponseObject

type RemoveStudyGuideVoteResponseObject interface {
VisitRemoveStudyGuideVoteResponse(w http.ResponseWriter) error
}

type RequiredHeaderError

type RequiredHeaderError struct {
ParamName string
Err error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ResourceSummary

ResourceSummary Compact resource payload embedded in StudyGuideDetailResponse. No creator or uploader info -- the study-guide detail caller does not need to know who attached the resource.

type ResourceSummary struct {
CreatedAt time.Time `json:"created_at"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
Title string `json:"title"`
Type ResourceSummaryType `json:"type"`
Url string `json:"url"`
}

type ResourceSummaryType

ResourceSummaryType defines model for ResourceSummary.Type.

type ResourceSummaryType string

Defines values for ResourceSummaryType.

const (
ResourceSummaryTypeArticle ResourceSummaryType = "article"
ResourceSummaryTypeLink ResourceSummaryType = "link"
ResourceSummaryTypePdf ResourceSummaryType = "pdf"
ResourceSummaryTypeVideo ResourceSummaryType = "video"
)

func (ResourceSummaryType) Valid

func (e ResourceSummaryType) Valid() bool

Valid indicates whether the value is a known member of the ResourceSummaryType enum.

type RevokeGrant204Response

type RevokeGrant204Response struct {
}

func (RevokeGrant204Response) VisitRevokeGrantResponse

func (response RevokeGrant204Response) VisitRevokeGrantResponse(w http.ResponseWriter) error

type RevokeGrant400JSONResponse

type RevokeGrant400JSONResponse struct{ BadRequestJSONResponse }

func (RevokeGrant400JSONResponse) VisitRevokeGrantResponse

func (response RevokeGrant400JSONResponse) VisitRevokeGrantResponse(w http.ResponseWriter) error

type RevokeGrant401JSONResponse

type RevokeGrant401JSONResponse struct{ UnauthorizedJSONResponse }

func (RevokeGrant401JSONResponse) VisitRevokeGrantResponse

func (response RevokeGrant401JSONResponse) VisitRevokeGrantResponse(w http.ResponseWriter) error

type RevokeGrant404JSONResponse

type RevokeGrant404JSONResponse struct{ NotFoundJSONResponse }

func (RevokeGrant404JSONResponse) VisitRevokeGrantResponse

func (response RevokeGrant404JSONResponse) VisitRevokeGrantResponse(w http.ResponseWriter) error

type RevokeGrant500JSONResponse

type RevokeGrant500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (RevokeGrant500JSONResponse) VisitRevokeGrantResponse

func (response RevokeGrant500JSONResponse) VisitRevokeGrantResponse(w http.ResponseWriter) error

type RevokeGrantJSONRequestBody

RevokeGrantJSONRequestBody defines body for RevokeGrant for application/json ContentType.

type RevokeGrantJSONRequestBody = RevokeGrantRequest

type RevokeGrantRequest

RevokeGrantRequest Request body for revoking a file grant

type RevokeGrantRequest struct {
GranteeId openapi_types.UUID `json:"grantee_id"`
GranteeType RevokeGrantRequestGranteeType `json:"grantee_type"`
Permission RevokeGrantRequestPermission `json:"permission"`
}

type RevokeGrantRequestGranteeType

RevokeGrantRequestGranteeType defines model for RevokeGrantRequest.GranteeType.

type RevokeGrantRequestGranteeType string

Defines values for RevokeGrantRequestGranteeType.

const (
RevokeGrantRequestGranteeTypeCourse RevokeGrantRequestGranteeType = "course"
RevokeGrantRequestGranteeTypeStudyGuide RevokeGrantRequestGranteeType = "study_guide"
RevokeGrantRequestGranteeTypeUser RevokeGrantRequestGranteeType = "user"
)

func (RevokeGrantRequestGranteeType) Valid

func (e RevokeGrantRequestGranteeType) Valid() bool

Valid indicates whether the value is a known member of the RevokeGrantRequestGranteeType enum.

type RevokeGrantRequestObject

type RevokeGrantRequestObject struct {
FileId openapi_types.UUID `json:"file_id"`
Body *RevokeGrantJSONRequestBody
}

type RevokeGrantRequestPermission

RevokeGrantRequestPermission defines model for RevokeGrantRequest.Permission.

type RevokeGrantRequestPermission string

Defines values for RevokeGrantRequestPermission.

const (
RevokeGrantRequestPermissionDelete RevokeGrantRequestPermission = "delete"
RevokeGrantRequestPermissionShare RevokeGrantRequestPermission = "share"
RevokeGrantRequestPermissionView RevokeGrantRequestPermission = "view"
)

func (RevokeGrantRequestPermission) Valid

func (e RevokeGrantRequestPermission) Valid() bool

Valid indicates whether the value is a known member of the RevokeGrantRequestPermission enum.

type RevokeGrantResponseObject

type RevokeGrantResponseObject interface {
VisitRevokeGrantResponse(w http.ResponseWriter) error
}

type SchoolResponse

SchoolResponse A school (university or college)

type SchoolResponse struct {
Acronym string `json:"acronym"`
City *string `json:"city,omitempty"`

// Country ISO 3166-1 alpha-2 country code
Country *string `json:"country,omitempty"`
CreatedAt time.Time `json:"created_at"`
Domain *string `json:"domain,omitempty"`
Id openapi_types.UUID `json:"id"`
Name string `json:"name"`
State *string `json:"state,omitempty"`
Url *string `json:"url,omitempty"`
}

type SchoolSummary

SchoolSummary Compact school payload embedded inside other resources (courses, study guides)

type SchoolSummary struct {
Acronym string `json:"acronym"`
City *string `json:"city,omitempty"`

// Country ISO 3166-1 alpha-2 country code
Country *string `json:"country,omitempty"`
Id openapi_types.UUID `json:"id"`
Name string `json:"name"`
State *string `json:"state,omitempty"`
}

type SectionMemberResponse

SectionMemberResponse Limited per-user payload returned by ListSectionMembers. Email and clerk_id are intentionally NOT exposed -- any authenticated user can list members of any section, so this is the privacy floor for member identity.

type SectionMemberResponse struct {
FirstName string `json:"first_name"`
JoinedAt time.Time `json:"joined_at"`
LastName string `json:"last_name"`
Role SectionMemberResponseRole `json:"role"`
UserId openapi_types.UUID `json:"user_id"`
}

type SectionMemberResponseRole

SectionMemberResponseRole defines model for SectionMemberResponse.Role.

type SectionMemberResponseRole string

Defines values for SectionMemberResponseRole.

const (
SectionMemberResponseRoleInstructor SectionMemberResponseRole = "instructor"
SectionMemberResponseRoleStudent SectionMemberResponseRole = "student"
SectionMemberResponseRoleTa SectionMemberResponseRole = "ta"
)

func (SectionMemberResponseRole) Valid

func (e SectionMemberResponseRole) Valid() bool

Valid indicates whether the value is a known member of the SectionMemberResponseRole enum.

type SectionSummary

SectionSummary A section of a course (term + instructor + roster size)

type SectionSummary struct {
Id openapi_types.UUID `json:"id"`
InstructorName *string `json:"instructor_name,omitempty"`
MemberCount int64 `json:"member_count"`
SectionCode *string `json:"section_code,omitempty"`
Term string `json:"term"`
}

type ServerInterface

ServerInterface represents all server handlers.

type ServerInterface interface {
// List and search courses
// (GET /courses)
ListCourses(w http.ResponseWriter, r *http.Request, params ListCoursesParams)
// Get a course detail with embedded sections
// (GET /courses/{course_id})
GetCourse(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID)
// List the members of a course section
// (GET /courses/{course_id}/sections/{section_id}/members)
ListSectionMembers(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID, params ListSectionMembersParams)
// Join a section as the authenticated user
// (POST /courses/{course_id}/sections/{section_id}/members)
JoinSection(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID)
// Leave a section as the authenticated user
// (DELETE /courses/{course_id}/sections/{section_id}/members/me)
LeaveSection(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID)
// Check the authenticated user's membership in a section
// (GET /courses/{course_id}/sections/{section_id}/members/me)
CheckMembership(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID)
// List study guides for a course
// (GET /courses/{course_id}/study-guides)
ListStudyGuides(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, params ListStudyGuidesParams)
// Create a study guide for a course
// (POST /courses/{course_id}/study-guides)
CreateStudyGuide(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID)
// Create a file reference and get a presigned upload URL
// (POST /files)
CreateFile(w http.ResponseWriter, r *http.Request)
// Delete a file by ID
// (DELETE /files/{file_id})
DeleteFile(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)
// Get a file by ID
// (GET /files/{file_id})
GetFile(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)
// Rename a file
// (PATCH /files/{file_id})
UpdateFile(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)
// Revoke a permission on a file
// (DELETE /files/{file_id}/grants)
RevokeGrant(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)
// Grant a permission on a file
// (POST /files/{file_id}/grants)
CreateGrant(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)
// List the authenticated user's section enrollments
// (GET /me/courses)
ListMyEnrollments(w http.ResponseWriter, r *http.Request, params ListMyEnrollmentsParams)
// List files for the current user
// (GET /me/files)
ListFiles(w http.ResponseWriter, r *http.Request, params ListFilesParams)
// Soft-delete a quiz
// (DELETE /quizzes/{quiz_id})
DeleteQuiz(w http.ResponseWriter, r *http.Request, quizId openapi_types.UUID)
// Update a quiz's metadata (title and/or description)
// (PATCH /quizzes/{quiz_id})
UpdateQuiz(w http.ResponseWriter, r *http.Request, quizId openapi_types.UUID)
// List and search schools
// (GET /schools)
ListSchools(w http.ResponseWriter, r *http.Request, params ListSchoolsParams)
// Get a single school by ID
// (GET /schools/{school_id})
GetSchool(w http.ResponseWriter, r *http.Request, schoolId openapi_types.UUID)
// Soft-delete a study guide
// (DELETE /study-guides/{study_guide_id})
DeleteStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Get a study guide detail
// (GET /study-guides/{study_guide_id})
GetStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Update a study guide
// (PATCH /study-guides/{study_guide_id})
UpdateStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Detach a file from a study guide
// (DELETE /study-guides/{study_guide_id}/files/{file_id})
DetachFile(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID, fileId openapi_types.UUID)
// Attach a file to a study guide
// (POST /study-guides/{study_guide_id}/files/{file_id})
AttachFile(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID, fileId openapi_types.UUID)
// List quizzes attached to a study guide
// (GET /study-guides/{study_guide_id}/quizzes)
ListQuizzes(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Create a quiz attached to a study guide
// (POST /study-guides/{study_guide_id}/quizzes)
CreateQuiz(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Remove the authenticated user's recommendation on a study guide
// (DELETE /study-guides/{study_guide_id}/recommendations)
RemoveStudyGuideRecommendation(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Recommend a study guide
// (POST /study-guides/{study_guide_id}/recommendations)
RecommendStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Attach an external resource to a study guide
// (POST /study-guides/{study_guide_id}/resources)
AttachResource(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Detach a resource from a study guide
// (DELETE /study-guides/{study_guide_id}/resources/{resource_id})
DetachResource(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID, resourceId openapi_types.UUID)
// Remove the authenticated user's vote on a study guide
// (DELETE /study-guides/{study_guide_id}/votes)
RemoveStudyGuideVote(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
// Cast or change a vote on a study guide
// (POST /study-guides/{study_guide_id}/votes)
CastStudyGuideVote(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)
}

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

ServerInterfaceWrapper converts contexts to parameters.

type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

func (*ServerInterfaceWrapper) AttachFile

func (siw *ServerInterfaceWrapper) AttachFile(w http.ResponseWriter, r *http.Request)

AttachFile operation middleware

func (*ServerInterfaceWrapper) AttachResource

func (siw *ServerInterfaceWrapper) AttachResource(w http.ResponseWriter, r *http.Request)

AttachResource operation middleware

func (*ServerInterfaceWrapper) CastStudyGuideVote

func (siw *ServerInterfaceWrapper) CastStudyGuideVote(w http.ResponseWriter, r *http.Request)

CastStudyGuideVote operation middleware

func (*ServerInterfaceWrapper) CheckMembership

func (siw *ServerInterfaceWrapper) CheckMembership(w http.ResponseWriter, r *http.Request)

CheckMembership operation middleware

func (*ServerInterfaceWrapper) CreateFile

func (siw *ServerInterfaceWrapper) CreateFile(w http.ResponseWriter, r *http.Request)

CreateFile operation middleware

func (*ServerInterfaceWrapper) CreateGrant

func (siw *ServerInterfaceWrapper) CreateGrant(w http.ResponseWriter, r *http.Request)

CreateGrant operation middleware

func (*ServerInterfaceWrapper) CreateQuiz

func (siw *ServerInterfaceWrapper) CreateQuiz(w http.ResponseWriter, r *http.Request)

CreateQuiz operation middleware

func (*ServerInterfaceWrapper) CreateStudyGuide

func (siw *ServerInterfaceWrapper) CreateStudyGuide(w http.ResponseWriter, r *http.Request)

CreateStudyGuide operation middleware

func (*ServerInterfaceWrapper) DeleteFile

func (siw *ServerInterfaceWrapper) DeleteFile(w http.ResponseWriter, r *http.Request)

DeleteFile operation middleware

func (*ServerInterfaceWrapper) DeleteQuiz

func (siw *ServerInterfaceWrapper) DeleteQuiz(w http.ResponseWriter, r *http.Request)

DeleteQuiz operation middleware

func (*ServerInterfaceWrapper) DeleteStudyGuide

func (siw *ServerInterfaceWrapper) DeleteStudyGuide(w http.ResponseWriter, r *http.Request)

DeleteStudyGuide operation middleware

func (*ServerInterfaceWrapper) DetachFile

func (siw *ServerInterfaceWrapper) DetachFile(w http.ResponseWriter, r *http.Request)

DetachFile operation middleware

func (*ServerInterfaceWrapper) DetachResource

func (siw *ServerInterfaceWrapper) DetachResource(w http.ResponseWriter, r *http.Request)

DetachResource operation middleware

func (*ServerInterfaceWrapper) GetCourse

func (siw *ServerInterfaceWrapper) GetCourse(w http.ResponseWriter, r *http.Request)

GetCourse operation middleware

func (*ServerInterfaceWrapper) GetFile

func (siw *ServerInterfaceWrapper) GetFile(w http.ResponseWriter, r *http.Request)

GetFile operation middleware

func (*ServerInterfaceWrapper) GetSchool

func (siw *ServerInterfaceWrapper) GetSchool(w http.ResponseWriter, r *http.Request)

GetSchool operation middleware

func (*ServerInterfaceWrapper) GetStudyGuide

func (siw *ServerInterfaceWrapper) GetStudyGuide(w http.ResponseWriter, r *http.Request)

GetStudyGuide operation middleware

func (*ServerInterfaceWrapper) JoinSection

func (siw *ServerInterfaceWrapper) JoinSection(w http.ResponseWriter, r *http.Request)

JoinSection operation middleware

func (*ServerInterfaceWrapper) LeaveSection

func (siw *ServerInterfaceWrapper) LeaveSection(w http.ResponseWriter, r *http.Request)

LeaveSection operation middleware

func (*ServerInterfaceWrapper) ListCourses

func (siw *ServerInterfaceWrapper) ListCourses(w http.ResponseWriter, r *http.Request)

ListCourses operation middleware

func (*ServerInterfaceWrapper) ListFiles

func (siw *ServerInterfaceWrapper) ListFiles(w http.ResponseWriter, r *http.Request)

ListFiles operation middleware

func (*ServerInterfaceWrapper) ListMyEnrollments

func (siw *ServerInterfaceWrapper) ListMyEnrollments(w http.ResponseWriter, r *http.Request)

ListMyEnrollments operation middleware

func (*ServerInterfaceWrapper) ListQuizzes

func (siw *ServerInterfaceWrapper) ListQuizzes(w http.ResponseWriter, r *http.Request)

ListQuizzes operation middleware

func (*ServerInterfaceWrapper) ListSchools

func (siw *ServerInterfaceWrapper) ListSchools(w http.ResponseWriter, r *http.Request)

ListSchools operation middleware

func (*ServerInterfaceWrapper) ListSectionMembers

func (siw *ServerInterfaceWrapper) ListSectionMembers(w http.ResponseWriter, r *http.Request)

ListSectionMembers operation middleware

func (*ServerInterfaceWrapper) ListStudyGuides

func (siw *ServerInterfaceWrapper) ListStudyGuides(w http.ResponseWriter, r *http.Request)

ListStudyGuides operation middleware

func (*ServerInterfaceWrapper) RecommendStudyGuide

func (siw *ServerInterfaceWrapper) RecommendStudyGuide(w http.ResponseWriter, r *http.Request)

RecommendStudyGuide operation middleware

func (*ServerInterfaceWrapper) RemoveStudyGuideRecommendation

func (siw *ServerInterfaceWrapper) RemoveStudyGuideRecommendation(w http.ResponseWriter, r *http.Request)

RemoveStudyGuideRecommendation operation middleware

func (*ServerInterfaceWrapper) RemoveStudyGuideVote

func (siw *ServerInterfaceWrapper) RemoveStudyGuideVote(w http.ResponseWriter, r *http.Request)

RemoveStudyGuideVote operation middleware

func (*ServerInterfaceWrapper) RevokeGrant

func (siw *ServerInterfaceWrapper) RevokeGrant(w http.ResponseWriter, r *http.Request)

RevokeGrant operation middleware

func (*ServerInterfaceWrapper) UpdateFile

func (siw *ServerInterfaceWrapper) UpdateFile(w http.ResponseWriter, r *http.Request)

UpdateFile operation middleware

func (*ServerInterfaceWrapper) UpdateQuiz

func (siw *ServerInterfaceWrapper) UpdateQuiz(w http.ResponseWriter, r *http.Request)

UpdateQuiz operation middleware

func (*ServerInterfaceWrapper) UpdateStudyGuide

func (siw *ServerInterfaceWrapper) UpdateStudyGuide(w http.ResponseWriter, r *http.Request)

UpdateStudyGuide operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc

type StrictServerInterface

StrictServerInterface represents all server handlers.

type StrictServerInterface interface {
// List and search courses
// (GET /courses)
ListCourses(ctx context.Context, request ListCoursesRequestObject) (ListCoursesResponseObject, error)
// Get a course detail with embedded sections
// (GET /courses/{course_id})
GetCourse(ctx context.Context, request GetCourseRequestObject) (GetCourseResponseObject, error)
// List the members of a course section
// (GET /courses/{course_id}/sections/{section_id}/members)
ListSectionMembers(ctx context.Context, request ListSectionMembersRequestObject) (ListSectionMembersResponseObject, error)
// Join a section as the authenticated user
// (POST /courses/{course_id}/sections/{section_id}/members)
JoinSection(ctx context.Context, request JoinSectionRequestObject) (JoinSectionResponseObject, error)
// Leave a section as the authenticated user
// (DELETE /courses/{course_id}/sections/{section_id}/members/me)
LeaveSection(ctx context.Context, request LeaveSectionRequestObject) (LeaveSectionResponseObject, error)
// Check the authenticated user's membership in a section
// (GET /courses/{course_id}/sections/{section_id}/members/me)
CheckMembership(ctx context.Context, request CheckMembershipRequestObject) (CheckMembershipResponseObject, error)
// List study guides for a course
// (GET /courses/{course_id}/study-guides)
ListStudyGuides(ctx context.Context, request ListStudyGuidesRequestObject) (ListStudyGuidesResponseObject, error)
// Create a study guide for a course
// (POST /courses/{course_id}/study-guides)
CreateStudyGuide(ctx context.Context, request CreateStudyGuideRequestObject) (CreateStudyGuideResponseObject, error)
// Create a file reference and get a presigned upload URL
// (POST /files)
CreateFile(ctx context.Context, request CreateFileRequestObject) (CreateFileResponseObject, error)
// Delete a file by ID
// (DELETE /files/{file_id})
DeleteFile(ctx context.Context, request DeleteFileRequestObject) (DeleteFileResponseObject, error)
// Get a file by ID
// (GET /files/{file_id})
GetFile(ctx context.Context, request GetFileRequestObject) (GetFileResponseObject, error)
// Rename a file
// (PATCH /files/{file_id})
UpdateFile(ctx context.Context, request UpdateFileRequestObject) (UpdateFileResponseObject, error)
// Revoke a permission on a file
// (DELETE /files/{file_id}/grants)
RevokeGrant(ctx context.Context, request RevokeGrantRequestObject) (RevokeGrantResponseObject, error)
// Grant a permission on a file
// (POST /files/{file_id}/grants)
CreateGrant(ctx context.Context, request CreateGrantRequestObject) (CreateGrantResponseObject, error)
// List the authenticated user's section enrollments
// (GET /me/courses)
ListMyEnrollments(ctx context.Context, request ListMyEnrollmentsRequestObject) (ListMyEnrollmentsResponseObject, error)
// List files for the current user
// (GET /me/files)
ListFiles(ctx context.Context, request ListFilesRequestObject) (ListFilesResponseObject, error)
// Soft-delete a quiz
// (DELETE /quizzes/{quiz_id})
DeleteQuiz(ctx context.Context, request DeleteQuizRequestObject) (DeleteQuizResponseObject, error)
// Update a quiz's metadata (title and/or description)
// (PATCH /quizzes/{quiz_id})
UpdateQuiz(ctx context.Context, request UpdateQuizRequestObject) (UpdateQuizResponseObject, error)
// List and search schools
// (GET /schools)
ListSchools(ctx context.Context, request ListSchoolsRequestObject) (ListSchoolsResponseObject, error)
// Get a single school by ID
// (GET /schools/{school_id})
GetSchool(ctx context.Context, request GetSchoolRequestObject) (GetSchoolResponseObject, error)
// Soft-delete a study guide
// (DELETE /study-guides/{study_guide_id})
DeleteStudyGuide(ctx context.Context, request DeleteStudyGuideRequestObject) (DeleteStudyGuideResponseObject, error)
// Get a study guide detail
// (GET /study-guides/{study_guide_id})
GetStudyGuide(ctx context.Context, request GetStudyGuideRequestObject) (GetStudyGuideResponseObject, error)
// Update a study guide
// (PATCH /study-guides/{study_guide_id})
UpdateStudyGuide(ctx context.Context, request UpdateStudyGuideRequestObject) (UpdateStudyGuideResponseObject, error)
// Detach a file from a study guide
// (DELETE /study-guides/{study_guide_id}/files/{file_id})
DetachFile(ctx context.Context, request DetachFileRequestObject) (DetachFileResponseObject, error)
// Attach a file to a study guide
// (POST /study-guides/{study_guide_id}/files/{file_id})
AttachFile(ctx context.Context, request AttachFileRequestObject) (AttachFileResponseObject, error)
// List quizzes attached to a study guide
// (GET /study-guides/{study_guide_id}/quizzes)
ListQuizzes(ctx context.Context, request ListQuizzesRequestObject) (ListQuizzesResponseObject, error)
// Create a quiz attached to a study guide
// (POST /study-guides/{study_guide_id}/quizzes)
CreateQuiz(ctx context.Context, request CreateQuizRequestObject) (CreateQuizResponseObject, error)
// Remove the authenticated user's recommendation on a study guide
// (DELETE /study-guides/{study_guide_id}/recommendations)
RemoveStudyGuideRecommendation(ctx context.Context, request RemoveStudyGuideRecommendationRequestObject) (RemoveStudyGuideRecommendationResponseObject, error)
// Recommend a study guide
// (POST /study-guides/{study_guide_id}/recommendations)
RecommendStudyGuide(ctx context.Context, request RecommendStudyGuideRequestObject) (RecommendStudyGuideResponseObject, error)
// Attach an external resource to a study guide
// (POST /study-guides/{study_guide_id}/resources)
AttachResource(ctx context.Context, request AttachResourceRequestObject) (AttachResourceResponseObject, error)
// Detach a resource from a study guide
// (DELETE /study-guides/{study_guide_id}/resources/{resource_id})
DetachResource(ctx context.Context, request DetachResourceRequestObject) (DetachResourceResponseObject, error)
// Remove the authenticated user's vote on a study guide
// (DELETE /study-guides/{study_guide_id}/votes)
RemoveStudyGuideVote(ctx context.Context, request RemoveStudyGuideVoteRequestObject) (RemoveStudyGuideVoteResponseObject, error)
// Cast or change a vote on a study guide
// (POST /study-guides/{study_guide_id}/votes)
CastStudyGuideVote(ctx context.Context, request CastStudyGuideVoteRequestObject) (CastStudyGuideVoteResponseObject, error)
}

type StudyGuideDetailResponse

StudyGuideDetailResponse Full study-guide payload for the detail endpoint. Includes content (excluded from the list payload) plus the authenticated user's own vote state and the nested recommenders / quizzes / resources / files arrays.

type StudyGuideDetailResponse struct {
Content *string `json:"content,omitempty"`

// Course Compact course payload embedded in StudyGuideDetailResponse.
// Mirrors EnrollmentCourseSummary but lives here separately so
// the two surfaces can evolve independently.
Course GuideCourseSummary `json:"course"`
CreatedAt time.Time `json:"created_at"`

// Creator Compact user payload used as the `creator` of a study guide. Same
// privacy floor as SectionMemberResponse -- no email, no clerk_id.
Creator CreatorSummary `json:"creator"`
Description *string `json:"description,omitempty"`
Files []StudyGuideFileSummary `json:"files"`
Id openapi_types.UUID `json:"id"`
IsRecommended bool `json:"is_recommended"`
Quizzes []QuizSummary `json:"quizzes"`
RecommendedBy []CreatorSummary `json:"recommended_by"`
Resources []ResourceSummary `json:"resources"`
Tags []string `json:"tags"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
UserVote *StudyGuideDetailResponseUserVote `json:"user_vote"`
ViewCount int64 `json:"view_count"`
VoteScore int64 `json:"vote_score"`
}

type StudyGuideDetailResponseUserVote

StudyGuideDetailResponseUserVote defines model for StudyGuideDetailResponse.UserVote.

type StudyGuideDetailResponseUserVote string

Defines values for StudyGuideDetailResponseUserVote.

const (
Down StudyGuideDetailResponseUserVote = "down"
Up StudyGuideDetailResponseUserVote = "up"
)

func (StudyGuideDetailResponseUserVote) Valid

func (e StudyGuideDetailResponseUserVote) Valid() bool

Valid indicates whether the value is a known member of the StudyGuideDetailResponseUserVote enum.

type StudyGuideFileSummary

StudyGuideFileSummary Compact file payload embedded in StudyGuideDetailResponse. Privacy floor: id + name + mime_type + size only. Owner, s3_key, and checksum are intentionally absent.

type StudyGuideFileSummary struct {
Id openapi_types.UUID `json:"id"`
MimeType string `json:"mime_type"`
Name string `json:"name"`
Size int64 `json:"size"`
}

type StudyGuideListItemResponse

StudyGuideListItemResponse A study guide as it appears in the list response. Excludes `content` (only returned by the get-by-id endpoint) to keep the list payload small. Per-row aggregates (`vote_score`, `is_recommended`, `quiz_count`) are computed inline.

type StudyGuideListItemResponse struct {
CourseId openapi_types.UUID `json:"course_id"`
CreatedAt time.Time `json:"created_at"`

// Creator Compact user payload used as the `creator` of a study guide. Same
// privacy floor as SectionMemberResponse -- no email, no clerk_id.
Creator CreatorSummary `json:"creator"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
IsRecommended bool `json:"is_recommended"`
QuizCount int64 `json:"quiz_count"`
Tags []string `json:"tags"`
Title string `json:"title"`
UpdatedAt time.Time `json:"updated_at"`
ViewCount int64 `json:"view_count"`
VoteScore int64 `json:"vote_score"`
}

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
ParamName string
Count int
}

func (*TooManyValuesForParamError) Error

func (e *TooManyValuesForParamError) Error() string

type Unauthorized

Unauthorized Standardized error response structure matching application error domains

type Unauthorized = AppError

type UnauthorizedJSONResponse

type UnauthorizedJSONResponse AppError

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
ParamName string
Err error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) AttachFile

func (_ Unimplemented) AttachFile(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID, fileId openapi_types.UUID)

Attach a file to a study guide (POST /study-guides/{study_guide_id}/files/{file_id})

func (Unimplemented) AttachResource

func (_ Unimplemented) AttachResource(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Attach an external resource to a study guide (POST /study-guides/{study_guide_id}/resources)

func (Unimplemented) CastStudyGuideVote

func (_ Unimplemented) CastStudyGuideVote(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Cast or change a vote on a study guide (POST /study-guides/{study_guide_id}/votes)

func (Unimplemented) CheckMembership

func (_ Unimplemented) CheckMembership(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID)

Check the authenticated user's membership in a section (GET /courses/{course_id}/sections/{section_id}/members/me)

func (Unimplemented) CreateFile

func (_ Unimplemented) CreateFile(w http.ResponseWriter, r *http.Request)

Create a file reference and get a presigned upload URL (POST /files)

func (Unimplemented) CreateGrant

func (_ Unimplemented) CreateGrant(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)

Grant a permission on a file (POST /files/{file_id}/grants)

func (Unimplemented) CreateQuiz

func (_ Unimplemented) CreateQuiz(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Create a quiz attached to a study guide (POST /study-guides/{study_guide_id}/quizzes)

func (Unimplemented) CreateStudyGuide

func (_ Unimplemented) CreateStudyGuide(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID)

Create a study guide for a course (POST /courses/{course_id}/study-guides)

func (Unimplemented) DeleteFile

func (_ Unimplemented) DeleteFile(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)

Delete a file by ID (DELETE /files/{file_id})

func (Unimplemented) DeleteQuiz

func (_ Unimplemented) DeleteQuiz(w http.ResponseWriter, r *http.Request, quizId openapi_types.UUID)

Soft-delete a quiz (DELETE /quizzes/{quiz_id})

func (Unimplemented) DeleteStudyGuide

func (_ Unimplemented) DeleteStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Soft-delete a study guide (DELETE /study-guides/{study_guide_id})

func (Unimplemented) DetachFile

func (_ Unimplemented) DetachFile(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID, fileId openapi_types.UUID)

Detach a file from a study guide (DELETE /study-guides/{study_guide_id}/files/{file_id})

func (Unimplemented) DetachResource

func (_ Unimplemented) DetachResource(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID, resourceId openapi_types.UUID)

Detach a resource from a study guide (DELETE /study-guides/{study_guide_id}/resources/{resource_id})

func (Unimplemented) GetCourse

func (_ Unimplemented) GetCourse(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID)

Get a course detail with embedded sections (GET /courses/{course_id})

func (Unimplemented) GetFile

func (_ Unimplemented) GetFile(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)

Get a file by ID (GET /files/{file_id})

func (Unimplemented) GetSchool

func (_ Unimplemented) GetSchool(w http.ResponseWriter, r *http.Request, schoolId openapi_types.UUID)

Get a single school by ID (GET /schools/{school_id})

func (Unimplemented) GetStudyGuide

func (_ Unimplemented) GetStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Get a study guide detail (GET /study-guides/{study_guide_id})

func (Unimplemented) JoinSection

func (_ Unimplemented) JoinSection(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID)

Join a section as the authenticated user (POST /courses/{course_id}/sections/{section_id}/members)

func (Unimplemented) LeaveSection

func (_ Unimplemented) LeaveSection(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID)

Leave a section as the authenticated user (DELETE /courses/{course_id}/sections/{section_id}/members/me)

func (Unimplemented) ListCourses

func (_ Unimplemented) ListCourses(w http.ResponseWriter, r *http.Request, params ListCoursesParams)

List and search courses (GET /courses)

func (Unimplemented) ListFiles

func (_ Unimplemented) ListFiles(w http.ResponseWriter, r *http.Request, params ListFilesParams)

List files for the current user (GET /me/files)

func (Unimplemented) ListMyEnrollments

func (_ Unimplemented) ListMyEnrollments(w http.ResponseWriter, r *http.Request, params ListMyEnrollmentsParams)

List the authenticated user's section enrollments (GET /me/courses)

func (Unimplemented) ListQuizzes

func (_ Unimplemented) ListQuizzes(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

List quizzes attached to a study guide (GET /study-guides/{study_guide_id}/quizzes)

func (Unimplemented) ListSchools

func (_ Unimplemented) ListSchools(w http.ResponseWriter, r *http.Request, params ListSchoolsParams)

List and search schools (GET /schools)

func (Unimplemented) ListSectionMembers

func (_ Unimplemented) ListSectionMembers(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, sectionId openapi_types.UUID, params ListSectionMembersParams)

List the members of a course section (GET /courses/{course_id}/sections/{section_id}/members)

func (Unimplemented) ListStudyGuides

func (_ Unimplemented) ListStudyGuides(w http.ResponseWriter, r *http.Request, courseId openapi_types.UUID, params ListStudyGuidesParams)

List study guides for a course (GET /courses/{course_id}/study-guides)

func (Unimplemented) RecommendStudyGuide

func (_ Unimplemented) RecommendStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Recommend a study guide (POST /study-guides/{study_guide_id}/recommendations)

func (Unimplemented) RemoveStudyGuideRecommendation

func (_ Unimplemented) RemoveStudyGuideRecommendation(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Remove the authenticated user's recommendation on a study guide (DELETE /study-guides/{study_guide_id}/recommendations)

func (Unimplemented) RemoveStudyGuideVote

func (_ Unimplemented) RemoveStudyGuideVote(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Remove the authenticated user's vote on a study guide (DELETE /study-guides/{study_guide_id}/votes)

func (Unimplemented) RevokeGrant

func (_ Unimplemented) RevokeGrant(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)

Revoke a permission on a file (DELETE /files/{file_id}/grants)

func (Unimplemented) UpdateFile

func (_ Unimplemented) UpdateFile(w http.ResponseWriter, r *http.Request, fileId openapi_types.UUID)

Rename a file (PATCH /files/{file_id})

func (Unimplemented) UpdateQuiz

func (_ Unimplemented) UpdateQuiz(w http.ResponseWriter, r *http.Request, quizId openapi_types.UUID)

Update a quiz's metadata (title and/or description) (PATCH /quizzes/{quiz_id})

func (Unimplemented) UpdateStudyGuide

func (_ Unimplemented) UpdateStudyGuide(w http.ResponseWriter, r *http.Request, studyGuideId openapi_types.UUID)

Update a study guide (PATCH /study-guides/{study_guide_id})

type UnmarshalingParamError

type UnmarshalingParamError struct {
ParamName string
Err error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateFile200JSONResponse

type UpdateFile200JSONResponse FileResponse

func (UpdateFile200JSONResponse) VisitUpdateFileResponse

func (response UpdateFile200JSONResponse) VisitUpdateFileResponse(w http.ResponseWriter) error

type UpdateFile400JSONResponse

type UpdateFile400JSONResponse struct{ BadRequestJSONResponse }

func (UpdateFile400JSONResponse) VisitUpdateFileResponse

func (response UpdateFile400JSONResponse) VisitUpdateFileResponse(w http.ResponseWriter) error

type UpdateFile401JSONResponse

type UpdateFile401JSONResponse struct{ UnauthorizedJSONResponse }

func (UpdateFile401JSONResponse) VisitUpdateFileResponse

func (response UpdateFile401JSONResponse) VisitUpdateFileResponse(w http.ResponseWriter) error

type UpdateFile404JSONResponse

type UpdateFile404JSONResponse struct{ NotFoundJSONResponse }

func (UpdateFile404JSONResponse) VisitUpdateFileResponse

func (response UpdateFile404JSONResponse) VisitUpdateFileResponse(w http.ResponseWriter) error

type UpdateFile500JSONResponse

type UpdateFile500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (UpdateFile500JSONResponse) VisitUpdateFileResponse

func (response UpdateFile500JSONResponse) VisitUpdateFileResponse(w http.ResponseWriter) error

type UpdateFileJSONRequestBody

UpdateFileJSONRequestBody defines body for UpdateFile for application/json ContentType.

type UpdateFileJSONRequestBody = UpdateFileRequest

type UpdateFileRequest

UpdateFileRequest Request body for updating file metadata

type UpdateFileRequest struct {
Name string `json:"name"`
}

type UpdateFileRequestObject

type UpdateFileRequestObject struct {
FileId openapi_types.UUID `json:"file_id"`
Body *UpdateFileJSONRequestBody
}

type UpdateFileResponseObject

type UpdateFileResponseObject interface {
VisitUpdateFileResponse(w http.ResponseWriter) error
}

type UpdateQuiz200JSONResponse

type UpdateQuiz200JSONResponse QuizDetailResponse

func (UpdateQuiz200JSONResponse) VisitUpdateQuizResponse

func (response UpdateQuiz200JSONResponse) VisitUpdateQuizResponse(w http.ResponseWriter) error

type UpdateQuiz400JSONResponse

type UpdateQuiz400JSONResponse struct{ BadRequestJSONResponse }

func (UpdateQuiz400JSONResponse) VisitUpdateQuizResponse

func (response UpdateQuiz400JSONResponse) VisitUpdateQuizResponse(w http.ResponseWriter) error

type UpdateQuiz401JSONResponse

type UpdateQuiz401JSONResponse struct{ UnauthorizedJSONResponse }

func (UpdateQuiz401JSONResponse) VisitUpdateQuizResponse

func (response UpdateQuiz401JSONResponse) VisitUpdateQuizResponse(w http.ResponseWriter) error

type UpdateQuiz403JSONResponse

type UpdateQuiz403JSONResponse struct{ ForbiddenJSONResponse }

func (UpdateQuiz403JSONResponse) VisitUpdateQuizResponse

func (response UpdateQuiz403JSONResponse) VisitUpdateQuizResponse(w http.ResponseWriter) error

type UpdateQuiz404JSONResponse

type UpdateQuiz404JSONResponse struct{ NotFoundJSONResponse }

func (UpdateQuiz404JSONResponse) VisitUpdateQuizResponse

func (response UpdateQuiz404JSONResponse) VisitUpdateQuizResponse(w http.ResponseWriter) error

type UpdateQuiz500JSONResponse

type UpdateQuiz500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (UpdateQuiz500JSONResponse) VisitUpdateQuizResponse

func (response UpdateQuiz500JSONResponse) VisitUpdateQuizResponse(w http.ResponseWriter) error

type UpdateQuizJSONRequestBody

UpdateQuizJSONRequestBody defines body for UpdateQuiz for application/json ContentType.

type UpdateQuizJSONRequestBody = UpdateQuizRequest

type UpdateQuizRequest

UpdateQuizRequest Request body for PATCH /api/quizzes/{quiz_id}. Both fields are optional; absent fields preserve their current value. At least one field must be provided -- an empty body `{}` is rejected with 400.

`description` supports an explicit JSON `null` to clear the existing value (the only field on this endpoint with that semantic; `title` cannot be cleared because the column is NOT NULL on the underlying schema).

type UpdateQuizRequest struct {
Description *string `json:"description,omitempty"`
Title *string `json:"title,omitempty"`
}

type UpdateQuizRequestObject

type UpdateQuizRequestObject struct {
QuizId openapi_types.UUID `json:"quiz_id"`
Body *UpdateQuizJSONRequestBody
}

type UpdateQuizResponseObject

type UpdateQuizResponseObject interface {
VisitUpdateQuizResponse(w http.ResponseWriter) error
}

type UpdateStudyGuide200JSONResponse

type UpdateStudyGuide200JSONResponse StudyGuideDetailResponse

func (UpdateStudyGuide200JSONResponse) VisitUpdateStudyGuideResponse

func (response UpdateStudyGuide200JSONResponse) VisitUpdateStudyGuideResponse(w http.ResponseWriter) error

type UpdateStudyGuide400JSONResponse

type UpdateStudyGuide400JSONResponse struct{ BadRequestJSONResponse }

func (UpdateStudyGuide400JSONResponse) VisitUpdateStudyGuideResponse

func (response UpdateStudyGuide400JSONResponse) VisitUpdateStudyGuideResponse(w http.ResponseWriter) error

type UpdateStudyGuide401JSONResponse

type UpdateStudyGuide401JSONResponse struct{ UnauthorizedJSONResponse }

func (UpdateStudyGuide401JSONResponse) VisitUpdateStudyGuideResponse

func (response UpdateStudyGuide401JSONResponse) VisitUpdateStudyGuideResponse(w http.ResponseWriter) error

type UpdateStudyGuide403JSONResponse

type UpdateStudyGuide403JSONResponse struct{ ForbiddenJSONResponse }

func (UpdateStudyGuide403JSONResponse) VisitUpdateStudyGuideResponse

func (response UpdateStudyGuide403JSONResponse) VisitUpdateStudyGuideResponse(w http.ResponseWriter) error

type UpdateStudyGuide404JSONResponse

type UpdateStudyGuide404JSONResponse struct{ NotFoundJSONResponse }

func (UpdateStudyGuide404JSONResponse) VisitUpdateStudyGuideResponse

func (response UpdateStudyGuide404JSONResponse) VisitUpdateStudyGuideResponse(w http.ResponseWriter) error

type UpdateStudyGuide500JSONResponse

type UpdateStudyGuide500JSONResponse struct {
InternalServerErrorJSONResponse
}

func (UpdateStudyGuide500JSONResponse) VisitUpdateStudyGuideResponse

func (response UpdateStudyGuide500JSONResponse) VisitUpdateStudyGuideResponse(w http.ResponseWriter) error

type UpdateStudyGuideJSONRequestBody

UpdateStudyGuideJSONRequestBody defines body for UpdateStudyGuide for application/json ContentType.

type UpdateStudyGuideJSONRequestBody = UpdateStudyGuideRequest

type UpdateStudyGuideRequest

UpdateStudyGuideRequest Request body for PATCH /api/study-guides/{study_guide_id}. All fields are optional; absent fields preserve their current value. Tags, when provided, REPLACE all existing tags (no merge) and are normalized server-side (trim + lowercase + dedupe). At least one field must be provided -- an empty body `{}` is rejected with 400.

type UpdateStudyGuideRequest struct {
Content *string `json:"content,omitempty"`
Description *string `json:"description,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
}

type UpdateStudyGuideRequestObject

type UpdateStudyGuideRequestObject struct {
StudyGuideId openapi_types.UUID `json:"study_guide_id"`
Body *UpdateStudyGuideJSONRequestBody
}

type UpdateStudyGuideResponseObject

type UpdateStudyGuideResponseObject interface {
VisitUpdateStudyGuideResponse(w http.ResponseWriter) error
}

Generated by gomarkdoc