ugctl

package module
v0.0.0-...-4c02f61 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SignIn(ctx context.Context, request SignInRequest) (*SignInResult, error)
	SignOut(ctx context.Context) error
	ProblemList(ctx context.Context) (*ProblemListResult, error)
	LanguageList(ctx context.Context) (*LanguageListResult, error)
	SubmissionList(ctx context.Context) (*SubmissionListResult, error)
	Submit(ctx context.Context, request SubmitRequest) (*SubmitResult, error)
}

Client contains ugrade functionality

func NewClient

func NewClient(serverURL string) Client

NewClient create new graphql client for ugrade server

type LanguageListItem

type LanguageListItem struct {
	ID         string
	Name       string
	Extensions []string
}

LanguageListItem represent single language when running `lang ls` command.

type LanguageListResult

type LanguageListResult struct {
	Languages []LanguageListItem
}

LanguageListResult represent result of calling `lang ls` command.

type ProblemListItem

type ProblemListItem struct {
	ID       string
	ShortID  string
	Name     string
	Disabled bool
}

ProblemListItem represent single problem when running `problem ls` command.

type ProblemListResult

type ProblemListResult struct {
	Problems []ProblemListItem
}

ProblemListResult represent result of calling `problem ls` command.

type SignInRequest

type SignInRequest struct {
	ContestShortID string
	Email          string
	Password       string
}

SignInRequest represent input for sign in command

type SignInResult

type SignInResult struct {
	UserID      string
	UserName    string
	ContestID   string
	ContestName string
}

SignInResult represent result of sign in command

type SubmissionListItem

type SubmissionListItem struct {
	ID           string
	ProblemName  string
	LanguageName string
	IssuerName   string
	Verdict      string
	IssuedAt     string
}

SubmissionListItem represent single submission when running `submission ls` command.

type SubmissionListResult

type SubmissionListResult struct {
	Submissions []SubmissionListItem
}

SubmissionListResult represent result of calling `submission ls` command.

type SubmitRequest

type SubmitRequest struct {
	LanguageID string
	ProblemID  string
	SourceCode string
}

SubmitRequest represent input for submit command

type SubmitResult

type SubmitResult struct {
	ID string
}

SubmitResult represent result of submit command

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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