v1

package
v0.0.0-...-4b23463 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.8.2 DO NOT EDIT.

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

Code generated by github.com/deepmap/oapi-codegen version v1.8.2 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

This section is empty.

Functions

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 NewHandler

func NewHandler(app app.Application, r chi.Router) http.Handler

Types

type AddAutoCodeCheckingTaskRequest

type AddAutoCodeCheckingTaskRequest struct {
	// Embedded struct due to allOf(#/components/schemas/AddTaskRequest)
	AddTaskRequest `yaml:",inline"`
	// Embedded struct due to allOf(#/components/schemas/AutoCodeCheckingTaskPart)
	AutoCodeCheckingTaskPart `yaml:",inline"`
}

AddAutoCodeCheckingTaskRequest defines model for AddAutoCodeCheckingTaskRequest.

type AddAuxiliaryMaterialRequest

type AddAuxiliaryMaterialRequest AuxiliaryMaterial

AddAuxiliaryMaterialRequest defines model for AddAuxiliaryMaterialRequest.

type AddCollaboratorToCourseJSONBody

type AddCollaboratorToCourseJSONBody AddCollaboratorToCourseRequest

AddCollaboratorToCourseJSONBody defines parameters for AddCollaboratorToCourse.

type AddCollaboratorToCourseJSONRequestBody

type AddCollaboratorToCourseJSONRequestBody AddCollaboratorToCourseJSONBody

AddCollaboratorToCourseJSONRequestBody defines body for AddCollaboratorToCourse for application/json ContentType.

type AddCollaboratorToCourseRequest

type AddCollaboratorToCourseRequest struct {
	Id string `json:"id"`
}

AddCollaboratorToCourseRequest defines model for AddCollaboratorToCourseRequest.

type AddGroupToCourseJSONBody

type AddGroupToCourseJSONBody AddGroupToCourseRequest

AddGroupToCourseJSONBody defines parameters for AddGroupToCourse.

type AddGroupToCourseJSONRequestBody

type AddGroupToCourseJSONRequestBody AddGroupToCourseJSONBody

AddGroupToCourseJSONRequestBody defines body for AddGroupToCourse for application/json ContentType.

type AddGroupToCourseRequest

type AddGroupToCourseRequest struct {
	Id string `json:"id"`
}

AddGroupToCourseRequest defines model for AddGroupToCourseRequest.

type AddManualCheckingTaskRequest

type AddManualCheckingTaskRequest struct {
	// Embedded struct due to allOf(#/components/schemas/AddTaskRequest)
	AddTaskRequest `yaml:",inline"`
	// Embedded struct due to allOf(#/components/schemas/ManualCheckingTaskPart)
	ManualCheckingTaskPart `yaml:",inline"`
}

AddManualCheckingTaskRequest defines model for AddManualCheckingTaskRequest.

type AddStudentToCourseJSONBody

type AddStudentToCourseJSONBody AddStudentToCourseRequest

AddStudentToCourseJSONBody defines parameters for AddStudentToCourse.

type AddStudentToCourseJSONRequestBody

type AddStudentToCourseJSONRequestBody AddStudentToCourseJSONBody

AddStudentToCourseJSONRequestBody defines body for AddStudentToCourse for application/json ContentType.

type AddStudentToCourseRequest

type AddStudentToCourseRequest struct {
	Id string `json:"id"`
}

AddStudentToCourseRequest defines model for AddStudentToCourseRequest.

type AddTaskRequest

type AddTaskRequest Task

AddTaskRequest defines model for AddTaskRequest.

type AddTaskToCourseJSONBody

type AddTaskToCourseJSONBody interface{}

AddTaskToCourseJSONBody defines parameters for AddTaskToCourse.

type AddTaskToCourseJSONRequestBody

type AddTaskToCourseJSONRequestBody AddTaskToCourseJSONBody

AddTaskToCourseJSONRequestBody defines body for AddTaskToCourse for application/json ContentType.

type AddTestingTaskRequest

type AddTestingTaskRequest struct {
	// Embedded struct due to allOf(#/components/schemas/AddTaskRequest)
	AddTaskRequest `yaml:",inline"`
	// Embedded struct due to allOf(#/components/schemas/TestingTaskPart)
	TestingTaskPart `yaml:",inline"`
}

AddTestingTaskRequest defines model for AddTestingTaskRequest.

type AttachAuxiliaryMaterialToCourseJSONBody

type AttachAuxiliaryMaterialToCourseJSONBody AddAuxiliaryMaterialRequest

AttachAuxiliaryMaterialToCourseJSONBody defines parameters for AttachAuxiliaryMaterialToCourse.

