api

package
v0.0.0-...-7c9c7d0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

func (AuthService) IsLoggedIn

func (auth AuthService) IsLoggedIn(ctx context.Context) (bool, error)

func (AuthService) Login

func (auth AuthService) Login(ctx context.Context, id, password string) (*models.User, error)

func (AuthService) Logout

func (auth AuthService) Logout(ctx context.Context) error

type Client

type Client struct {
	Endpoint  *url.URL
	UserAgent string

	Auth   *AuthService
	Submit *SubmitService
	Status *StatusService
	Test   *TestService
	// contains filtered or unexported fields
}

func NewClient

func NewClient() (*Client, error)

func (*Client) Cookies

func (c *Client) Cookies() []*http.Cookie

func (*Client) RemoveCookies

func (c *Client) RemoveCookies() error

func (*Client) SaveCookies

func (c *Client) SaveCookies() error

type StatusService

type StatusService struct {
	// contains filtered or unexported fields
}

func (StatusService) FindSubmissionRecords

func (status StatusService) FindSubmissionRecords(ctx context.Context, user *models.User, size int) ([]models.SubmissionRecord, error)

type SubmitService

type SubmitService struct {
	// contains filtered or unexported fields
}

func (SubmitService) Submit

func (submit SubmitService) Submit(ctx context.Context, problemId, language, sourceCode string) error

type TestService

type TestService struct {
	// contains filtered or unexported fields
}

func (TestService) FindSamples

func (test TestService) FindSamples(ctx context.Context, problemId string) ([]models.TestCase, error)

Jump to

Keyboard shortcuts

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