api

package
v0.0.0-...-1fa5987 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddVaultInput

type AddVaultInput struct {
	URL string `json:"url"`
}

type AddVaultOutput

type AddVaultOutput struct {
}

type ApplyInput

type ApplyInput struct {

	// One of 'exo', 'compose', or 'procfile'.
	Format string `json:"format"`
	// Path of manifest file to load. May be relative to the workspace root. If format is not provided, will be inferred from path name.
	ManifestPath *string `json:"manifestPath"`
	// Contents of the manifest file. Not required if manifest-path is provided.
	Manifest *string `json:"manifest"`
}

type ApplyOutput

type ApplyOutput struct {
	Warnings []string `json:"warnings"`
	JobID    string   `json:"jobId"`
}

type AuthEsvInput

type AuthEsvInput struct {
}

type AuthEsvOutput

type AuthEsvOutput struct {
	AuthURL  string `json:"authUrl"`
	AuthCode string `json:"authCode"`
}

type BuildComponentsInput

type BuildComponentsInput struct {
	Refs []string `json:"refs"`
}

type BuildComponentsOutput

type BuildComponentsOutput struct {
	JobID string `json:"jobId"`
}

type BuildInput

type BuildInput struct {
}

type BuildOutput

type BuildOutput struct {
	JobID string `json:"jobId"`
}

type Builder

type Builder interface {
	Build(context.Context, *BuildInput) (*BuildOutput, error)
}

type ComponentDescription

type ComponentDescription struct {
	ID        string   `json:"id"`
	Name      string   `json:"name"`
	Type      string   `json:"type"`
	Spec      string   `json:"spec"`
	State     string   `json:"state"`
	Created   string   `json:"created"`
	DependsOn []string `json:"dependsOn"`
}

type CreateComponentInput

type CreateComponentInput struct {
	Name      string   `json:"name"`
	Type      string   `json:"type"`
	Spec      string   `json:"spec"`
	DependsOn []string `json:"dependsOn"`
}

type CreateComponentOutput

type CreateComponentOutput struct {
	ID    string `json:"id"`
	JobID string `json:"jobId"`
}

type CreateProjectInput

type CreateProjectInput struct {
	Root        string  `json:"root"`
	TemplateURL *string `json:"templateUrl"`
}

type CreateProjectOutput

type CreateProjectOutput struct {
	WorkspaceID string `json:"workspaceId"`
}

type CreateWorkspaceInput

type CreateWorkspaceInput struct {
	Root string `json:"root"`
}

type CreateWorkspaceOutput

type CreateWorkspaceOutput struct {
	ID string `json:"id"`
}

type DeleteComponentsInput

type DeleteComponentsInput struct {
	Refs []string `json:"refs"`
}

type DeleteComponentsOutput

type DeleteComponentsOutput struct {
	JobID string `json:"jobId"`
}

type DependenciesInput

type DependenciesInput struct {
	Spec string `json:"spec"`
}

type DependenciesOutput

type DependenciesOutput struct {

	// Refs of components that this component depends on.
	Components []string `json:"components"`
}

type DescribeComponentsInput

type DescribeComponentsInput struct {

	// If non-empty, filters components to supplied refs.
	Refs []string `json:"refs"`
	// If non-empty, filters components to supplied types.
	Types []string `json:"types"`
	// If true, includes all components that the filtered components depend on.
	IncludeDependencies bool `json:"includeDependencies"`
	// If true, includes all components that depend on the filtered components.
	IncludeDependents bool `json:"includeDependents"`
}

type DescribeComponentsOutput

type DescribeComponentsOutput struct {
	Components []ComponentDescription `json:"components"`
}

type DescribeEnvironmentInput

type DescribeEnvironmentInput struct {
}

type DescribeEnvironmentOutput

type DescribeEnvironmentOutput struct {
	Variables map[string]VariableDescription `json:"variables"`
}

type DescribeInput

type DescribeInput struct {
}

type DescribeNetworksInput

type DescribeNetworksInput struct {
}

type DescribeNetworksOutput

type DescribeNetworksOutput struct {
	Networks []NetworkDescription `json:"networks"`
}

type DescribeOutput

type DescribeOutput struct {
	Description WorkspaceDescription `json:"description"`
}

type DescribeProcessesInput

type DescribeProcessesInput struct {
}

type DescribeProcessesOutput

type DescribeProcessesOutput struct {
	Processes []ProcessDescription `json:"processes"`
}