type AttachAuxiliaryMaterialToCourseJSONRequestBody

type AttachAuxiliaryMaterialToCourseJSONRequestBody AttachAuxiliaryMaterialToCourseJSONBody

AttachAuxiliaryMaterialToCourseJSONRequestBody defines body for AttachAuxiliaryMaterialToCourse for application/json ContentType.

type AutoCodeCheckingTaskPart

type AutoCodeCheckingTaskPart struct {
	Deadline *Deadline   `json:"deadline,omitempty"`
	TestData *[]TestData `json:"testData,omitempty"`
}

AutoCodeCheckingTaskPart defines model for AutoCodeCheckingTaskPart.

type AutoCodeCheckingTaskResponse

type AutoCodeCheckingTaskResponse struct {
	// Embedded struct due to allOf(#/components/schemas/TaskResponse)
	TaskResponse `yaml:",inline"`
	// Embedded struct due to allOf(#/components/schemas/AutoCodeCheckingTaskPart)
	AutoCodeCheckingTaskPart `yaml:",inline"`
}

AutoCodeCheckingTaskResponse defines model for AutoCodeCheckingTaskResponse.

type AuxiliaryMaterial

type AuxiliaryMaterial struct {
	Resource     string       `json:"resource"`
	ResourceType ResourceType `json:"resourceType"`
}

AuxiliaryMaterial defines model for AuxiliaryMaterial.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL     string
	BaseRouter  chi.Router
	Middlewares []MiddlewareFunc
}

type Course

type Course struct {
	CreatorId   string       `json:"creatorId"`
	Id          string       `json:"id"`
	Period      CoursePeriod `json:"period"`
	Started     bool         `json:"started"`
	TasksNumber int          `json:"tasksNumber"`
	Title       string       `json:"title"`
}

Course defines model for Course.

type CoursePeriod

type CoursePeriod struct {
	AcademicEndYear   int      `json:"academicEndYear"`
	AcademicStartYear int      `json:"academicStartYear"`
	Semester          Semester `json:"semester"`
}

CoursePeriod defines model for CoursePeriod.

type CreateCourseJSONBody

type CreateCourseJSONBody CreateCourseRequest

CreateCourseJSONBody defines parameters for CreateCourse.

type CreateCourseJSONRequestBody

type CreateCourseJSONRequestBody CreateCourseJSONBody

CreateCourseJSONRequestBody defines body for CreateCourse for application/json ContentType.

type CreateCourseRequest

type CreateCourseRequest struct {
	Period  CoursePeriod `json:"period"`
	Started bool         `json:"started"`
	Title   string       `json:"title"`
}

CreateCourseRequest defines model for CreateCourseRequest.

type Deadline

type Deadline struct {
	ExcellentGradeTime openapi_types.Date `json:"excellentGradeTime"`
	GoodGradeTime      openapi_types.Date `json:"goodGradeTime"`
}

Deadline defines model for Deadline.

type EditCourseJSONBody

type EditCourseJSONBody EditCourseRequest

EditCourseJSONBody defines parameters for EditCourse.

type EditCourseJSONRequestBody

type EditCourseJSONRequestBody EditCourseJSONBody

EditCourseJSONRequestBody defines body for EditCourse for application/json ContentType.

type EditCourseRequest

type EditCourseRequest struct {
	Period  *CoursePeriod `json:"period,omitempty"`
	Started *bool         `json:"started,omitempty"`
	Title   *string       `json:"title,omitempty"`
}

EditCourseRequest defines model for EditCourseRequest.

type Error

type Error struct {
	Details string `json:"details"`
	Slug    string `json:"slug"`
}

Error defines model for Error.

type ExtendCourseJSONBody

type ExtendCourseJSONBody ExtendCourseRequest

ExtendCourseJSONBody defines parameters for ExtendCourse.

type ExtendCourseJSONRequestBody

type ExtendCourseJSONRequestBody ExtendCourseJSONBody

ExtendCourseJSONRequestBody defines body for ExtendCourse for application/json ContentType.

type ExtendCourseRequest

type ExtendCourseRequest struct {
	Period  *CoursePeriod `json:"period,omitempty"`
	Started bool          `json:"started"`
	Title   string        `json:"title"`
}

ExtendCourseRequest defines model for ExtendCourseRequest.

type GetAllAuxiliaryMaterialsResponse

type GetAllAuxiliaryMaterialsResponse []AuxiliaryMaterial

GetAllAuxiliaryMaterialsResponse defines model for GetAllAuxiliaryMaterialsResponse.

type GetAllCourseAuxiliaryMaterialsParams

type GetAllCourseAuxiliaryMaterialsParams struct {
	// resource type for filtering
	ResourceType *ResourceType `json:"resourceType,omitempty"`
}

