{"modulePath":"github.com/wavetermdev/waveterm","version":"v0.14.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package wcore\n\nwave core application coordinator\n\n## Constants\n\n```go\nconst (\n\tLayoutActionDataType_Insert          = \"insert\"\n\tLayoutActionDataType_InsertAtIndex   = \"insertatindex\"\n\tLayoutActionDataType_Remove          = \"delete\"\n\tLayoutActionDataType_ClearTree       = \"clear\"\n\tLayoutActionDataType_Replace         = \"replace\"\n\tLayoutActionDataType_SplitHorizontal = \"splithorizontal\"\n\tLayoutActionDataType_SplitVertical   = \"splitvertical\"\n\tLayoutActionDataType_CleanupOrphaned = \"cleanuporphaned\"\n)\n```\n\n## Variables\n\n```go\nvar WorkspaceColors = [...]string{\n\t\"#58C142\",\n\t\"#00FFDB\",\n\t\"#429DFF\",\n\t\"#BF55EC\",\n\t\"#FF453A\",\n\t\"#FF9500\",\n\t\"#FFE900\",\n}\n```\n\n```go\nvar WorkspaceIcons = [...]string{\n\t\"custom@wave-logo-solid\",\n\t\"triangle\",\n\t\"star\",\n\t\"heart\",\n\t\"bolt\",\n\t\"solid@cloud\",\n\t\"moon\",\n\t\"layer-group\",\n\t\"rocket\",\n\t\"flask\",\n\t\"paperclip\",\n\t\"chart-line\",\n\t\"graduation-cap\",\n\t\"mug-hot\",\n}\n```\n\n## Functions\n\n```go\nfunc ApplyPortableLayout(ctx context.Context, tabId string, layout PortableLayout, recordTelemetry bool) error\n```\n\n```go\nfunc BootstrapStarterLayout(ctx context.Context) error\n```\n\n```go\nfunc CheckAndFixWindow(ctx context.Context, windowId string) *waveobj.Window\n```\n\n```go\nfunc CloseWindow(ctx context.Context, windowId string, fromElectron bool) error\n```\nCloseWindow closes a window and deletes its workspace if it is empty and not named. If fromElectron is true, it does not send an event to Electron.\n\n```go\nfunc CreateBlock(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, rtOpts *waveobj.RuntimeOpts) (rtnBlock *waveobj.Block, rtnErr error)\n```\n\n```go\nfunc CreateBlockWithTelemetry(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, rtOpts *waveobj.RuntimeOpts, recordTelemetry bool) (rtnBlock *waveobj.Block, rtnErr error)\n```\n\n```go\nfunc CreateClient(ctx context.Context) (*waveobj.Client, error)\n```\n\n```go\nfunc CreateSubBlock(ctx context.Context, blockId string, blockDef *waveobj.BlockDef) (*waveobj.Block, error)\n```\n\n```go\nfunc CreateTab(ctx context.Context, workspaceId string, tabName string, activateTab bool, isInitialLaunch bool) (string, error)\n```\nreturns tabid\n\n```go\nfunc CreateWindow(ctx context.Context, winSize *waveobj.WinSize, workspaceId string) (*waveobj.Window, error)\n```\n\n```go\nfunc CreateWorkspace(ctx context.Context, name string, icon string, color string, applyDefaults bool, isInitialLaunch bool) (*waveobj.Workspace, error)\n```\n\n```go\nfunc DeleteBlock(ctx context.Context, blockId string, recursive bool) error\n```\nMust delete all blocks individually first. Also deletes LayoutState. recursive: if true, will recursively close parent tab, window, workspace, if they are empty. Returns new active tab id, error.\n\n```go\nfunc DeleteTab(ctx context.Context, workspaceId string, tabId string, recursive bool) (string, error)\n```\nMust delete all blocks individually first. Also deletes LayoutState. recursive: if true, will recursively close parent window, workspace, if they are empty. Returns new active tab id, error.\n\n```go\nfunc DeleteWorkspace(ctx context.Context, workspaceId string, force bool) (bool, string, error)\n```\nIf force is true, it will delete even if workspace is named. If workspace is empty, it will be deleted, even if it is named. Returns true if workspace was deleted, false if it was not deleted.\n\n```go\nfunc EnsureInitialData() (bool, error)\n```\nEnsures that the initial data is present in the store, creates an initial window if needed\n\n```go\nfunc FocusWindow(ctx context.Context, windowId string) error\n```\n\n```go\nfunc GetAllBadges() []baseds.BadgeEvent\n```\nGetAllBadges returns a snapshot of all currently active badges.\n\n```go\nfunc GetClientData(ctx context.Context) (*waveobj.Client, error)\n```\n\n```go\nfunc GetLayoutIdForTab(ctx context.Context, tabId string) (string, error)\n```\n\n```go\nfunc GetWindow(ctx context.Context, windowId string) (*waveobj.Window, error)\n```\n\n```go\nfunc GetWorkspace(ctx context.Context, wsID string) (*waveobj.Workspace, error)\n```\n\n```go\nfunc GoSendNoTelemetryUpdate(telemetryEnabled bool)\n```\n\n```go\nfunc InitBadgeStore() error\n```\nInitBadgeStore subscribes to incoming badge events.\n\n```go\nfunc InitMainServer() error\n```\n\n```go\nfunc ListWorkspaces(ctx context.Context) (waveobj.WorkspaceList, error)\n```\n\n```go\nfunc QueueLayoutAction(ctx context.Context, layoutStateId string, actions ...waveobj.LayoutActionData) error\n```\n\n```go\nfunc QueueLayoutActionForTab(ctx context.Context, tabId string, actions ...waveobj.LayoutActionData) error\n```\n\n```go\nfunc ResolveBlockIdFromPrefix(ctx context.Context, tabId string, blockIdPrefix string) (string, error)\n```\n\n```go\nfunc SendActiveTabUpdate(ctx context.Context, workspaceId string, newActiveTabId string)\n```\n\n```go\nfunc SendWaveObjUpdate(oref waveobj.ORef)\n```\n\n```go\nfunc SetActiveTab(ctx context.Context, workspaceId string, tabId string) error\n```\n\n```go\nfunc SetColor(workspaceId string, color string) error\n```\n\n```go\nfunc SetIcon(workspaceId string, icon string) error\n```\n\n```go\nfunc SetName(workspaceId string, name string) error\n```\n\n```go\nfunc SwitchWorkspace(ctx context.Context, windowId string, workspaceId string) (*waveobj.Workspace, error)\n```\n\n```go\nfunc UpdateWorkspace(ctx context.Context, workspaceId string, name string, icon string, color string, applyDefaults bool) (*waveobj.Workspace, bool, error)\n```\nReturns updated workspace, whether it was updated, error.\n\n```go\nfunc UpdateWorkspaceTabIds(ctx context.Context, workspaceId string, tabIds []string) error\n```\n\n## Types\n\n```go\ntype BadgeStore struct {\n\t// contains filtered or unexported fields\n}\n```\nBadgeStore is an in-memory store for transient badges. Badges are not persisted and are cleared on restart. Values are stored by value (not pointer) to prevent external mutation.\n\n```go\ntype PortableLayout []struct {\n\tIndexArr []int             `json:\"indexarr\"`\n\tSize     *uint             `json:\"size,omitempty\"`\n\tBlockDef *waveobj.BlockDef `json:\"blockdef\"`\n\tFocused  bool              `json:\"focused\"`\n}\n```\n\n```go\nfunc GetNewTabLayout() PortableLayout\n```\n\n```go\nfunc GetStarterLayout() PortableLayout\n```\n\n","path":"github.com/wavetermdev/waveterm/pkg/wcore","name":"wcore","synopsis":"wave core application coordinator","isRedistributable":true}