type DescribeTasksInput

type DescribeTasksInput struct {

	// If supplied, filters tasks by job.
	JobIDs []string `json:"jobIds"`
}

type DescribeTasksOutput

type DescribeTasksOutput struct {
	Tasks []TaskDescription `json:"tasks"`
}

type DescribeTemplatesInput

type DescribeTemplatesInput struct {
}

type DescribeTemplatesOutput

type DescribeTemplatesOutput struct {
	Templates []TemplateDescription `json:"templates"`
}

type DescribeVaultsInput

type DescribeVaultsInput struct {
}

type DescribeVaultsOutput

type DescribeVaultsOutput struct {
	Vaults []VaultDescription `json:"vaults"`
}

type DescribeVolumesInput

type DescribeVolumesInput struct {
}

type DescribeVolumesOutput

type DescribeVolumesOutput struct {
	Volumes []VolumeDescription `json:"volumes"`
}

type DescribeWorkspacesInput

type DescribeWorkspacesInput struct {
}

type DescribeWorkspacesOutput

type DescribeWorkspacesOutput struct {
	Workspaces []WorkspaceDescription `json:"workspaces"`
}

type DestroyInput

type DestroyInput struct {
}

type DestroyOutput

type DestroyOutput struct {
	JobID string `json:"jobId"`
}

type DirectoryEntry

type DirectoryEntry struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	IsDirectory bool   `json:"isDirectory"`
}

type DisposeComponentsInput

type DisposeComponentsInput struct {
	Refs []string `json:"refs"`
}

type DisposeComponentsOutput

type DisposeComponentsOutput struct {
	JobID string `json:"jobId"`
}

type DisposeInput

type DisposeInput struct {
}

type DisposeOutput

type DisposeOutput struct {
}

type Event

type Event struct {
	ID        string            `json:"id"`
	Stream    string            `json:"stream"`
	Timestamp string            `json:"timestamp"`
	Message   string            `json:"message"`
	Tags      map[string]string `json:"tags"`
}

type ExitInput

type ExitInput struct {
}

type ExitOutput

type ExitOutput struct {
}

type ExportProcfileInput

type ExportProcfileInput struct {
}

type ExportProcfileOutput

type ExportProcfileOutput struct {
	Procfile string `json:"procfile"`
}

type GetComponentStateInput

type GetComponentStateInput struct {
	Ref string `json:"ref"`
}

type GetComponentStateOutput

type GetComponentStateOutput struct {
	State string `json:"state"`
}

type GetEsvUserInput

type GetEsvUserInput struct {
	VaultURL string `json:"vaultUrl"`
}

type GetEsvUserOutput

type GetEsvUserOutput struct {
	Email string `json:"email"`
}

type GetEventsInput

type GetEventsInput struct {
	Streams   []string `json:"streams"`
	Cursor    *string  `json:"cursor"`
	FilterStr string   `json:"filterStr"`
	Prev      *int     `json:"prev"`
	Next      *int     `json:"next"`
}

type GetEventsOutput

type GetEventsOutput struct {
	Items      []Event `json:"items"`
	PrevCursor string  `json:"prevCursor"`
	NextCursor string  `json:"nextCursor"`
}

type GetUserHomeDirInput

type GetUserHomeDirInput struct {
}

type GetUserHomeDirOutput

type GetUserHomeDirOutput struct {
	Path string `json:"path"`
}

type GetVersionInput

type GetVersionInput struct {
}

type GetVersionOutput

type GetVersionOutput struct {
	Installed string  `json:"installed"`
	Latest    *string `json:"latest"`
	Current   bool    `json:"current"`
	Managed   bool    `json:"managed"`
}

type InitializeInput

type InitializeInput struct {
	Spec string `json:"spec"`
}

type InitializeOutput

type InitializeOutput struct {
}

type Kernel