GetAllCourseAuxiliaryMaterialsParams defines parameters for GetAllCourseAuxiliaryMaterials.

type GetAllCourseCollaboratorsResponse

type GetAllCourseCollaboratorsResponse []Teacher

GetAllCourseCollaboratorsResponse defines model for GetAllCourseCollaboratorsResponse.

type GetAllCourseStudentsParams

type GetAllCourseStudentsParams struct {
	// student full name substring for filtering
	FullName *string `json:"fullName,omitempty"`
}

GetAllCourseStudentsParams defines parameters for GetAllCourseStudents.

type GetAllCourseStudentsResponse

type GetAllCourseStudentsResponse []Student

GetAllCourseStudentsResponse defines model for GetAllCourseStudentsResponse.

type GetAllCoursesParams

type GetAllCoursesParams struct {
	// course title substring for filtering
	Title *string `json:"title,omitempty"`
}

GetAllCoursesParams defines parameters for GetAllCourses.

type GetAllCoursesResponse

type GetAllCoursesResponse []Course

GetAllCoursesResponse defines model for GetAllCoursesResponse.

type GetCourseResponse

type GetCourseResponse Course

GetCourseResponse defines model for GetCourseResponse.

type GetCourseTasksParams

type GetCourseTasksParams struct {
	// type of task for filtering
	Type *TaskType `json:"type,omitempty"`

	// text for search in tasks title and description
	Text *string `json:"text,omitempty"`
}

GetCourseTasksParams defines parameters for GetCourseTasks.

type ManualCheckingTaskPart

type ManualCheckingTaskPart struct {
	Deadline *Deadline `json:"deadline,omitempty"`
}

ManualCheckingTaskPart defines model for ManualCheckingTaskPart.

type ManualCheckingTaskResponse

type ManualCheckingTaskResponse struct {
	// Embedded struct due to allOf(#/components/schemas/TaskResponse)
	TaskResponse `yaml:",inline"`
	// Embedded struct due to allOf(#/components/schemas/ManualCheckingTaskPart)
	ManualCheckingTaskPart `yaml:",inline"`
}

ManualCheckingTaskResponse defines model for ManualCheckingTaskResponse.

type MiddlewareFunc

type MiddlewareFunc func(http.HandlerFunc) http.HandlerFunc

type ResourceType

type ResourceType string

ResourceType defines model for ResourceType.

const (
	ResourceTypeOTHER ResourceType = "OTHER"

	ResourceTypePRESENTATION ResourceType = "PRESENTATION"

	ResourceTypeTRAININGMANUAL ResourceType = "TRAINING_MANUAL"

	ResourceTypeVIDEO ResourceType = "VIDEO"
)

Defines values for ResourceType.

type Semester

type Semester string

Semester defines model for Semester.

const (
	SemesterFIRST Semester = "FIRST"

	SemesterSECOND Semester = "SECOND"
)

Defines values for Semester.

type ServerInterface

type ServerInterface interface {

	// (GET /courses)
	GetAllCourses(w http.ResponseWriter, r *http.Request, params GetAllCoursesParams)

	// (POST /courses)
	CreateCourse(w http.ResponseWriter, r *http.Request)

	// (GET /courses/{courseId})
	GetCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (PATCH /courses/{courseId})
	EditCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (GET /courses/{courseId}/auxiliary-materials)
	GetAllCourseAuxiliaryMaterials(w http.ResponseWriter, r *http.Request, courseId string, params GetAllCourseAuxiliaryMaterialsParams)

	// (POST /courses/{courseId}/auxiliary-materials)
	AttachAuxiliaryMaterialToCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (GET /courses/{courseId}/collaborators)
	GetAllCourseCollaborators(w http.ResponseWriter, r *http.Request, courseId string)

	// (PUT /courses/{courseId}/collaborators)
	AddCollaboratorToCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (DELETE /courses/{courseId}/collaborators/{teacherId})
	RemoveCollaboratorFromCourse(w http.ResponseWriter, r *http.Request, courseId string, teacherId string)

	// (POST /courses/{courseId}/extended)
	ExtendCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (PUT /courses/{courseId}/groups)
	AddGroupToCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (GET /courses/{courseId}/students)
	GetAllCourseStudents(w http.ResponseWriter, r *http.Request, courseId string, params GetAllCourseStudentsParams)

	// (PUT /courses/{courseId}/students)
	AddStudentToCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (DELETE /courses/{courseId}/students/{studentId})
	RemoveStudentFromCourse(w http.ResponseWriter, r *http.Request, courseId string, studentId string)

	// (GET /courses/{courseId}/tasks)
	GetCourseTasks(w http.ResponseWriter, r *http.Request, courseId string, params GetCourseTasksParams)

	// (POST /courses/{courseId}/tasks)
	AddTaskToCourse(w http.ResponseWriter, r *http.Request, courseId string)

	// (GET /courses/{courseId}/tasks/{taskNumber})
	GetCourseTask(w http.ResponseWriter, r *http.Request, courseId string, taskNumber int)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) AddCollaboratorToCourse

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

