Documentation ¶
Index ¶
- type Client
- func (c *Client) Request(method string, path string, body io.Reader, authenticated bool) (*http.Response, error)
- func (c *Client) Submission(id int) (*Submission, error)
- func (c *Client) Submit(submission *Submission) (int, error)
- func (c *Client) Token(username, password string) (string, error)
- func (c *Client) User() (*UserResponse, error)
- type ErrForbidden
- type Error
- type Manifest
- type Mode
- type Submission
- type TokenRequest
- type TokenResponse
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Submission ¶
func (c *Client) Submission(id int) (*Submission, error)
func (*Client) User ¶
func (c *Client) User() (*UserResponse, error)
type ErrForbidden ¶
type ErrForbidden Error
type Manifest ¶
type Manifest struct { Image string `yaml:"image" json:"image"` Mode Mode `yaml:"mode" json:"mode"` Difficulty string `yaml:"difficulty,omitempty" json:"difficulty,omitempty"` Command []string `yaml:"command,omitempty" json:"command,omitempty"` Args []string `yaml:"args,omitempty" json:"args,omitempty"` Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"` Sources map[string]string `yaml:"sources,omitempty" json:"sources,omitempty"` }
func ManifestFromPath ¶
type Mode ¶
type Mode string
Mode Enum
const ( ModeAIvsCOM Mode = "AIvsCOM" API = "https://api.diambra.ai/api/v1alpha1" )
type Submission ¶
type TokenRequest ¶
type TokenResponse ¶
type TokenResponse struct {
Token string `json:"token"`
}
type UserResponse ¶
Click to show internal directories.
Click to hide internal directories.