type Kernel interface {
	AuthEsv(context.Context, *AuthEsvInput) (*AuthEsvOutput, error)
	SaveEsvRefreshToken(context.Context, *SaveEsvRefreshTokenInput) (*SaveEsvRefreshTokenOutput, error)
	UnauthEsv(context.Context, *UnauthEsvInput) (*UnauthEsvOutput, error)
	GetEsvUser(context.Context, *GetEsvUserInput) (*GetEsvUserOutput, error)
	CreateProject(context.Context, *CreateProjectInput) (*CreateProjectOutput, error)
	DescribeTemplates(context.Context, *DescribeTemplatesInput) (*DescribeTemplatesOutput, error)
	CreateWorkspace(context.Context, *CreateWorkspaceInput) (*CreateWorkspaceOutput, error)
	DescribeWorkspaces(context.Context, *DescribeWorkspacesInput) (*DescribeWorkspacesOutput, error)
	ResolveWorkspace(context.Context, *ResolveWorkspaceInput) (*ResolveWorkspaceOutput, error)
	// Debug method to test what happens when the service panics.
	Panic(context.Context, *PanicInput) (*PanicOutput, error)
	// Retrieves the installed and current version of exo.
	GetVersion(context.Context, *GetVersionInput) (*GetVersionOutput, error)
	// Upgrades exo to the latest version.
	Upgrade(context.Context, *UpgradeInput) (*UpgradeOutput, error)
	// Checks whether server is up.
	Ping(context.Context, *PingInput) (*PingOutput, error)
	// Gracefully shutdown the exo daemon.
	Exit(context.Context, *ExitInput) (*ExitOutput, error)
	DescribeTasks(context.Context, *DescribeTasksInput) (*DescribeTasksOutput, error)
	GetUserHomeDir(context.Context, *GetUserHomeDirInput) (*GetUserHomeDirOutput, error)
	ReadDir(context.Context, *ReadDirInput) (*ReadDirOutput, error)
}

type NetworkDescription

type NetworkDescription struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type PanicInput

type PanicInput struct {
	Message string `json:"message"`
}

type PanicOutput

type PanicOutput struct {
}

type PingInput

type PingInput struct {
}

type PingOutput

type PingOutput struct {
}

type ProcessDescription

type ProcessDescription struct {
	ID                  string            `json:"id"`
	Provider            string            `json:"provider"`
	Name                string            `json:"name"`
	Spec                string            `json:"spec"`
	Running             bool              `json:"running"`
	EnvVars             map[string]string `json:"envVars"`
	CPUPercent          *float64          `json:"cpuPercent"`
	CreateTime          *int64            `json:"createTime"`
	ResidentMemory      *uint64           `json:"residentMemory"`
	Ports               []uint32          `json:"ports"`
	ChildrenExecutables []string          `json:"childrenExecutables"`
}

type Provider

type Provider interface {
	Lifecycle
	Process // TODO: Do not require all providers to implement.
}

type ReadDirInput

type ReadDirInput struct {
	Path string `json:"path"`
}

type ReadDirOutput

type ReadDirOutput struct {
	Directory DirectoryEntry   `json:"directory"`
	Parent    *DirectoryEntry  `json:"parent"`
	Entries   []DirectoryEntry `json:"entries"`
}

type ReadFileInput

type ReadFileInput struct {

	// Relative to the workspace directory. May not traverse higher in the filesystem.
	Path string `json:"path"`
}

type ReadFileOutput

type ReadFileOutput struct {
	Content string `json:"content"`
}

type RefreshComponentsInput

type RefreshComponentsInput struct {

	// If omitted, refreshes all components.
	Refs []string `json:"refs"`
}

type RefreshComponentsOutput

type RefreshComponentsOutput struct {
	JobID string `json:"jobId"`
}

type RefreshInput

type RefreshInput struct {
	Spec string `json:"spec"`
}

type RefreshOutput

type RefreshOutput struct {
}

type RemoveVaultInput

type RemoveVaultInput struct {
	URL string `json:"url"`
}

type RemoveVaultOutput

type RemoveVaultOutput struct {
}

type RenameComponentInput

type RenameComponentInput struct {

	// Refers to the component to be renamed.
	Ref string `json:"ref"`
	// New name to give to the component.
	Name string `json:"name"`
}

type RenameComponentOutput

type RenameComponentOutput struct {
}

type RenderDependenciesInput

type RenderDependenciesInput struct {
}

type RenderDependenciesOutput

type RenderDependenciesOutput struct {
	Dot string `json:"dot"`
}

type ResolveInput

type ResolveInput struct {
	Refs []string `json:"refs"`
}

type ResolveManifestInput

type ResolveManifestInput struct {
	Format string `json:"format"`
}

type ResolveManifestOutput

type ResolveManifestOutput struct {
	Path string `json:"path"`
}

type ResolveOutput

type ResolveOutput struct {
	IDs []*string `json:"ids"`
}