AddCollaboratorToCourse operation middleware

func (*ServerInterfaceWrapper) AddGroupToCourse

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

AddGroupToCourse operation middleware

func (*ServerInterfaceWrapper) AddStudentToCourse

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

AddStudentToCourse operation middleware

func (*ServerInterfaceWrapper) AddTaskToCourse

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

AddTaskToCourse operation middleware

func (*ServerInterfaceWrapper) AttachAuxiliaryMaterialToCourse

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

AttachAuxiliaryMaterialToCourse operation middleware

func (*ServerInterfaceWrapper) CreateCourse

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

CreateCourse operation middleware

func (*ServerInterfaceWrapper) EditCourse

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

EditCourse operation middleware

func (*ServerInterfaceWrapper) ExtendCourse

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

ExtendCourse operation middleware

func (*ServerInterfaceWrapper) GetAllCourseAuxiliaryMaterials

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

GetAllCourseAuxiliaryMaterials operation middleware

func (*ServerInterfaceWrapper) GetAllCourseCollaborators

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

GetAllCourseCollaborators operation middleware

func (*ServerInterfaceWrapper) GetAllCourseStudents

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

GetAllCourseStudents operation middleware

func (*ServerInterfaceWrapper) GetAllCourses

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

GetAllCourses operation middleware

func (*ServerInterfaceWrapper) GetCourse

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

GetCourse operation middleware

func (*ServerInterfaceWrapper) GetCourseTask

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

GetCourseTask operation middleware

func (*ServerInterfaceWrapper) GetCourseTasks

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

GetCourseTasks operation middleware

func (*ServerInterfaceWrapper) RemoveCollaboratorFromCourse

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

RemoveCollaboratorFromCourse operation middleware

func (*ServerInterfaceWrapper) RemoveStudentFromCourse

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

RemoveStudentFromCourse operation middleware

type Student

type Student struct {
	FullName string `json:"fullName"`
	Id       string `json:"id"`
}

Student defines model for Student.

type Task

type Task struct {
	Description string   `json:"description"`
	Title       string   `json:"title"`
	Type        TaskType `json:"type"`
}

Task defines model for Task.

type TaskResponse

type TaskResponse struct {
	// Embedded struct due to allOf(#/components/schemas/Task)
	Task `yaml:",inline"`
	// Embedded fields due to inline allOf schema
	Number int `json:"number"`
}

TaskResponse defines model for TaskResponse.

type TaskType

type TaskType string

TaskType defines model for TaskType.

const (
	TaskTypeAUTOCODECHECKING TaskType = "AUTO_CODE_CHECKING"

	TaskTypeMANUALCHECKING TaskType = "MANUAL_CHECKING"

	TaskTypeTESTING TaskType = "TESTING"
)

Defines values for TaskType.

type Teacher

type Teacher struct {
	FullName string `json:"fullName"`
	Id       string `json:"id"`
}

Teacher defines model for Teacher.

type TestData

type TestData struct {
	// property not required in response for student, but required for creation
	InputData *string `json:"inputData,omitempty"`

	// property not required in response for student, but required for creation
	OutputData *string `json:"outputData,omitempty"`
}

TestData defines model for TestData.

type TestPoint

type TestPoint struct {
	// property not required in response for student, but required for creation
	CorrectVariantNumbers *[]int `json:"correctVariantNumbers,omitempty"`
	Description           string `json:"description"`

	// property indicates that point has single correct variant in response for student
	SingleCorrectVariant *bool    `json:"singleCorrectVariant,omitempty"`
	Variants             []string `json:"variants"`
}

TestPoint defines model for TestPoint.

type TestingTaskPart

type TestingTaskPart struct {
	Points *[]TestPoint `json:"points,omitempty"`
}

TestingTaskPart defines model for TestingTaskPart.

type TestingTaskResponse

type TestingTaskResponse struct {
	// Embedded struct due to allOf(#/components/schemas/TaskResponse)
	TaskResponse `yaml:",inline"`
	// Embedded struct due to allOf(#/components/schemas/TestingTaskPart)
	TestingTaskPart `yaml:",inline"`
}

TestingTaskResponse defines model for TestingTaskResponse.

Jump to

Keyboard shortcuts

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