Documentation
¶
Index ¶
- Variables
- func IsValidMachineBackend(b MachineBackend) bool
- func LooksLikePlayID(v string) bool
- type AccessMode
- type Author
- type Challenge
- type Client
- func (c *Client) AddPortForward(ctx context.Context, playID string, pf PortForward) error
- func (c *Client) CompleteChallenge(ctx context.Context, name string) (*Challenge, error)
- func (c *Client) CompleteTutorial(ctx context.Context, name string) (*Tutorial, error)
- func (c *Client) CreateAuthor(ctx context.Context, req CreateAuthorRequest) (*Author, error)
- func (c *Client) CreateChallenge(ctx context.Context, req CreateChallengeRequest) (*Challenge, error)
- func (c *Client) CreateCourse(ctx context.Context, req CreateCourseRequest) (*Course, error)
- func (c *Client) CreatePlay(ctx context.Context, req CreatePlayRequest) (*Play, error)
- func (c *Client) CreatePlayground(ctx context.Context, req CreatePlaygroundRequest) (*Playground, error)
- func (c *Client) CreateRoadmap(ctx context.Context, req CreateRoadmapRequest) (*Roadmap, error)
- func (c *Client) CreateSession(ctx context.Context) (*Session, error)
- func (c *Client) CreateSkillPath(ctx context.Context, req CreateSkillPathRequest) (*SkillPath, error)
- func (c *Client) CreateTraining(ctx context.Context, req CreateTrainingRequest) (*Training, error)
- func (c *Client) CreateTutorial(ctx context.Context, req CreateTutorialRequest) (*Tutorial, error)
- func (c *Client) CreateVendor(ctx context.Context, req CreateVendorRequest) (*Vendor, error)
- func (c *Client) Delete(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error)
- func (c *Client) DeleteChallenge(ctx context.Context, name string) error
- func (c *Client) DeleteContentFile(ctx context.Context, kind content.ContentKind, name string, file string) error
- func (c *Client) DeleteCourse(ctx context.Context, name string) error
- func (c *Client) DeletePlay(ctx context.Context, id string) errordeprecated
- func (c *Client) DeletePlayground(ctx context.Context, name string) error
- func (c *Client) DeleteRoadmap(ctx context.Context, name string) error
- func (c *Client) DeleteSession(ctx context.Context, id string) error
- func (c *Client) DeleteSkillPath(ctx context.Context, name string) error
- func (c *Client) DeleteTraining(ctx context.Context, name string) error
- func (c *Client) DeleteTutorial(ctx context.Context, name string) error
- func (c *Client) DeleteVendor(ctx context.Context, name string) error
- func (c *Client) DestroyPlay(ctx context.Context, id string) error
- func (c *Client) Download(ctx context.Context, path string, query url.Values, headers http.Header, ...) error
- func (c *Client) DownloadContentFile(ctx context.Context, kind content.ContentKind, name string, file string, ...) error
- func (c *Client) DownloadTo(ctx context.Context, path string, query url.Values, headers http.Header, ...) error
- func (c *Client) ExposePort(ctx context.Context, id string, req ExposePortRequest) (*Port, error)
- func (c *Client) ExposeShell(ctx context.Context, id string, req ExposeShellRequest) (*Shell, error)
- func (c *Client) Get(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error)
- func (c *Client) GetAuthor(ctx context.Context) (*Author, error)
- func (c *Client) GetChallenge(ctx context.Context, name string) (*Challenge, error)
- func (c *Client) GetCourse(ctx context.Context, name string) (*Course, error)
- func (c *Client) GetInto(ctx context.Context, path string, query url.Values, headers http.Header, ...) error
- func (c *Client) GetMe(ctx context.Context) (*Me, error)
- func (c *Client) GetPlay(ctx context.Context, id string) (*Play, error)
- func (c *Client) GetPlayTasks(ctx context.Context, id string, machines []string) ([]PlayTaskDetails, error)
- func (c *Client) GetPlayground(ctx context.Context, name string, opts *GetPlaygroundOptions) (*Playground, error)
- func (c *Client) GetRoadmap(ctx context.Context, name string) (*Roadmap, error)
- func (c *Client) GetSession(ctx context.Context, id string) (*Session, error)
- func (c *Client) GetSkillPath(ctx context.Context, name string) (*SkillPath, error)
- func (c *Client) GetTraining(ctx context.Context, name string) (*Training, error)
- func (c *Client) GetTutorial(ctx context.Context, name string) (*Tutorial, error)
- func (c *Client) GetVendor(ctx context.Context, name string) (*Vendor, error)
- func (c *Client) ListAuthoredChallenges(ctx context.Context) ([]Challenge, error)
- func (c *Client) ListAuthoredCourses(ctx context.Context) ([]Course, error)
- func (c *Client) ListAuthoredRoadmaps(ctx context.Context) ([]Roadmap, error)
- func (c *Client) ListAuthoredSkillPaths(ctx context.Context) ([]SkillPath, error)
- func (c *Client) ListAuthoredTrainings(ctx context.Context) ([]Training, error)
- func (c *Client) ListAuthoredTutorials(ctx context.Context) ([]Tutorial, error)
- func (c *Client) ListAuthoredVendors(ctx context.Context) ([]Vendor, error)
- func (c *Client) ListChallenges(ctx context.Context, opts *ListChallengesOptions) ([]*Challenge, error)
- func (c *Client) ListContentFiles(ctx context.Context, kind content.ContentKind, name string) ([]string, error)
- func (c *Client) ListCourses(ctx context.Context) ([]Course, error)
- func (c *Client) ListPlayMachineConsoles(ctx context.Context, id, machine string) ([]string, error)
- func (c *Client) ListPlaygrounds(ctx context.Context, opts *ListPlaygroundsOptions) ([]Playground, error)
- func (c *Client) ListPlays(ctx context.Context, listPlaysQueryParams ListPlaysQueryParams) ([]*Play, error)
- func (c *Client) ListPortForwards(ctx context.Context, playID string) ([]*PortForward, error)
- func (c *Client) ListPorts(ctx context.Context, id string) ([]*Port, error)
- func (c *Client) ListRoadmaps(ctx context.Context) ([]Roadmap, error)
- func (c *Client) ListShells(ctx context.Context, id string) ([]*Shell, error)
- func (c *Client) ListSkillPaths(ctx context.Context) ([]SkillPath, error)
- func (c *Client) ListTrainings(ctx context.Context) ([]Training, error)
- func (c *Client) ListTutorials(ctx context.Context, opts *ListTutorialsOptions) ([]Tutorial, error)
- func (c *Client) ListVendors(ctx context.Context) ([]Vendor, error)
- func (c *Client) Patch(ctx context.Context, path string, query url.Values, headers http.Header, ...) (*http.Response, error)
- func (c *Client) PatchInto(ctx context.Context, path string, query url.Values, headers http.Header, ...) error
- func (c *Client) PersistPlay(ctx context.Context, id string) 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) Put(ctx context.Context, path string, query url.Values, headers http.Header, ...) (*http.Response, error)
- func (c *Client) PutContentMarkdown(ctx context.Context, kind content.ContentKind, name string, file string, ...) error
- func (c *Client) PutInto(ctx context.Context, path string, query url.Values, headers http.Header, ...) error
- func (c *Client) ReadPlayMachineConsole(ctx context.Context, id, machine, console string) (string, error)
- func (c *Client) RebootPlayMachine(ctx context.Context, id, machine string) (*Play, error)
- func (c *Client) RemovePortForward(ctx context.Context, playID string, index int) error
- func (c *Client) RequestPlayConn(ctx context.Context, id string) (*PlayConnHandle, error)
- func (c *Client) RequestPlayJournal(ctx context.Context, id string, req PlayJournalRequest) (*PlayJournalHandle, error)
- func (c *Client) RestartPlay(ctx context.Context, id string) (*Play, error)
- func (c *Client) RestartPlayMachine(ctx context.Context, id, machine string) (*Play, error)
- func (c *Client) ScanPorts(ctx context.Context, id string, machine string) ([]*ScannedPort, error)
- func (c *Client) SetCredentials(sessionID, accessToken string)
- func (c *Client) SetPlayMaxPlayTime(ctx context.Context, id string, maxPlayTimeMinutes int) (*Play, error)
- func (c *Client) StartChallenge(ctx context.Context, name string, opts StartChallengeOptions) (*Challenge, error)
- func (c *Client) StartCourseLesson(ctx context.Context, courseName, moduleName, lessonName string, ...) (*Course, error)
- func (c *Client) StartTunnel(ctx context.Context, id string, req StartTunnelRequest) (*StartTunnelResponse, error)
- func (c *Client) StartTutorial(ctx context.Context, name string, opts StartTutorialOptions) (*Tutorial, error)
- func (c *Client) StopChallenge(ctx context.Context, name string) (*Challenge, error)
- func (c *Client) StopCourseLesson(ctx context.Context, courseName, moduleName, lessonName string) (*Course, error)
- func (c *Client) StopPlay(ctx context.Context, id string) (*Play, error)
- func (c *Client) StopPlayMachine(ctx context.Context, id, machine string) (*Play, error)
- func (c *Client) StopTutorial(ctx context.Context, name string) (*Tutorial, error)
- func (c *Client) StreamPlayJournal(ctx context.Context, streamURL string, origin string, stdout io.Writer, ...) error
- func (c *Client) UnexposePort(ctx context.Context, id string, portID string) error
- func (c *Client) UnexposeShell(ctx context.Context, id string, shellID string) error
- func (c *Client) UpdatePlayground(ctx context.Context, name string, req UpdatePlaygroundRequest) (*Playground, error)
- func (c *Client) Upload(ctx context.Context, url string, src io.Reader) (*http.Response, error)
- func (c *Client) UploadContentFile(ctx context.Context, kind content.ContentKind, name string, file string, ...) error
- func (c *Client) UploadFrom(ctx context.Context, url string, file string) (*http.Response, error)
- type ClientOptions
- type Course
- func (c *Course) FindLesson(moduleHint, lessonHint string) (string, string, *CourseLesson, error)
- func (c *Course) GetKind() content.ContentKind
- func (c *Course) GetName() string
- func (c *Course) GetPageURL() string
- func (c *Course) IsAuthoredBy(userID string) bool
- func (c *Course) IsOfficial() bool
- type CourseLearning
- type CourseLearningLesson
- type CourseLearningModule
- type CourseLesson
- type CourseModule
- type CoursePlayground
- type CourseVariant
- type CreateAuthorRequest
- type CreateChallengeRequest
- type CreateCourseRequest
- type CreatePlayRequest
- type CreatePlaygroundRequest
- type CreateRoadmapRequest
- type CreateSkillPathRequest
- type CreateTrainingRequest
- type CreateTutorialRequest
- type CreateVendorRequest
- type ExposePortRequest
- type ExposeShellRequest
- type GetPlaygroundOptions
- type InitCondition
- type InitConditionValue
- type InitConditions
- type InitTask
- type ListChallengesOptions
- type ListPlaygroundsOptions
- type ListPlaysQueryParams
- type ListTutorialsOptions
- type Machine
- type MachineBackend
- type MachineDrive
- type MachineKernel
- type MachineNetwork
- type MachineNetworkInterface
- type MachineResources
- type MachineStartupFile
- type MachineState
- type MachineStatus
- type MachineUser
- type Me
- type Play
- func (p *Play) AllMachinesRunning() bool
- func (p *Play) CountCompletedInitTasks() int
- func (p *Play) CountCompletedTasks() int
- func (p *Play) CountInitTasks() int
- func (p *Play) CountMachines() int
- func (p *Play) CountRunningMachines() int
- func (p *Play) CountTasks() int
- func (p *Play) FactoryID() string
- func (p *Play) GetMachine(name string) *Machine
- func (p *Play) HasFailedTask() bool
- func (p *Play) IsActive() bool
- func (p *Play) IsCompletable() bool
- func (p *Play) IsFailed() bool
- func (p *Play) IsInitialized() bool
- func (p *Play) MachineState(name string) MachineState
- func (p *Play) ResolveMachine(name string) (string, error)
- func (p *Play) ResolveUser(machine, user string) (string, error)
- func (p *Play) State() PlayState
- func (p *Play) StateIs(state PlayState) bool
- type PlayConn
- func (pc *PlayConn) Close()
- func (pc *PlayConn) Start() error
- func (pc *PlayConn) WaitDone() error
- func (pc *PlayConn) WaitMachinesRunning(timeout time.Duration, s *spinner.Spinner) error
- func (pc *PlayConn) WaitPlayReady(timeout time.Duration, s *spinner.Spinner) error
- func (pc *PlayConn) WaitTasks(timeout time.Duration, initOnly bool, s *spinner.Spinner) error
- type PlayConnHandle
- type PlayConnMessage
- type PlayJournalChunk
- type PlayJournalHandle
- type PlayJournalRequest
- type PlayState
- type PlayStatus
- type PlayTask
- type PlayTaskDetails
- type PlayTaskStatus
- type Playground
- type PlaygroundAccessdeprecated
- type PlaygroundAccessControl
- type PlaygroundMachine
- type PlaygroundManifest
- type PlaygroundNetwork
- type PlaygroundSpec
- type PlaygroundTab
- type PlaygroundUserAccess
- type Port
- type PortAccess
- type PortForward
- type PremiumAccess
- type RemoteSnapshot
- type Roadmap
- type ScannedPort
- type Session
- type Shell
- type SkillPath
- type StartChallengeOptions
- type StartCourseLessonOptions
- type StartTunnelRequest
- type StartTunnelResponse
- type StartTutorialOptions
- type StateEvent
- type Training
- type Tutorial
- type UpdatePlaygroundRequest
- type Vendor
Constants ¶
This section is empty.
Variables ¶
var ( ErrAuthenticationRequired = errors.New("authentication required") ErrGatewayTimeout = errors.New("gateway timeout") ErrNotFound = errors.New("not found") ErrRateLimitExceeded = errors.New("rate limit exceeded") )
var ErrPlayTasksFailed = errors.New("one or more playground tasks failed")
ErrPlayTasksFailed is returned by WaitTasks when one or more of the playground's (non-helper) tasks ended up in the failed state.
var MachineBackends = []MachineBackend{ MachineBackendFirecracker, MachineBackendCloudHypervisor, }
Functions ¶
func IsValidMachineBackend ¶ added in v0.1.68
func IsValidMachineBackend(b MachineBackend) bool
func LooksLikePlayID ¶ added in v0.1.78
Types ¶
type AccessMode ¶
type AccessMode string
const ( AccessPrivate AccessMode = "private" AccessPublic AccessMode = "public" )
type Challenge ¶
type Challenge struct {
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
Categories []string `json:"categories" yaml:"categories"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Authors []Author `json:"authors" yaml:"authors"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
AttemptCount int `json:"attemptCount" yaml:"attemptCount"`
CompletionCount int `json:"completionCount" yaml:"completionCount"`
Play *Play `json:"play,omitempty" yaml:"play,omitempty"`
Tasks map[string]PlayTask `json:"tasks,omitempty" yaml:"tasks,omitempty"`
}
func (*Challenge) GetKind ¶
func (ch *Challenge) GetKind() content.ContentKind
func (*Challenge) GetPageURL ¶
func (*Challenge) IsAuthoredBy ¶
func (*Challenge) IsOfficial ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opts ClientOptions) *Client
func (*Client) AddPortForward ¶ added in v0.1.56
func (*Client) CompleteChallenge ¶
func (*Client) CompleteTutorial ¶ added in v0.1.36
func (*Client) CreateAuthor ¶
func (*Client) CreateChallenge ¶
func (*Client) CreateCourse ¶
func (*Client) CreatePlay ¶
func (*Client) CreatePlayground ¶
func (c *Client) CreatePlayground(ctx context.Context, req CreatePlaygroundRequest) (*Playground, error)
func (*Client) CreateRoadmap ¶
func (*Client) CreateSession ¶
func (*Client) CreateSkillPath ¶
func (*Client) CreateTraining ¶
func (*Client) CreateTutorial ¶
func (*Client) CreateVendor ¶ added in v0.1.74
func (*Client) DeleteChallenge ¶
func (*Client) DeleteContentFile ¶
func (*Client) DeletePlayground ¶
func (*Client) DeleteRoadmap ¶
func (*Client) DeleteSkillPath ¶
func (*Client) DeleteTraining ¶
func (*Client) DeleteTutorial ¶
func (*Client) DeleteVendor ¶ added in v0.1.74
func (*Client) DestroyPlay ¶ added in v0.1.49
func (*Client) DownloadContentFile ¶
func (*Client) DownloadTo ¶
func (*Client) ExposePort ¶
func (*Client) ExposeShell ¶
func (*Client) GetChallenge ¶
func (*Client) GetPlayTasks ¶ added in v0.1.81
func (c *Client) GetPlayTasks(ctx context.Context, id string, machines []string) ([]PlayTaskDetails, error)
GetPlayTasks returns the merged control-plane + data-plane view of a play's tasks. When machines is non-empty, only those machines' tasks are returned.
func (*Client) GetPlayground ¶
func (c *Client) GetPlayground(ctx context.Context, name string, opts *GetPlaygroundOptions) (*Playground, error)
func (*Client) GetRoadmap ¶
func (*Client) GetSession ¶
func (*Client) GetSkillPath ¶
func (*Client) GetTraining ¶
func (*Client) GetTutorial ¶
func (*Client) ListAuthoredChallenges ¶
func (*Client) ListAuthoredCourses ¶
func (*Client) ListAuthoredRoadmaps ¶
func (*Client) ListAuthoredSkillPaths ¶
func (*Client) ListAuthoredTrainings ¶
func (*Client) ListAuthoredTutorials ¶
func (*Client) ListAuthoredVendors ¶ added in v0.1.74
func (*Client) ListChallenges ¶
func (*Client) ListContentFiles ¶
func (*Client) ListPlayMachineConsoles ¶ added in v0.1.76
func (*Client) ListPlaygrounds ¶
func (c *Client) ListPlaygrounds(ctx context.Context, opts *ListPlaygroundsOptions) ([]Playground, error)
func (*Client) ListPortForwards ¶ added in v0.1.56
func (*Client) ListShells ¶
func (*Client) ListSkillPaths ¶
func (*Client) ListTrainings ¶
func (*Client) ListTutorials ¶
func (*Client) ListVendors ¶ added in v0.1.74
func (*Client) PersistPlay ¶ added in v0.1.51
func (*Client) PutContentMarkdown ¶
func (*Client) ReadPlayMachineConsole ¶ added in v0.1.76
func (*Client) RebootPlayMachine ¶ added in v0.1.76
func (*Client) RemovePortForward ¶ added in v0.1.56
func (*Client) RequestPlayConn ¶
func (*Client) RequestPlayJournal ¶ added in v0.1.81
func (c *Client) RequestPlayJournal(ctx context.Context, id string, req PlayJournalRequest) (*PlayJournalHandle, error)
RequestPlayJournal asks the server for a conductor-terminated WebSocket URL that streams the requested machine's journal (journalctl --follow).
func (*Client) RestartPlay ¶ added in v0.1.49
func (*Client) RestartPlayMachine ¶ added in v0.1.76
func (*Client) SetCredentials ¶
func (*Client) SetPlayMaxPlayTime ¶ added in v0.1.84
func (*Client) StartChallenge ¶
func (*Client) StartCourseLesson ¶ added in v0.1.59
func (*Client) StartTunnel ¶
func (c *Client) StartTunnel(ctx context.Context, id string, req StartTunnelRequest) (*StartTunnelResponse, error)
func (*Client) StartTutorial ¶ added in v0.1.36
func (*Client) StopChallenge ¶
func (*Client) StopCourseLesson ¶ added in v0.1.59
func (*Client) StopPlayMachine ¶ added in v0.1.76
func (*Client) StopTutorial ¶ added in v0.1.36
func (*Client) StreamPlayJournal ¶ added in v0.1.81
func (c *Client) StreamPlayJournal( ctx context.Context, streamURL string, origin string, stdout io.Writer, stderr io.Writer, ) error
StreamPlayJournal connects to the journal stream URL and forwards each chunk's stdout/stderr to the given writers until the stream ends or ctx is cancelled.
func (*Client) UnexposePort ¶
func (*Client) UnexposeShell ¶
func (*Client) UpdatePlayground ¶
func (c *Client) UpdatePlayground(ctx context.Context, name string, req UpdatePlaygroundRequest) (*Playground, error)
func (*Client) UploadContentFile ¶
type ClientOptions ¶
type Course ¶
type Course struct {
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
Authors []Author `json:"authors" yaml:"authors"`
Modules []CourseModule `json:"modules,omitempty" yaml:"modules,omitempty"`
Learning *CourseLearning `json:"learning,omitempty" yaml:"learning,omitempty"`
}
func (*Course) FindLesson ¶ added in v0.1.59
FindLesson resolves a lesson by module hint and lesson hint (name or slug). If moduleHint is empty, all modules are searched. Returns the resolved module name, lesson name, and lesson pointer, or an error if not found or ambiguous.
func (*Course) GetKind ¶
func (c *Course) GetKind() content.ContentKind
func (*Course) GetPageURL ¶
func (*Course) IsAuthoredBy ¶
func (*Course) IsOfficial ¶
type CourseLearning ¶ added in v0.1.59
type CourseLearning struct {
Modules map[string]CourseLearningModule `json:"modules" yaml:"modules"`
}
type CourseLearningLesson ¶ added in v0.1.59
type CourseLearningModule ¶ added in v0.1.59
type CourseLearningModule struct {
Lessons map[string]CourseLearningLesson `json:"lessons" yaml:"lessons"`
Started bool `json:"started" yaml:"started"`
}
type CourseLesson ¶ added in v0.1.59
type CourseLesson struct {
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
Slug string `json:"slug" yaml:"slug"`
Path string `json:"path" yaml:"path"`
Playground *CoursePlayground `json:"playground" yaml:"playground"`
Tasks map[string]PlayTask `json:"tasks,omitempty" yaml:"tasks,omitempty"`
}
type CourseModule ¶ added in v0.1.59
type CourseModule struct {
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
Slug string `json:"slug" yaml:"slug"`
Path string `json:"path" yaml:"path"`
Lessons []CourseLesson `json:"lessons" yaml:"lessons"`
}
type CoursePlayground ¶ added in v0.1.59
type CoursePlayground struct {
Name string `json:"name" yaml:"name"`
}
type CourseVariant ¶
type CourseVariant string
const ( CourseVariantSimple CourseVariant = "simple" CourseVariantModular CourseVariant = "modular" )
type CreateAuthorRequest ¶
type CreateAuthorRequest struct {
Author
}
type CreateChallengeRequest ¶
type CreateChallengeRequest struct {
Name string `json:"name"`
}
type CreateCourseRequest ¶
type CreateCourseRequest struct {
Name string `json:"name"`
Variant CourseVariant `json:"variant"`
Sample bool `json:"sample"`
}
type CreatePlayRequest ¶
type CreatePlayRequest struct {
Playground string `json:"playground"`
Tabs []PlaygroundTab `json:"tabs,omitempty"`
Networks []PlaygroundNetwork `json:"networks,omitempty"`
Machines []PlaygroundMachine `json:"machines,omitempty"`
InitTasks map[string]InitTask `json:"initTasks,omitempty"`
InitConditions map[string]string `json:"initConditions,omitempty"`
SafetyDisclaimerConsent bool `json:"safetyDisclaimerConsent"`
AsFreeTierUser bool `json:"asFreeTierUser,omitempty"`
}
type CreatePlaygroundRequest ¶
type CreatePlaygroundRequest struct {
Name string `yaml:"name" json:"name"`
Base string `yaml:"base" json:"base"`
Title string `yaml:"title" json:"title"`
Description string `yaml:"description" json:"description"`
Categories []string `yaml:"categories" json:"categories"`
Markdown string `yaml:"markdown,omitempty" json:"markdown,omitempty"`
Networks []PlaygroundNetwork `yaml:"networks" json:"networks"`
Machines []PlaygroundMachine `yaml:"machines" json:"machines"`
Tabs []PlaygroundTab `yaml:"tabs" json:"tabs"`
InitTasks map[string]InitTask `yaml:"initTasks" json:"initTasks"`
InitConditions InitConditions `yaml:"initConditions" json:"initConditions"`
RegistryAuth string `yaml:"registryAuth" json:"registryAuth"`
PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"`
AccessControl PlaygroundAccessControl `yaml:"accessControl" json:"accessControl"`
}
type CreateRoadmapRequest ¶
type CreateRoadmapRequest struct {
Name string `json:"name"`
}
type CreateSkillPathRequest ¶
type CreateSkillPathRequest struct {
Name string `json:"name"`
}
type CreateTrainingRequest ¶
type CreateTrainingRequest struct {
Name string `json:"name"`
}
type CreateTutorialRequest ¶
type CreateTutorialRequest struct {
Name string `json:"name"`
}
type CreateVendorRequest ¶ added in v0.1.74
type CreateVendorRequest struct {
Name string `json:"name"`
}
type ExposePortRequest ¶
type ExposeShellRequest ¶
type ExposeShellRequest struct {
Machine string `json:"machine"`
User string `json:"user"`
Access AccessMode `json:"access,omitempty"`
}
type GetPlaygroundOptions ¶
type GetPlaygroundOptions struct {
Format string // <none> | extended
}
type InitCondition ¶
type InitConditionValue ¶
type InitConditionValue struct {
Key string `yaml:"key" json:"key"`
Default string `yaml:"default" json:"default"`
Nullable bool `yaml:"nullable,omitempty" json:"nullable,omitempty"`
Options []string `yaml:"options,omitempty" json:"options,omitempty"`
Placeholder string `yaml:"placeholder,omitempty" json:"placeholder,omitempty"`
ValidationRegex string `yaml:"validationRegex,omitempty" json:"validationRegex,omitempty"`
}
type InitConditions ¶
type InitConditions struct {
Values []InitConditionValue `yaml:"values,omitempty" json:"values,omitempty"`
}
type InitTask ¶
type InitTask struct {
Name string `yaml:"name" json:"name"`
Machine string `yaml:"machine,omitempty" json:"machine,omitempty"`
Init bool `yaml:"init,omitempty" json:"init,omitempty"`
User string `yaml:"user" json:"user"`
TimeoutSeconds int `yaml:"timeout_seconds,omitempty" json:"timeout_seconds,omitempty"`
Needs []string `yaml:"needs,omitempty" json:"needs,omitempty"`
Run string `yaml:"run" json:"run"`
Status int `yaml:"status,omitempty" json:"status,omitempty"`
Conditions []InitCondition `yaml:"conditions,omitempty" json:"conditions,omitempty"`
}
type ListChallengesOptions ¶
type ListPlaygroundsOptions ¶
type ListPlaygroundsOptions struct {
Filter string
}
type ListPlaysQueryParams ¶ added in v0.1.78
type ListPlaysQueryParams struct {
Persistent bool `json:"persistent,omitempty" yaml:"persistent,omitempty"`
}
type ListTutorialsOptions ¶ added in v0.1.36
type Machine ¶
type Machine struct {
Name string `json:"name"`
Users []MachineUser `json:"users"`
Resources MachineResources `json:"resources"`
}
func (*Machine) DefaultUser ¶
func (m *Machine) DefaultUser() *MachineUser
type MachineBackend ¶ added in v0.1.68
type MachineBackend string
const ( MachineBackendFirecracker MachineBackend = "firecracker" MachineBackendCloudHypervisor MachineBackend = "cloud-hypervisor" )
type MachineDrive ¶ added in v0.1.35
type MachineDrive struct {
Source string `yaml:"source,omitempty" json:"source,omitempty"`
Mount string `yaml:"mount,omitempty" json:"mount,omitempty"`
Size string `yaml:"size,omitempty" json:"size,omitempty"`
Filesystem string `yaml:"filesystem,omitempty" json:"filesystem,omitempty"`
ReadOnly bool `yaml:"readOnly,omitempty" json:"readOnly,omitempty"`
Persistent bool `yaml:"persistent,omitempty" json:"persistent,omitempty"`
Snapshot *RemoteSnapshot `yaml:"snapshot,omitempty" json:"snapshot,omitempty"`
}
type MachineKernel ¶ added in v0.1.49
type MachineKernel struct {
Source string `yaml:"source,omitempty" json:"source,omitempty"`
Snapshot *RemoteSnapshot `yaml:"snapshot,omitempty" json:"snapshot,omitempty"`
}
type MachineNetwork ¶ added in v0.1.35
type MachineNetwork struct {
Interfaces []MachineNetworkInterface `yaml:"interfaces,omitempty" json:"interfaces,omitempty"`
}
type MachineNetworkInterface ¶ added in v0.1.35
type MachineResources ¶
type MachineStartupFile ¶
type MachineState ¶ added in v0.1.76
type MachineState string
const ( MachineStateCreated MachineState = "CREATED" MachineStateWarmingUp MachineState = "WARMING_UP" MachineStateWarmedUp MachineState = "WARMED_UP" MachineStateStarting MachineState = "STARTING" MachineStateRunning MachineState = "RUNNING" MachineStateRebooting MachineState = "REBOOTING" MachineStateStopping MachineState = "STOPPING" MachineStateStopped MachineState = "STOPPED" )
type MachineStatus ¶ added in v0.1.76
type MachineStatus struct {
Name string `json:"name" yaml:"name"`
State MachineState `json:"state" yaml:"state"`
}
type MachineUser ¶
type Me ¶
type Me struct {
ID string `json:"id" yaml:"userId"`
GithubProfileId string `json:"githubProfileId" yaml:"githubProfileId"`
PremiumAccess *PremiumAccess `json:"premiumAccess,omitempty" yaml:"premiumAccess,omitempty"`
}
type Play ¶
type Play struct {
ID string `json:"id" yaml:"id"`
Title string `json:"title" yaml:"title"`
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
LastStateAt string `json:"lastStateAt" yaml:"lastStateAt"`
ExpiresIn int `json:"expiresIn" yaml:"expiresIn"`
MaxPlayTime string `json:"maxPlayTime,omitempty" yaml:"maxPlayTime,omitempty"`
Status *PlayStatus `json:"status,omitempty" yaml:"status,omitempty"`
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"`
Machines []Machine `json:"machines" yaml:"machines"`
Tasks map[string]PlayTask `json:"tasks,omitempty" yaml:"tasks,omitempty"`
}
func (*Play) AllMachinesRunning ¶ added in v0.1.85
AllMachinesRunning reports whether every machine of the play has reached the RUNNING state. It returns false until a status with the full machine list has been observed.
func (*Play) CountCompletedInitTasks ¶
func (*Play) CountCompletedTasks ¶ added in v0.1.48
func (*Play) CountInitTasks ¶
func (*Play) CountMachines ¶ added in v0.1.85
CountMachines returns the number of machines defined for the play.
func (*Play) CountRunningMachines ¶ added in v0.1.85
CountRunningMachines returns how many of the play's machines currently report the RUNNING state in the latest status.
func (*Play) CountTasks ¶ added in v0.1.48
func (*Play) GetMachine ¶
func (*Play) HasFailedTask ¶ added in v0.1.83
HasFailedTask reports whether any non-helper task has failed.
func (*Play) IsCompletable ¶
func (*Play) IsInitialized ¶
func (*Play) MachineState ¶ added in v0.1.76
func (p *Play) MachineState(name string) MachineState
func (*Play) ResolveMachine ¶ added in v0.1.62
ResolveMachine returns the given machine name if it exists in the playground, or defaults to the first machine's name if name is empty.
func (*Play) ResolveUser ¶ added in v0.1.62
ResolveUser returns the given user if it exists on the machine, or defaults to the machine's default user (or "root") if user is empty.
type PlayConn ¶
type PlayConn struct {
// contains filtered or unexported fields
}
func NewPlayConn ¶
func (*PlayConn) Close ¶
func (pc *PlayConn) Close()
Close stops the play connection. It cancels the connection context and closes the underlying websocket, which makes the reader goroutine exit and close the message channels. It is idempotent and safe to call concurrently with the reader (it never closes the channels itself).
func (*PlayConn) WaitMachinesRunning ¶ added in v0.1.85
WaitMachinesRunning blocks until every machine of the playground has reached the RUNNING state, driven by live status updates received over the play connection. A non-positive timeout means wait indefinitely (until the connection's context is cancelled).
func (*PlayConn) WaitPlayReady ¶
func (*PlayConn) WaitTasks ¶ added in v0.1.83
WaitTasks blocks until the playground's tasks reach a terminal state, driven by live task updates received over the play connection.
When initOnly is true, it returns successfully as soon as all init tasks have completed; otherwise it waits for all non-helper tasks to complete. In either mode it returns ErrPlayTasksFailed as soon as a non-helper task fails, unless the wait condition has already been satisfied.
A non-positive timeout means wait indefinitely (until the connection's context is cancelled).
type PlayConnHandle ¶
type PlayConnHandle struct {
URL string `json:"url"`
}
type PlayConnMessage ¶
type PlayConnMessage struct {
Kind string `json:"kind"`
Machine string `json:"machine,omitempty"`
Task PlayTask `json:"task,omitempty"`
Status *PlayStatus `json:"status,omitempty"`
}
type PlayJournalChunk ¶ added in v0.1.81
type PlayJournalChunk struct {
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
ExitCode int `json:"exitCode,omitempty"`
EOF bool `json:"eof,omitempty"`
}
PlayJournalChunk is a single frame of streamed journal output.
type PlayJournalHandle ¶ added in v0.1.81
type PlayJournalHandle struct {
URL string `json:"url"`
}
type PlayJournalRequest ¶ added in v0.1.81
type PlayState ¶ added in v0.1.49
type PlayState string
const ( StateCreated PlayState = "CREATED" StateWarmingUp PlayState = "WARMING_UP" StateWarmedUp PlayState = "WARMED_UP" StateStarting PlayState = "STARTING" StateRunning PlayState = "RUNNING" StateStopping PlayState = "STOPPING" StateStopped PlayState = "STOPPED" StateDestroying PlayState = "DESTROYING" StateDestroyed PlayState = "DESTROYED" StateFailed PlayState = "FAILED" )
type PlayStatus ¶ added in v0.1.49
type PlayStatus struct {
FactoryID string `json:"factoryId" yaml:"factoryId"`
StateEvents []StateEvent `json:"stateEvents" yaml:"stateEvents"`
Machines []MachineStatus `json:"machines,omitempty" yaml:"machines,omitempty"`
}
type PlayTask ¶
type PlayTask struct {
Name string `json:"name"`
Init bool `json:"init"`
Helper bool `json:"helper"`
Status PlayTaskStatus `json:"status"`
Version int `json:"version"`
}
type PlayTaskDetails ¶ added in v0.1.81
type PlayTaskDetails struct {
Name string `json:"name" yaml:"name"`
Machine string `json:"machine,omitempty" yaml:"machine,omitempty"`
Status PlayTaskStatus `json:"status" yaml:"status"`
Version int `json:"version" yaml:"version"`
Init bool `json:"init,omitempty" yaml:"init,omitempty"`
Helper bool `json:"helper,omitempty" yaml:"helper,omitempty"`
Needs []string `json:"needs,omitempty" yaml:"needs,omitempty"`
Run string `json:"run,omitempty" yaml:"run,omitempty"`
Env []string `json:"env,omitempty" yaml:"env,omitempty"`
User string `json:"user,omitempty" yaml:"user,omitempty"`
TimeoutSeconds int `json:"timeoutSeconds,omitempty" yaml:"timeoutSeconds,omitempty"`
ExitCode int `json:"exitCode,omitempty" yaml:"exitCode,omitempty"`
Stdout string `json:"stdout,omitempty" yaml:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty" yaml:"stderr,omitempty"`
LastRunAt string `json:"lastRunAt,omitempty" yaml:"lastRunAt,omitempty"`
LastDurationMs int `json:"lastDurationMs,omitempty" yaml:"lastDurationMs,omitempty"`
Hintcheck string `json:"hintcheck,omitempty" yaml:"hintcheck,omitempty"`
HintcheckExitCode int `json:"hintcheckExitCode,omitempty" yaml:"hintcheckExitCode,omitempty"`
HintcheckStdout []string `json:"hintcheckStdout,omitempty" yaml:"hintcheckStdout,omitempty"`
HintcheckStderr []string `json:"hintcheckStderr,omitempty" yaml:"hintcheckStderr,omitempty"`
Failcheck string `json:"failcheck,omitempty" yaml:"failcheck,omitempty"`
FailcheckExitCode int `json:"failcheckExitCode,omitempty" yaml:"failcheckExitCode,omitempty"`
FailcheckStdout []string `json:"failcheckStdout,omitempty" yaml:"failcheckStdout,omitempty"`
FailcheckStderr []string `json:"failcheckStderr,omitempty" yaml:"failcheckStderr,omitempty"`
// DataPlaneOnly flags tasks reported by the conductor (data plane) that
// aren't present in the control-plane task list.
DataPlaneOnly bool `json:"dataPlaneOnly,omitempty" yaml:"dataPlaneOnly,omitempty"`
}
PlayTaskDetails is the merged control-plane + data-plane view of a task returned by GET /plays/{id}/tasks. The extra (full-view) fields are only populated for privileged callers (super-admins, capability holders, authors).
type PlayTaskStatus ¶
type PlayTaskStatus int
const ( PlayTaskStatusNone PlayTaskStatus = 0 PlayTaskStatusCreated PlayTaskStatus = 10 PlayTaskStatusBlocked PlayTaskStatus = 20 PlayTaskStatusRunning PlayTaskStatus = 30 PlayTaskStatusFailed PlayTaskStatus = 35 PlayTaskStatusCompleted PlayTaskStatus = 40 )
type Playground ¶
type Playground struct {
ID string `yaml:"id" json:"id"`
Owner string `yaml:"owner" json:"owner"`
Name string `yaml:"name" json:"name"`
Base string `yaml:"base" json:"base"`
Title string `yaml:"title" json:"title"`
Description string `yaml:"description" json:"description"`
Categories []string `yaml:"categories" json:"categories"`
Cover string `yaml:"cover,omitempty" json:"cover,omitempty"`
Markdown string `yaml:"markdown,omitempty" json:"markdown,omitempty"`
Published bool `yaml:"published" json:"published"`
PageURL string `yaml:"pageUrl" json:"pageUrl"`
Networks []PlaygroundNetwork `yaml:"networks" json:"networks"`
Machines []PlaygroundMachine `yaml:"machines" json:"machines"`
Tabs []PlaygroundTab `yaml:"tabs" json:"tabs"`
InitTasks map[string]InitTask `yaml:"initTasks,omitempty" json:"initTasks,omitempty"`
InitConditions InitConditions `yaml:"initConditions,omitempty" json:"initConditions,omitempty"`
RegistryAuth string `yaml:"registryAuth,omitempty" json:"registryAuth,omitempty"`
PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"`
AccessControl PlaygroundAccessControl `yaml:"accessControl" json:"accessControl"`
UserAccess PlaygroundUserAccess `yaml:"userAccess,omitempty" json:"userAccess,omitempty"`
}
type PlaygroundAccess
deprecated
type PlaygroundAccessControl ¶
type PlaygroundMachine ¶
type PlaygroundMachine struct {
Name string `yaml:"name" json:"name"`
Users []MachineUser `yaml:"users,omitempty" json:"users,omitempty"`
Backend MachineBackend `yaml:"backend,omitempty" json:"backend,omitempty"`
Kernel *MachineKernel `yaml:"kernel,omitempty" json:"kernel,omitempty"`
Drives []MachineDrive `yaml:"drives,omitempty" json:"drives,omitempty"`
Network *MachineNetwork `yaml:"network,omitempty" json:"network,omitempty"`
Resources *MachineResources `yaml:"resources,omitempty" json:"resources,omitempty"`
StartupFiles []MachineStartupFile `yaml:"startupFiles,omitempty" json:"startupFiles,omitempty"`
NoSSH bool `yaml:"noSSH,omitempty" json:"noSSH,omitempty"`
}
func (*PlaygroundMachine) UnmarshalYAML ¶ added in v0.1.49
func (m *PlaygroundMachine) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML implements custom unmarshaling to support both legacy (kernel as string) and current (kernel as struct) manifest formats.
type PlaygroundManifest ¶
type PlaygroundManifest struct {
Kind string `yaml:"kind" json:"kind"`
Name string `yaml:"name" json:"name"`
Base string `yaml:"base,omitempty" json:"base,omitempty"`
Title string `yaml:"title,omitempty" json:"title,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Cover string `yaml:"cover,omitempty" json:"cover,omitempty"`
Categories []string `yaml:"categories,omitempty" json:"categories,omitempty"`
Markdown string `yaml:"markdown,omitempty" json:"markdown,omitempty"`
Playground PlaygroundSpec `yaml:"playground" json:"playground"`
}
type PlaygroundNetwork ¶ added in v0.1.35
type PlaygroundSpec ¶
type PlaygroundSpec struct {
Networks []PlaygroundNetwork `yaml:"networks,omitempty" json:"networks,omitempty"`
Machines []PlaygroundMachine `yaml:"machines,omitempty" json:"machines,omitempty"`
Tabs []PlaygroundTab `yaml:"tabs,omitempty" json:"tabs,omitempty"`
InitTasks map[string]InitTask `yaml:"initTasks,omitempty" json:"initTasks,omitempty"`
InitConditions InitConditions `yaml:"initConditions,omitempty" json:"initConditions,omitempty"`
RegistryAuth string `yaml:"registryAuth,omitempty" json:"registryAuth,omitempty"`
PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"`
// Deprecated: Use PlaygroundAccessControl instead
Access *PlaygroundAccess `yaml:"access,omitempty" json:"access,omitempty"`
AccessControl PlaygroundAccessControl `yaml:"accessControl" json:"accessControl"`
}
func (*PlaygroundSpec) HasAccessControl ¶
func (s *PlaygroundSpec) HasAccessControl() bool
type PlaygroundTab ¶
type PlaygroundTab struct {
ID string `yaml:"id,omitempty" json:"id,omitempty"`
Kind string `yaml:"kind" json:"kind"`
Name string `yaml:"name" json:"name"`
Machine string `yaml:"machine,omitempty" json:"machine,omitempty"`
Number int `yaml:"number,omitempty" json:"number,omitempty"`
Access string `yaml:"access,omitempty" json:"access,omitempty"`
Tls bool `yaml:"tls,omitempty" json:"tls,omitempty"`
HostRewrite string `yaml:"hostRewrite,omitempty" json:"hostRewrite,omitempty"`
PathRewrite string `yaml:"pathRewrite,omitempty" json:"pathRewrite,omitempty"`
URL string `yaml:"url,omitempty" json:"url,omitempty"`
}
type PlaygroundUserAccess ¶
type Port ¶
type Port struct {
ID string `json:"id"`
PlayID string `json:"playId"`
Machine string `json:"machine"`
Number int `json:"number"`
Hostname string `json:"hostname"`
AccessMode AccessMode `json:"access"`
TLS bool `json:"tls"`
HostRewrite string `json:"hostRewrite,omitempty"`
PathRewrite string `json:"pathRewrite,omitempty"`
URL string `json:"url"`
}
type PortAccess ¶
type PortAccess string
const ( PortAccessPublic PortAccess = "public" PortAccessPrivate PortAccess = "private" )
type PortForward ¶ added in v0.1.56
type PremiumAccess ¶
type RemoteSnapshot ¶ added in v0.1.49
type Roadmap ¶
type Roadmap struct {
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
Authors []Author `json:"authors" yaml:"authors"`
}
func (*Roadmap) GetKind ¶
func (t *Roadmap) GetKind() content.ContentKind
func (*Roadmap) GetPageURL ¶
func (*Roadmap) IsAuthoredBy ¶
func (*Roadmap) IsOfficial ¶
type ScannedPort ¶ added in v0.1.63
type SkillPath ¶
type SkillPath struct {
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
Authors []Author `json:"authors" yaml:"authors"`
}
func (*SkillPath) GetKind ¶
func (t *SkillPath) GetKind() content.ContentKind
func (*SkillPath) GetPageURL ¶
func (*SkillPath) IsAuthoredBy ¶
func (*SkillPath) IsOfficial ¶
type StartChallengeOptions ¶
type StartCourseLessonOptions ¶ added in v0.1.59
type StartTunnelRequest ¶
type StartTunnelResponse ¶
type StartTutorialOptions ¶ added in v0.1.36
type StateEvent ¶ added in v0.1.49
type Training ¶
type Training struct {
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
Authors []Author `json:"authors" yaml:"authors"`
}
func (*Training) GetKind ¶
func (t *Training) GetKind() content.ContentKind
func (*Training) GetPageURL ¶
func (*Training) IsAuthoredBy ¶
func (*Training) IsOfficial ¶
type Tutorial ¶
type Tutorial struct {
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
Categories []string `json:"categories" yaml:"categories"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Authors []Author `json:"authors" yaml:"authors"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
AttemptCount int `json:"attemptCount" yaml:"attemptCount"`
CompletionCount int `json:"completionCount" yaml:"completionCount"`
Play *Play `json:"play,omitempty" yaml:"play,omitempty"`
}
func (*Tutorial) GetKind ¶
func (t *Tutorial) GetKind() content.ContentKind
func (*Tutorial) GetPageURL ¶
func (*Tutorial) IsAuthoredBy ¶
func (*Tutorial) IsOfficial ¶
type UpdatePlaygroundRequest ¶
type UpdatePlaygroundRequest struct {
Title string `yaml:"title" json:"title"`
Description string `yaml:"description" json:"description"`
Categories []string `yaml:"categories" json:"categories"`
Cover string `yaml:"cover,omitempty" json:"cover,omitempty"`
Markdown string `yaml:"markdown,omitempty" json:"markdown,omitempty"`
Networks []PlaygroundNetwork `yaml:"networks" json:"networks"`
Machines []PlaygroundMachine `yaml:"machines" json:"machines"`
Tabs []PlaygroundTab `yaml:"tabs" json:"tabs"`
InitTasks map[string]InitTask `yaml:"initTasks" json:"initTasks"`
InitConditions InitConditions `yaml:"initConditions" json:"initConditions"`
RegistryAuth string `yaml:"registryAuth" json:"registryAuth"`
PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty"`
AccessControl PlaygroundAccessControl `yaml:"accessControl" json:"accessControl"`
}
type Vendor ¶ added in v0.1.74
type Vendor struct {
CreatedAt string `json:"createdAt" yaml:"createdAt"`
UpdatedAt string `json:"updatedAt" yaml:"updatedAt"`
Name string `json:"name" yaml:"name"`
Title string `json:"title" yaml:"title"`
Description string `json:"description" yaml:"description"`
Cover string `json:"cover,omitempty" yaml:"cover,omitempty"`
Categories []string `json:"categories" yaml:"categories"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Authors []Author `json:"authors" yaml:"authors"`
PageURL string `json:"pageUrl" yaml:"pageUrl"`
}
func (*Vendor) GetKind ¶ added in v0.1.74
func (v *Vendor) GetKind() content.ContentKind