type ResolveWorkspaceInput

type ResolveWorkspaceInput struct {
	Ref string `json:"ref"`
}

type ResolveWorkspaceOutput

type ResolveWorkspaceOutput struct {
	ID *string `json:"id"`
}

type RestartComponentsInput

type RestartComponentsInput struct {
	Refs           []string `json:"refs"`
	TimeoutSeconds *uint    `json:"timeoutSeconds"`
}

type RestartComponentsOutput

type RestartComponentsOutput struct {
	JobID string `json:"jobId"`
}

type RestartInput

type RestartInput struct {
	TimeoutSeconds *uint `json:"timeoutSeconds"`
}

type RestartOutput

type RestartOutput struct {
	JobID string `json:"jobId"`
}

type SaveEsvRefreshTokenInput

type SaveEsvRefreshTokenInput struct {
	RefreshToken string `json:"refreshToken"`
}

type SaveEsvRefreshTokenOutput

type SaveEsvRefreshTokenOutput struct {
}

type SetComponentStateInput

type SetComponentStateInput struct {
	Ref   string `json:"ref"`
	State string `json:"state"`
}

type SetComponentStateOutput

type SetComponentStateOutput struct {
}

type SignalComponentsInput

type SignalComponentsInput struct {
	Refs   []string `json:"refs"`
	Signal string   `json:"signal"`
}

type SignalComponentsOutput

type SignalComponentsOutput struct {
	JobID string `json:"jobId"`
}

type SignalInput

type SignalInput struct {
	Signal string `json:"signal"`
}

type SignalOutput

type SignalOutput struct {
	JobID string `json:"jobId"`
}

type StartComponentsInput

type StartComponentsInput struct {
	Refs []string `json:"refs"`
}

type StartComponentsOutput

type StartComponentsOutput struct {
	JobID string `json:"jobId"`
}

type StartInput

type StartInput struct {
}

type StartOutput

type StartOutput struct {
	JobID string `json:"jobId"`
}

type StopComponentsInput

type StopComponentsInput struct {
	Refs           []string `json:"refs"`
	TimeoutSeconds *uint    `json:"timeoutSeconds"`
}

type StopComponentsOutput

type StopComponentsOutput struct {
	JobID string `json:"jobId"`
}

type StopInput

type StopInput struct {
	TimeoutSeconds *uint `json:"timeoutSeconds"`
}

type StopOutput

type StopOutput struct {
	JobID string `json:"jobId"`
}

type StreamDescription

type StreamDescription struct {
	Name        string  `json:"name"`
	LastEventAt *string `json:"lastEventAt"`
}

type TaskDescription

type TaskDescription struct {
	ID string `json:"id"`
	// ID of root task in this tree.
	JobID    string  `json:"jobId"`
	ParentID *string `json:"parentId"`
	Name     string  `json:"name"`
	Status   string  `json:"status"`
	// Most recent log message. Single-line of text.
	Message  string        `json:"message"`
	Created  string        `json:"created"`
	Updated  string        `json:"updated"`
	Started  *string       `json:"started"`
	Finished *string       `json:"finished"`
	Progress *TaskProgress `json:"progress"`
}

type TaskProgress

type TaskProgress struct {
	Current int `json:"current"`
	Total   int `json:"total"`
}

type TemplateDescription

type TemplateDescription struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	IconGlyph   string `json:"iconGlyph"`
	URL         string `json:"url"`
}

type UnauthEsvInput

type UnauthEsvInput struct {
}

type UnauthEsvOutput

type UnauthEsvOutput struct {
}

type UpdateComponentInput

type UpdateComponentInput struct {

	// Refers to the component to be updated.
	Ref string `json:"ref"`
	// If provided, renames the component.
	Name      string   `json:"name"`
	Spec      string   `json:"spec"`
	DependsOn []string `json:"dependsOn"`
}

type UpdateComponentOutput

type UpdateComponentOutput struct {
	JobID string `json:"jobId"`
}

type UpgradeInput

type UpgradeInput struct {
}

type UpgradeOutput

type UpgradeOutput struct {
}

type VariableDescription

type VariableDescription struct {
	Value  string `json:"value"`
	Source string `json:"source"`
}

type VaultDescription

type VaultDescription struct {
	Name      string `json:"name"`
	URL       string `json:"url"`
	Connected bool   `json:"connected"`
	NeedsAuth bool   `json:"needsAuth"`
}

