jdoodle

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubmissionHandler

func SubmissionHandler(w http.ResponseWriter, r *http.Request)

Types

type Input

type Input struct {
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
	Script       string `json:"script"`
	StdIn        string `json:"stdin,omitempty"`
	Language     string `json:"language"`
	VersionIndex string `json:"versionIndex"`
	// contains filtered or unexported fields
}

Input gets sent to Jdoodle compiler for code submission

func (Input) Client

func (in Input) Client() *http.Client

func (Input) Request

func (in Input) Request() (*http.Request, error)

func (Input) ResponseChan

func (in Input) ResponseChan() chan models.RemoteCompilerOutput

type Output

type Output struct {
	Output     string `json:"output"`
	StatusCode int    `json:"statusCode"`
	Memory     string `json:"memory"`
	CPUTime    string `json:"cpuTime"`
}

Output is what comes back from the Jdoodle compiler

type UserInput

type UserInput struct {
	Script   string `json:"script"`
	Language string `json:"language"`
	Version  string `json:"version"`
}

UserInput is structure of the object that the user sends the backend which is parsed and transformed into an Input object and sent to Jdoodle

func (UserInput) Input

func (in UserInput) Input(stdIn string) *Input

Jump to

Keyboard shortcuts

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