Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigPath = "~/.95cli/config.json"
View Source
const DefaultAPIURL = "https://api.95ninefive.dev"
DefaultAPIURL is the production API endpoint
View Source
const LocalAPIURL = "http://localhost:8080"
LocalAPIURL is the development API endpoint
Variables ¶
This section is empty.
Functions ¶
func SaveProjectConfig ¶
SaveProjectConfig writes buildCommand, runCommand and language to config.json in the current directory. buildCommand may be empty for interpreted languages.
Types ¶
type Config ¶
type Config struct {
APIUrl string `json:"api_url" mapstructure:"api_url"`
AccessToken string `json:"access_token" mapstructure:"access_token"`
RefreshToken string `json:"refresh_token" mapstructure:"refresh_token"`
UserId string `json:"user_id" mapstructure:"user_id"`
Username string `json:"username" mapstructure:"username"`
}
type ProjectConfig ¶
type ProjectConfig struct {
// BuildCommand is empty for interpreted languages (Python, JS, Ruby, ...).
// When non-empty, the server runs it inside the submission dir before exec'ing
// RunCommand, so compiled languages (Go, C, C++, Rust) produce a binary the
// run step can invoke regardless of the tester's current working directory.
BuildCommand string `json:"buildCommand,omitempty"`
RunCommand string `json:"runCommand"`
Language string `json:"language"`
}
func LoadProjectConfig ¶
func LoadProjectConfig() (*ProjectConfig, error)
LoadProjectConfig reads .95cli-project.json from current directory
Click to show internal directories.
Click to hide internal directories.