Documentation
¶
Index ¶
- type Client
- func (c *Client) CreatePlay(ctx context.Context, req CreatePlayRequest) (*Play, error)
- func (c *Client) CreateSession(ctx context.Context) (*Session, error)
- func (c *Client) Delete(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error)
- func (c *Client) DeletePlay(ctx context.Context, id string) error
- func (c *Client) DeleteSession(ctx context.Context, id string) error
- func (c *Client) Get(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error)
- func (c *Client) GetAccount(ctx context.Context) (*Me, error)
- func (c *Client) GetInto(ctx context.Context, path string, query url.Values, headers http.Header, ...) error
- func (c *Client) GetPlay(ctx context.Context, id string) (*Play, error)
- func (c *Client) GetPlayground(ctx context.Context, name string) (*Playground, error)
- func (c *Client) GetSession(ctx context.Context, id string) (*Session, error)
- func (c *Client) ListPlaygrounds(ctx context.Context) ([]Playground, error)
- func (c *Client) ListPlays(ctx context.Context) ([]*Play, error)
- func (c *Client) Post(ctx context.Context, path string, query url.Values, headers http.Header, ...) (*http.Response, error)
- func (c *Client) PostInto(ctx context.Context, path string, query url.Values, headers http.Header, ...) error
- func (c *Client) SetCredentials(sessionID, accessToken string)
- func (c *Client) StartTunnel(ctx context.Context, id string, req StartTunnelRequest) (*StartTunnelResponse, error)
- type ClientOptions
- type CreatePlayRequest
- type Machine
- type Me
- type Play
- type Playground
- type PortAccess
- type Session
- type StartTunnelRequest
- type StartTunnelResponse
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 NewClient ¶
func NewClient(opts ClientOptions) *Client
func (*Client) CreatePlay ¶
func (*Client) CreateSession ¶
func (*Client) GetPlayground ¶
func (*Client) GetSession ¶
func (*Client) ListPlaygrounds ¶
func (c *Client) ListPlaygrounds(ctx context.Context) ([]Playground, error)
func (*Client) SetCredentials ¶
func (*Client) StartTunnel ¶
func (c *Client) StartTunnel(ctx context.Context, id string, req StartTunnelRequest) (*StartTunnelResponse, error)
type ClientOptions ¶
type CreatePlayRequest ¶
type CreatePlayRequest struct {
Playground string `json:"playground"`
}
type Play ¶
type Play struct {
ID string `json:"id" yaml:"id"`
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
LastStateAt string `json:"lastStateAt" yaml:"lastStateAt"`
ExpiresIn int `json:"expiresIn" yaml:"expiresIn"`
Playground Playground `json:"playground" yaml:"playground"`
TutorialName string `json:"tutorialName,omitempty" yaml:"tutorialName"`
Tutorial *struct {
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
} `json:"tutorial,omitempty" yaml:"tutorial"`
ChallengeName string `json:"challengeName,omitempty" yaml:"challengeName"`
Challenge *struct {
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
} `json:"challenge,omitempty" yaml:"challenge"`
CourseName string `json:"courseName,omitempty" yaml:"courseName"`
Course *struct {
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
} `json:"course,omitempty" yaml:"course"`
LessonPath string `json:"lessonPath,omitempty" yaml:"lessonPath"`
Lesson *struct {
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
} `json:"lesson,omitempty" yaml:"lesson"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
Active bool `json:"active" yaml:"active"`
Running bool `json:"running" yaml:"running"`
Destroyed bool `json:"destroyed" yaml:"destroyed"`
Failed bool `json:"failed" yaml:"failed"`
Machines []Machine `json:"machines" yaml:"machines"`
}
func (*Play) GetMachine ¶
type Playground ¶
type PortAccess ¶
type PortAccess string
const ( PortAccessPublic PortAccess = "public" PortAccessPrivate PortAccess = "private" )
type StartTunnelRequest ¶
type StartTunnelRequest struct {
Machine string `json:"machine"`
Port int `json:"port"`
Access PortAccess `json:"access"`
GenerateLoginURL bool `json:"generateLoginUrl"`
SSHPubKey string `json:"sshPubKey"`
}
type StartTunnelResponse ¶
Click to show internal directories.
Click to hide internal directories.