Align workspace docs with AX examples
Some checks are pending
CI / test (push) Waiting to run
CI / auto-fix (push) Waiting to run
CI / auto-merge (push) Waiting to run

This commit is contained in:
Virgil 2026-04-03 06:53:25 +00:00
parent c60c4d95f0
commit 2f186d20ef

View file

@ -12,11 +12,7 @@ import (
"dappco.re/go/core/io/sigil"
)
// Example: service, _ := workspace.New(workspace.Options{
// Example: KeyPairProvider: keyPairProvider,
// Example: RootPath: "/srv/workspaces",
// Example: Medium: io.NewMemoryMedium(),
// Example: })
// Example: service, _ := workspace.New(workspace.Options{KeyPairProvider: keyPairProvider})
type Workspace interface {
CreateWorkspace(identifier, passphrase string) (string, error)
SwitchWorkspace(workspaceID string) error
@ -52,16 +48,11 @@ type Options struct {
KeyPairProvider KeyPairProvider
RootPath string
Medium io.Medium
// Core is the optional Core instance. When set, the workspace service
// auto-registers as an IPC listener for workspace.create and workspace.switch events.
// Example: service, _ := workspace.New(workspace.Options{Core: core.New()})
Core *core.Core
}
// Example: service, _ := workspace.New(workspace.Options{
// Example: KeyPairProvider: keyPairProvider,
// Example: RootPath: "/srv/workspaces",
// Example: Medium: io.NewMemoryMedium(),
// Example: })
// Example: service, _ := workspace.New(workspace.Options{KeyPairProvider: keyPairProvider})
type Service struct {
keyPairProvider KeyPairProvider
activeWorkspaceID string