type VolumeDescription

type VolumeDescription struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Workspace

type Workspace interface {
	Process
	Builder
	DescribeVaults(context.Context, *DescribeVaultsInput) (*DescribeVaultsOutput, error)
	AddVault(context.Context, *AddVaultInput) (*AddVaultOutput, error)
	RemoveVault(context.Context, *RemoveVaultInput) (*RemoveVaultOutput, error)
	// Describes this workspace.
	Describe(context.Context, *DescribeInput) (*DescribeOutput, error)
	// Dispose resources, then delete the record of it.
	Destroy(context.Context, *DestroyInput) (*DestroyOutput, error)
	// Performs creates, updates, refreshes, disposes, as needed.
	Apply(context.Context, *ApplyInput) (*ApplyOutput, error)
	// Resolves a reference in to an ID.
	Resolve(context.Context, *ResolveInput) (*ResolveOutput, error)
	ResolveManifest(context.Context, *ResolveManifestInput) (*ResolveManifestOutput, error)
	// Returns component descriptions.
	DescribeComponents(context.Context, *DescribeComponentsInput) (*DescribeComponentsOutput, error)
	// Creates a component and triggers an initialize lifecycle event.
	CreateComponent(context.Context, *CreateComponentInput) (*CreateComponentOutput, error)
	// Replaces the spec on a component and triggers an update lifecycle event.
	UpdateComponent(context.Context, *UpdateComponentInput) (*UpdateComponentOutput, error)
	RenameComponent(context.Context, *RenameComponentInput) (*RenameComponentOutput, error)
	// Asycnhronously refreshes component state.
	RefreshComponents(context.Context, *RefreshComponentsInput) (*RefreshComponentsOutput, error)
	// Asynchronously runs dispose lifecycle methods on each component.
	DisposeComponents(context.Context, *DisposeComponentsInput) (*DisposeComponentsOutput, error)
	// Asynchronously disposes components, then removes them from the manifest.
	DeleteComponents(context.Context, *DeleteComponentsInput) (*DeleteComponentsOutput, error)
	GetComponentState(context.Context, *GetComponentStateInput) (*GetComponentStateOutput, error)
	SetComponentState(context.Context, *SetComponentStateInput) (*SetComponentStateOutput, error)
	// Returns pages of events for some set of streams. If `cursor` is specified, standard pagination behavior is used. Otherwise the cursor is assumed to represent the current tail of the stream.
	GetEvents(context.Context, *GetEventsInput) (*GetEventsOutput, error)
	StartComponents(context.Context, *StartComponentsInput) (*StartComponentsOutput, error)
	StopComponents(context.Context, *StopComponentsInput) (*StopComponentsOutput, error)
	SignalComponents(context.Context, *SignalComponentsInput) (*SignalComponentsOutput, error)
	RestartComponents(context.Context, *RestartComponentsInput) (*RestartComponentsOutput, error)
	DescribeProcesses(context.Context, *DescribeProcessesInput) (*DescribeProcessesOutput, error)
	DescribeVolumes(context.Context, *DescribeVolumesInput) (*DescribeVolumesOutput, error)
	DescribeNetworks(context.Context, *DescribeNetworksInput) (*DescribeNetworksOutput, error)
	ExportProcfile(context.Context, *ExportProcfileInput) (*ExportProcfileOutput, error)
	// Read a file from disk.
	ReadFile(context.Context, *ReadFileInput) (*ReadFileOutput, error)
	// Writes a file to disk.
	WriteFile(context.Context, *WriteFileInput) (*WriteFileOutput, error)
	BuildComponents(context.Context, *BuildComponentsInput) (*BuildComponentsOutput, error)
	DescribeEnvironment(context.Context, *DescribeEnvironmentInput) (*DescribeEnvironmentOutput, error)
	RenderDependencies(context.Context, *RenderDependenciesInput) (*RenderDependenciesOutput, error)
}

type WorkspaceDescription

type WorkspaceDescription struct {
	ID          string `json:"id"`
	Root        string `json:"root"`
	DisplayName string `json:"displayName"`
}

type WriteFileInput

type WriteFileInput struct {

	// Relative to the workspace directory. May not traverse higher in the filesystem.
	Path    string `json:"path"`
	Mode    *int   `json:"mode"`
	Content string `json:"content"`
}

type WriteFileOutput

type WriteFileOutput struct {
}

Jump to

Keyboard shortcuts

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