api

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package api contains all api handlers for the application.

Package api contains all api handlers for the application.

Package api contains all api handlers for the application.

Package api contains all api handlers for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAdminAPI

func InitAdminAPI()

InitAdminAPI initializes the admin API

func InitUserApi

func InitUserApi()

InitUserApi initializes user api

Types

type HandlerWithError

type HandlerWithError func(w http.ResponseWriter, r *http.Request) error

HandlerWithError is a type for http handlers that can return an error

type RunInfoResponse

type RunInfoResponse struct {
	Username string `json:"username"`
	RunID    int    `json:"run_id"`
	Problem  string `json:"problem"`
	Result   string `json:"result"`
	Time     int64  `json:"time"`
	Language string `json:"language"`
}

RunInfoResponse represents information about the run

type StartTimeResponse

type StartTimeResponse struct {
	StartTime int64 `json:"startTime"`
	Duration  int64 `json:"duration"`
}

StartTimeResponse represents startTime of the contest and duration of the contest

type TestResultResponse

type TestResultResponse struct {
	Message string `json:"message"`
}

TestResultResponse represents the result of the run

type UsernameResponse

type UsernameResponse struct {
	Username string `json:"username"`
}

UsernameResponse represents json response for GET /api/me

Jump to

Keyboard shortcuts

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