jdoodle

package
v0.2.0 Latest Latest
Warning

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

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

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