Documentation
¶
Index ¶
- Constants
- func AdminAbstractsZip(c echo.Context) error
- func AdminAddAdmin(c echo.Context) error
- func AdminAddMember(c echo.Context) error
- func AdminDeleteUser(c echo.Context) error
- func AdminPage(c echo.Context) error
- func AdminRemoveAdmin(c echo.Context) error
- func AdminRemoveMember(c echo.Context) error
- func AdminRenameTeam(c echo.Context) error
- func AdminRevokeTeam(c echo.Context) error
- func AdminSetProjectLinks(c echo.Context) error
- func AdminUpdateUser(c echo.Context) error
- func AllotTeamsToMentor(c echo.Context) error
- func GetAbstractFile(c echo.Context) error
- func GetAllotmentCSV(c echo.Context) error
- func GetContriHubRankings(c echo.Context) error
- func GetEventRanking(c echo.Context) error
- func GetRegistrationDeadline(c echo.Context) error
- func GetUserInfo(c echo.Context) error
- func GoogleCallback(c echo.Context) error
- func GoogleLogin(c echo.Context) error
- func GoogleLogout(c echo.Context) error
- func HelloGO(c echo.Context) error
- func LoginPage(c echo.Context) error
- func ProjectLinksCSV(c echo.Context) error
- func RegisterTeam(c echo.Context) error
- func SaveUser(c echo.Context) error
- func SubmitProjectLinks(c echo.Context) error
- func UploadAbstractSubmission(c echo.Context) error
- func UploadMidTermEval(c echo.Context) error
- func UserDashboard(c echo.Context) error
Constants ¶
const ( // File size MaxFileSize int64 = 3 << 20 // 3 MB CSVFileSize int64 = 1 << 19 // 512 KB )
Variables ¶
This section is empty.
Functions ¶
func AdminAbstractsZip ¶
AdminAbstractsZip streams every submitted abstract as one zip, grouped into a folder per event, with a README that maps each file back to its team.
@Summary Download all abstracts @Tags Admin @Produce application/zip @Param event query string false "limit to a single event tag" @Success 200 {string} string "application/zip" @Failure 403 {string} Forbidden @Failure 404 {string} NotFound @Router /admin/abstracts.zip [get]
func AdminAddAdmin ¶
func AdminAddMember ¶
func AdminDeleteUser ¶
func AdminPage ¶
AdminPage renders the admin panel with every team, person and admin.
@Summary Admin panel @Tags Admin @Produce html @Router /admin [get]
func AdminRemoveAdmin ¶
func AdminRemoveMember ¶
func AdminRenameTeam ¶
func AdminRevokeTeam ¶
func AdminSetProjectLinks ¶
AdminSetProjectLinks uses the existing admin session, CSRF header and audit trail to record links received outside the team's form.
@Summary Set final links on behalf of a team @Tags Admin @Accept json @Produce json @Param links body adminProjectDto true "Event, team id and both links" @Success 200 {object} models.ProjectLinksResponse @Router /admin/team/project [post]
func AdminUpdateUser ¶
func AllotTeamsToMentor ¶
AllotTeamsToMentor
@Summary Allot teams to mentor @Schemes @Description Allots the teams to the mentor @Tags CodeSangam @Accept json @Produce json @Param event query string true "event" @Success 200 {string} string @Router /v1/cs/allot [post]
func GetAbstractFile ¶
GetAbstractFile
@Summary Fetch abstract file from server @Schemes @Description Returns the abstract file @Tags CodeSangam @Accept json @Produce application/pdf @Param id query string true "id" @Success 200 {string} string "application/pdf" @Router /v1/cs/abstract [get]
func GetAllotmentCSV ¶
GetAllotmentCSV
@Summary Fetch allotment csv from server @Schemes @Description Returns the allotment csv @Tags CodeSangam @Accept json @Produce text/csv @Param event query string true "event" @Success 200 {string} string "text/csv" @Router /v1/cs/allot [get]
func GetContriHubRankings ¶
GetContriHubRankings
@Summary Fetch rankings from ContriHUB @Schemes @Description Returns the list of ranked users @Tags ContriHUB @Accept json @Produce json @Success 200 {object} []models.ContriHUBUser @Router /v1/contrihub/rankings [get]
func GetEventRanking ¶
GetEventRanking
@Summary Fetch event ranking from database @Schemes @Description Returns the event ranking @Tags CodeSangam @Accept json @Produce json @Param event query string true "event" @Success 200 {object} []models.DashboardTeam @Router /v1/cs/ranking [get]
func GetRegistrationDeadline ¶
GetRegistrationDeadline
@Summary Registration deadline and development period @Schemes @Description The unix timestamp after which registration and abstract submission close, whether that moment has passed, and the development period. Public on purpose: these dates are not a secret. @Tags CodeSangam @Accept json @Produce json @Success 200 {object} deadlineDto @Router /v1/cs/deadline [get]
func GetUserInfo ¶
GetUserInfo
@Summary Fetch user info from database @Schemes @Description Returns the user info @Tags CodeSangam @Accept json @Produce json @Success 200 {object} models.DashboardUserDto @Router /v1/cs/user [get]
func GoogleCallback ¶
GoogleCallback
@Summary Callback @Schemes @Description Callback @Tags Auth @Accept json @Produce html @Success 302 {object} map[string]string @Failure 401 {string} Unauthorized @Router /auth/callback [get]
func GoogleLogin ¶
GoogleLogin
@Summary Login @Schemes @Description Login @Tags Auth @Accept json @Produce html @Success 302 {object} map[string]string @Failure 401 {string} Unauthorized @Router /auth/login [get]
func GoogleLogout ¶
GoogleLogout
@Summary Logout @Schemes @Description Logout @Tags Auth @Security OAuth2 @Accept json @Produce html @Success 302 {object} map[string]string @Failure 401 {string} Unauthorized @Router /auth/logout [get]
func HelloGO ¶
HelloGO
@Summary GO ping @Schemes @Description Do ping @Tags _ @Accept json @Produce json @Success 200 {object} map[string]string @Router /go [get]
func LoginPage ¶
LoginPage
@Summary Login page @Schemes @Description Login page @Tags Auth @Accept json @Produce html @Success 200 {object} map[string]string @Router /auth [get]
func ProjectLinksCSV ¶
ProjectLinksCSV includes registered teams without submissions so organizers can see what is missing. Team id, not team name, is the workbook join key.
@Summary Download final submission links @Tags Admin @Produce text/csv @Param event query string false "Optional event tag" @Success 200 {string} string "CSV of teams and final project links" @Failure 403 {string} string "Admins only" @Router /v1/cs/project/links.csv [get]
func RegisterTeam ¶
RegisterTeam
@Summary Register team to database for an event @Schemes @Description Registers the team to the database for an event. Members list should not include the leader. @Tags CodeSangam @Accept json @Produce json @Param team body models.RegisterTeamDto true "Team" @Success 200 {object} models.DashboardTeam @Router /v1/cs/register [post]
func SaveUser ¶
SaveUser
SaveUser ¶
@Summary Current user profile @Schemes @Description Returns the signed-in user's own profile. It no longer accepts a user in the body: identity and registration number are established at sign-in, so POSTing an email and reg no here would let anyone forge an account. @Tags CodeSangam @Accept json @Produce json @Success 200 {object} models.User @Router /v1/cs/user [post]
func SubmitProjectLinks ¶
SubmitProjectLinks stores the signed-in member's own team's final links. Registration and abstract deadlines deliberately do not apply here; the separate PROJECT_SUBMISSION_CLOSED switch is what closes this form.
@Summary Submit or update final project links @Tags CodeSangam @Accept json @Produce json @Param X-CS-Project header string true "1" @Param links body models.ProjectLinksDto true "Both links are required" @Success 200 {object} models.ProjectLinksResponse @Failure 400 {string} string "Check the event and both links" @Failure 401 {string} string "Sign in first" @Failure 403 {string} string "Final submission is closed" @Router /v1/cs/project [post]
func UploadAbstractSubmission ¶
UploadAbstractSubmission
@Summary Upload abstract submission to server @Schemes @Description Uploads the abstract submission to the server @Tags CodeSangam @Accept json @Param event formData string true "event" @Param file formData file true "file" @Success 200 {string} string @Router /v1/cs/abstract [post]
func UploadMidTermEval ¶
UploadMidTermEval
@Summary Upload mid term evaluation to server @Schemes @Description Uploads the mid term evaluation to the server @Tags CodeSangam @Accept json @Param event formData string true "event" @Param file formData file true "file" @Success 200 {string} string @Router /v1/cs/midterm [post]
func UserDashboard ¶
UserDashboard
@Summary Get user profile @Schemes @Description Get user profile @Tags Auth @Security OAuth2 @Accept json @Produce html @Failure 401 {string} Unauthorized @Router /auth/dashboard [get]
Types ¶
This section is empty.