workspace

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootKind                 artifactstoreSpec.RootKind       = "workspace.root"
	RootDataSchemaID         artifactstoreSpec.SchemaID       = "workspace.root-data.v1"
	AttachmentDataSchemaID   artifactstoreSpec.SchemaID       = "workspace.attachment-data.v1"
	CollectionKind           artifactstoreSpec.CollectionKind = "workspace.collection"
	CollectionDataSchemaID   artifactstoreSpec.SchemaID       = "workspace.collection-data.v1"
	NativeFrontendID         artifactstoreSpec.FrontendID     = "workspace.native"
	CapabilityProfileVersion                                  = "1"
)
View Source
const (
	KindWorkspaceDefinition artifactstoreSpec.ArtifactKind = "workspace.definition"
	KindAgentDefinition     artifactstoreSpec.ArtifactKind = "agent.definition"
	KindSkillDefinition     artifactstoreSpec.ArtifactKind = "skill.definition"
	KindModelDefinition     artifactstoreSpec.ArtifactKind = "model.definition"
	KindMCPServerDefinition artifactstoreSpec.ArtifactKind = "mcp.server.definition"
	KindToolDefinition      artifactstoreSpec.ArtifactKind = "tool.definition"
	KindInstructionDocument artifactstoreSpec.ArtifactKind = "instruction.document"
	KindContextDocument     artifactstoreSpec.ArtifactKind = "context.document"
)
View Source
const (
	RolePrimary         artifactstoreSpec.AttachmentRole = "primary"
	RoleAttachedPackage artifactstoreSpec.AttachmentRole = "attached-package"
	RoleBuiltIn         artifactstoreSpec.AttachmentRole = "built-in"
	RoleAppLibrary      artifactstoreSpec.AttachmentRole = "app-library"
	RoleOverlay         artifactstoreSpec.AttachmentRole = "overlay"
)

Variables

View Source
var (
	ErrInvalidWorkspace               = errors.New("workspace: invalid workspace")
	ErrNotWorkspace                   = errors.New("workspace: root is not a workspace")
	ErrAmbiguousWorkspaceDefinition   = errors.New("workspace: multiple workspace definitions")
	ErrWorkspaceDefinitionUnavailable = errors.New("workspace: workspace definition unavailable")
	ErrProjectionUnavailable          = errors.New("workspace: projector unavailable")
	ErrReferenceUnresolved            = errors.New("workspace: reference unresolved")
)

Functions

func DecodeYAML

func DecodeYAML(ctx context.Context, content []byte) (json.RawMessage, error)

DecodeYAML converts the restricted Workspace YAML profile to canonical JSON. Workspace source files are data documents, not executable YAML. Anchors, aliases, tags, and multiple documents are rejected before YAML decoding.

Types

type AgentDefinitionDocument

type AgentDefinitionDocument struct {
	StartingText                     string                              `json:"startingText,omitempty"`
	StartingIncludeModelSystemPrompt *bool                               `json:"startingIncludeModelSystemPrompt,omitempty"`
	StartingModel                    *artifactstoreSpec.ArtifactSelector `json:"startingModel,omitempty"`
	StartingTools                    []AgentToolSelection                `json:"startingTools,omitempty"`
	StartingSkills                   []AgentSkillSelection               `json:"startingSkills,omitempty"`
	StartingMCPServers               []AgentMCPServerSelection           `json:"startingMCPServers,omitempty"`
}

AgentDefinitionDocument is the portable agent data stored in a canonical definition. References use selectors and therefore contain no app-local bundle, item, source, or record IDs.

type AgentMCPServerSelection

type AgentMCPServerSelection struct {
	Selector                  artifactstoreSpec.ArtifactSelector `json:"selector"`
	ToolExposure              mcpSpec.MCPToolExposure            `json:"toolExposure,omitempty"`
	SelectedTools             []AgentMCPToolSelection            `json:"selectedTools,omitempty"`
	IncludeServerInstructions bool                               `json:"includeServerInstructions,omitempty"`
}

type AgentMCPToolSelection

type AgentMCPToolSelection struct {
	ToolName       string                    `json:"toolName"`
	ApprovalRule   *mcpSpec.MCPApprovalRule  `json:"approvalRule,omitempty"`
	ExecutionMode  *mcpSpec.MCPExecutionMode `json:"executionMode,omitempty"`
	AppResourceURI string                    `json:"appResourceURI,omitempty"`
	Visibility     []string                  `json:"visibility,omitempty"`
}

type AgentSkillSelection

type AgentSkillSelection struct {
	Selector          artifactstoreSpec.ArtifactSelector `json:"selector"`
	PreLoadAsActive   bool                               `json:"preLoadAsActive,omitempty"`
	UseAsInstructions bool                               `json:"useAsInstructions,omitempty"`
}

type AgentToolSelection

type AgentToolSelection struct {
	Selector        artifactstoreSpec.ArtifactSelector `json:"selector"`
	ToolChoicePatch *toolSpec.ToolChoicePatch          `json:"toolChoicePatch,omitempty"`
}

type ArtifactStore

type ArtifactStore interface {
	RegisterArtifactFrontend(frontend artifactstoreSpec.ArtifactFrontend) error
	RegisterRootKindHook(hook artifactstoreSpec.RootKindHook) error
	RegisterCollectionKindHook(hook artifactstoreSpec.CollectionKindHook) error
	RegisterDependencyResolver(resolver artifactstoreSpec.DependencyResolver) error
	RegisterArtifactVersionMatcher(matcher artifactstoreSpec.ArtifactVersionMatcher) error

	CreateRoot(ctx context.Context, draft artifactstoreSpec.RootDraft) (artifactstoreSpec.ArtifactRoot, error)
	GetRoot(ctx context.Context, rootID artifactstoreSpec.RootID) (artifactstoreSpec.ArtifactRoot, error)
	ListRoots(ctx context.Context, includeSoftDeleted bool) ([]artifactstoreSpec.ArtifactRoot, error)
	DeleteRoot(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		expectedModifiedAt time.Time,
	) (artifactstoreSpec.ArtifactRoot, error)
	UpdateRoot(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		update artifactstore.RootUpdate,
	) (artifactstoreSpec.ArtifactRoot, error)

	CreateSource(ctx context.Context, draft artifactstoreSpec.SourceDraft) (artifactstoreSpec.ArtifactSource, error)
	GetSource(ctx context.Context, sourceID artifactstoreSpec.SourceID) (artifactstoreSpec.ArtifactSource, error)
	DeleteSource(
		ctx context.Context,
		sourceID artifactstoreSpec.SourceID,
		expectedModifiedAt time.Time,
	) error
	AttachSource(
		ctx context.Context,
		draft artifactstore.RootSourceAttachmentDraft,
	) (artifactstoreSpec.RootSourceAttachment, error)
	GetRootSourceAttachment(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		sourceID artifactstoreSpec.SourceID,
	) (artifactstoreSpec.RootSourceAttachment, error)
	ListRootSources(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
	) ([]artifactstoreSpec.RootSourceAttachment, error)
	DetachSource(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		sourceID artifactstoreSpec.SourceID,
		expectedModifiedAt time.Time,
	) error

	ScanRoot(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		plan artifactstoreSpec.ScanPlan,
	) (artifactstoreSpec.ScanResult, error)
	GetRootCatalogGeneration(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
	) (artifactstoreSpec.RootCatalogGeneration, error)
	ListCatalogResourcesForRoot(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
	) ([]artifactstoreSpec.CatalogResource, error)
	GetDefinitionByDigest(
		ctx context.Context,
		digest artifactstoreSpec.Digest,
	) (artifactstoreSpec.CanonicalDefinition, error)

	EnsureBaseCollection(
		ctx context.Context,
		draft artifactstoreSpec.CollectionDraft,
	) (artifactstoreSpec.ArtifactCollection, error)
	ListCollections(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		includeSoftDeleted bool,
	) ([]artifactstoreSpec.ArtifactCollection, error)
	ListRecords(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
	) ([]artifactstoreSpec.ArtifactRecord, error)
	GetRecord(
		ctx context.Context,
		recordID artifactstoreSpec.RecordID,
	) (artifactstoreSpec.ArtifactRecord, error)
	SyncRecords(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		policy artifactstoreSpec.RecordSyncPolicy,
	) (artifactstoreSpec.RecordSyncResult, error)
	FindCandidates(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		selector artifactstoreSpec.ArtifactSelector,
	) ([]artifactstoreSpec.DependencyCandidate, error)
	ExplainDependencyResolution(
		ctx context.Context,
		rootID artifactstoreSpec.RootID,
		selector artifactstoreSpec.ArtifactSelector,
	) (artifactstoreSpec.DependencyExplanation, error)
	BuildDependencyGraph(
		ctx context.Context,
		recordID artifactstoreSpec.RecordID,
	) (artifactstoreSpec.DependencyGraph, error)

	ExportRecord(
		ctx context.Context,
		recordID artifactstoreSpec.RecordID,
	) (artifactstoreSpec.ExportedRecord, error)
	ImportDefinition(
		ctx context.Context,
		request artifactstoreSpec.ImportDefinitionRequest,
	) (artifactstoreSpec.ArtifactRecord, error)
	CaptureRecord(
		ctx context.Context,
		request artifactstoreSpec.CaptureRecordRequest,
	) (artifactstoreSpec.ArtifactRecord, error)
	ForkRecord(
		ctx context.Context,
		request artifactstoreSpec.ForkRecordRequest,
	) (artifactstoreSpec.ArtifactRecord, error)
}

type AttachSourceRequest

type AttachSourceRequest struct {
	RootID              artifactstoreSpec.RootID         `json:"rootID"`
	SourceID            artifactstoreSpec.SourceID       `json:"sourceID"`
	Role                artifactstoreSpec.AttachmentRole `json:"role"`
	Priority            int                              `json:"priority"`
	AttachmentData      AttachmentData                   `json:"attachmentData"`
	DiscoverImmediately bool                             `json:"discoverImmediately"`
}

AttachSourceRequest attaches an existing Artifact Store source to a Workspace. Source lifecycle remains owned by Artifact Store.

type AttachedPackagePreferences

type AttachedPackagePreferences struct {
	DiscoverRecursively bool `json:"discoverRecursively,omitempty"`
}

type AttachedSource

type AttachedSource struct {
	Attachment artifactstoreSpec.RootSourceAttachment `json:"attachment"`
	Source     artifactstoreSpec.ArtifactSource       `json:"source"`
}

type AttachmentData

type AttachmentData struct {
	Recursive     *bool `json:"recursive,omitempty"`
	Authoritative *bool `json:"authoritative,omitempty"`
}

type Catalog

type Catalog struct {
	Workspace         Workspace
	Generation        artifactstoreSpec.RootCatalogGeneration
	Resources         []CatalogResource
	Unrecorded        []artifactstoreSpec.CatalogResource
	UnresolvedRecords []artifactstoreSpec.ArtifactRecord
}

type CatalogResource

type CatalogResource struct {
	Record         artifactstoreSpec.ArtifactRecord
	Definition     artifactstoreSpec.CanonicalDefinition
	Collection     *artifactstoreSpec.ArtifactCollection
	Occurrence     *artifactstoreSpec.CatalogResource
	CatalogCurrent bool
}

type CollectionData

type CollectionData struct {
	ArtifactKind artifactstoreSpec.ArtifactKind `json:"artifactKind"`
}

type DeleteWorkspaceRequest

type DeleteWorkspaceRequest struct {
	RootID             artifactstoreSpec.RootID `json:"rootID"`
	ExpectedModifiedAt time.Time                `json:"expectedModifiedAt"`
}

type DiscoveryInput

type DiscoveryInput struct {
	Workspace             Workspace
	DefinitionPreferences DiscoveryPreferences
	FrontendIDs           []artifactstoreSpec.FrontendID
}

type DiscoveryPlanner

type DiscoveryPlanner interface {
	BuildBootstrapPlan(ctx context.Context, input DiscoveryInput) (artifactstoreSpec.ScanPlan, error)
	BuildExpandedPlan(ctx context.Context, input DiscoveryInput) (artifactstoreSpec.ScanPlan, error)
}

type DiscoveryPreferences

type DiscoveryPreferences struct {
	AdditionalLocators []artifactstoreSpec.SourceLocator `json:"additionalLocators,omitempty"`
	AdditionalRoots    []DiscoveryRoot                   `json:"additionalRoots,omitempty"`
	IncludeReadme      bool                              `json:"includeReadme,omitempty"`
}

type DiscoveryRoot

type DiscoveryRoot struct {
	Root            artifactstoreSpec.SourceLocator `json:"root"`
	Recursive       bool                            `json:"recursive"`
	IncludePatterns []string                        `json:"includePatterns,omitempty"`
}

type DisplayPreferences

type DisplayPreferences struct {
	DefaultCategory string `json:"defaultCategory,omitempty"`
}

type EmbeddedSourceAttachmentRequest

type EmbeddedSourceAttachmentRequest struct {
	RootID              artifactstoreSpec.RootID         `json:"rootID"`
	DisplayName         string                           `json:"displayName"`
	ProviderKey         string                           `json:"providerKey"`
	RootLocator         artifactstoreSpec.SourceLocator  `json:"rootLocator"`
	Role                artifactstoreSpec.AttachmentRole `json:"role"`
	Priority            int                              `json:"priority"`
	AttachmentData      AttachmentData                   `json:"attachmentData"`
	DiscoverImmediately bool                             `json:"discoverImmediately"`
}

EmbeddedSourceAttachmentRequest creates an app-local embedded filesystem source and attaches it to an existing Workspace.

type EmptyWorkspaceRequest

type EmptyWorkspaceRequest struct {
	DisplayName         string               `json:"displayName"`
	Description         string               `json:"description,omitempty"`
	TrustReference      string               `json:"trustReference,omitempty"`
	Discovery           DiscoveryPreferences `json:"discovery"`
	DiscoverImmediately bool                 `json:"discoverImmediately"`
}

type FilesystemSelectionRequest

type FilesystemSelectionRequest struct {
	DisplayName         string               `json:"displayName"`
	Description         string               `json:"description,omitempty"`
	RootPath            string               `json:"rootPath"`
	FollowSymlinks      bool                 `json:"followSymlinks"`
	ManagedByApp        bool                 `json:"managedByApp"`
	TrustReference      string               `json:"trustReference,omitempty"`
	Discovery           DiscoveryPreferences `json:"discovery"`
	DiscoverImmediately bool                 `json:"discoverImmediately"`
}

type KindDescriptor

type KindDescriptor struct {
	Kind                  artifactstoreSpec.ArtifactKind
	DefinitionSchemaID    artifactstoreSpec.SchemaID
	CollectionSlug        artifactstoreSpec.CollectionSlug
	CollectionDisplayName string
}

type LoadPlan

type LoadPlan struct {
	RootID      artifactstoreSpec.RootID
	Generation  artifactstoreSpec.RootCatalogGeneration
	Items       []LoadPlanItem
	Diagnostics []artifactstoreSpec.Diagnostic
}

type LoadPlanItem

type LoadPlanItem struct {
	Resource   CatalogResource
	Projection Projection
	Dependency artifactstoreSpec.DependencyGraph
}

type Option

type Option func(*serviceConfig) error

func WithArtifactFrontend

func WithArtifactFrontend(frontend artifactstoreSpec.ArtifactFrontend) Option

func WithArtifactVersionMatcher

func WithArtifactVersionMatcher(matcher artifactstoreSpec.ArtifactVersionMatcher) Option

func WithDiscoveryPlanner

func WithDiscoveryPlanner(planner DiscoveryPlanner) Option

func WithKindDescriptor

func WithKindDescriptor(descriptor KindDescriptor) Option

func WithResourceProjector

func WithResourceProjector(projector ResourceProjector) Option

func WithYAMLDecoder

func WithYAMLDecoder(decoder YAMLDecoder) Option

type ProjectedAgent

type ProjectedAgent struct {
	BundleID           bundleitemutils.BundleID
	Preset             assistantpresetSpec.AssistantPreset
	StartingModel      *artifactstoreSpec.ArtifactSelector
	StartingTools      []AgentToolSelection
	StartingSkills     []AgentSkillSelection
	StartingMCPServers []AgentMCPServerSelection
	Definition         json.RawMessage
}

type ProjectedDocument

type ProjectedDocument struct {
	RecordID         artifactstoreSpec.RecordID
	DefinitionDigest artifactstoreSpec.Digest
	Kind             artifactstoreSpec.ArtifactKind
	SourceID         artifactstoreSpec.SourceID
	Locator          artifactstoreSpec.SourceLocator
	Name             string
	Markdown         string
}

type ProjectedMCPServer

type ProjectedMCPServer struct {
	Server mcpSpec.MCPServerConfig
}

type ProjectedSkill

type ProjectedSkill struct {
	RecordID         artifactstoreSpec.RecordID
	DefinitionDigest artifactstoreSpec.Digest
	SourceID         artifactstoreSpec.SourceID
	Locator          artifactstoreSpec.SourceLocator
	Name             string
	DisplayName      string
	Description      string
	Insert           string
	Arguments        []ProjectedSkillArgument
	Markdown         string
	Frontmatter      json.RawMessage
	Assets           []artifactstoreSpec.AssetManifestEntry

	Skill    skillSpec.Skill
	SkillRef skillSpec.SkillRef
}

type ProjectedSkillArgument

type ProjectedSkillArgument struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Default     string `json:"default,omitempty"`
}

type ProjectedStructuredDefinition

type ProjectedStructuredDefinition struct {
	RecordID         artifactstoreSpec.RecordID
	DefinitionDigest artifactstoreSpec.Digest
	Kind             artifactstoreSpec.ArtifactKind
	SourceID         artifactstoreSpec.SourceID
	Locator          artifactstoreSpec.SourceLocator
	Name             string
	Definition       json.RawMessage
}

type ProjectedTool

type ProjectedTool struct {
	Tool    toolSpec.Tool
	ToolRef toolSpec.ToolRef
}

type ProjectedWorkspaceDefinition

type ProjectedWorkspaceDefinition struct {
	RecordID   artifactstoreSpec.RecordID
	Discovery  DiscoveryPreferences
	Definition json.RawMessage
}

type Projection

type Projection struct {
	Kind        artifactstoreSpec.ArtifactKind
	RecordID    artifactstoreSpec.RecordID
	Value       any
	Diagnostics []artifactstoreSpec.Diagnostic
}

type ProjectionDiagnosticError

type ProjectionDiagnosticError struct {
	Kind        artifactstoreSpec.ArtifactKind
	Diagnostics []artifactstoreSpec.Diagnostic
}

func (*ProjectionDiagnosticError) Error

func (e *ProjectionDiagnosticError) Error() string

func (*ProjectionDiagnosticError) Unwrap

func (e *ProjectionDiagnosticError) Unwrap() error

type ProjectionInput

type ProjectionInput struct {
	Workspace  Workspace
	Record     artifactstoreSpec.ArtifactRecord
	Definition artifactstoreSpec.CanonicalDefinition
}

type Reference

type Reference struct {
	RecordID *artifactstoreSpec.RecordID
	Selector *artifactstoreSpec.ArtifactSelector
}

type RefreshResult

type RefreshResult struct {
	Workspace   Workspace
	Bootstrap   *artifactstoreSpec.ScanResult
	Published   artifactstoreSpec.ScanResult
	Sync        artifactstoreSpec.RecordSyncResult
	Catalog     Catalog
	Diagnostics []artifactstoreSpec.Diagnostic
}

type ResourceProjector

type ResourceProjector interface {
	Kind() artifactstoreSpec.ArtifactKind
	Project(ctx context.Context, input ProjectionInput) (any, []artifactstoreSpec.Diagnostic)
}

type RootData

type RootData struct {
	Mode                       RootMode                   `json:"mode"`
	PrimarySourceID            artifactstoreSpec.SourceID `json:"primarySourceID,omitempty"`
	RootTrustReference         string                     `json:"rootTrustReference,omitempty"`
	DiscoveryPreferences       DiscoveryPreferences       `json:"discoveryPreferences"`
	AttachedPackagePreferences AttachedPackagePreferences `json:"attachedPackagePreferences"`
	CapabilityProfileVersion   string                     `json:"capabilityProfileVersion"`
	DisplayPreferences         DisplayPreferences         `json:"displayPreferences"`
}

type RootMode

type RootMode string
const (
	RootModeEmpty      RootMode = "empty"
	RootModeFilesystem RootMode = "filesystem"
)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(store ArtifactStore, options ...Option) (*Service, error)

func (*Service) AttachSource

func (s *Service) AttachSource(
	ctx context.Context,
	request AttachSourceRequest,
) (Workspace, error)

AttachSource attaches an existing Artifact Store source to a Workspace. Source configuration and source-kind validation remain Artifact Store responsibilities. Workspace owns only the typed attachment role and data.

func (*Service) CaptureRecord

func (s *Service) CaptureRecord(
	ctx context.Context,
	request artifactstoreSpec.CaptureRecordRequest,
	discoverImmediately bool,
) (TransferResult, error)

func (*Service) Catalog

func (s *Service) Catalog(
	ctx context.Context,
	rootID artifactstoreSpec.RootID,
) (Catalog, error)

func (*Service) ComposeLoadPlan

func (s *Service) ComposeLoadPlan(
	ctx context.Context,
	rootID artifactstoreSpec.RootID,
	recordIDs []artifactstoreSpec.RecordID,
) (LoadPlan, error)

func (*Service) CreateEmptyWorkspace

func (s *Service) CreateEmptyWorkspace(
	ctx context.Context,
	request EmptyWorkspaceRequest,
) (Workspace, error)

func (*Service) DeleteWorkspace

func (s *Service) DeleteWorkspace(
	ctx context.Context,
	request DeleteWorkspaceRequest,
) (artifactstoreSpec.ArtifactRoot, error)

func (*Service) DetachSource

func (s *Service) DetachSource(
	ctx context.Context,
	rootID artifactstoreSpec.RootID,
	sourceID artifactstoreSpec.SourceID,
	discoverImmediately bool,
) (Workspace, error)

DetachSource removes only the Workspace root/source relationship. It does not delete the source registration, source catalog, records, or definitions.

func (*Service) ExportRecord

func (*Service) ForkRecord

func (s *Service) ForkRecord(
	ctx context.Context,
	request artifactstoreSpec.ForkRecordRequest,
	discoverImmediately bool,
) (TransferResult, error)

func (*Service) GetWorkspace

func (s *Service) GetWorkspace(
	ctx context.Context,
	rootID artifactstoreSpec.RootID,
) (Workspace, error)

func (*Service) ImportDefinition

func (s *Service) ImportDefinition(
	ctx context.Context,
	request artifactstoreSpec.ImportDefinitionRequest,
	discoverImmediately bool,
) (TransferResult, error)

func (*Service) ListWorkspaces

func (s *Service) ListWorkspaces(ctx context.Context) ([]Workspace, error)

func (*Service) MountEmbeddedSource

func (s *Service) MountEmbeddedSource(
	ctx context.Context,
	request EmbeddedSourceAttachmentRequest,
) (Workspace, error)

MountEmbeddedSource creates an embedded-fs-directory source and attaches it to a Workspace. The provider must already have been registered while the Artifact Store composition was being built.

func (*Service) Project

func (s *Service) Project(
	ctx context.Context,
	recordID artifactstoreSpec.RecordID,
) (Projection, error)

func (*Service) Refresh

func (s *Service) Refresh(
	ctx context.Context,
	rootID artifactstoreSpec.RootID,
) (RefreshResult, error)

func (*Service) ResolveReference

func (s *Service) ResolveReference(
	ctx context.Context,
	rootID artifactstoreSpec.RootID,
	reference Reference,
) (CatalogResource, error)

func (*Service) SelectFilesystemRoot

func (s *Service) SelectFilesystemRoot(
	ctx context.Context,
	request FilesystemSelectionRequest,
) (Workspace, error)

func (*Service) UpdateWorkspace

func (s *Service) UpdateWorkspace(
	ctx context.Context,
	request UpdateWorkspaceRequest,
) (Workspace, error)

type TransferResult

type TransferResult struct {
	Record  artifactstoreSpec.ArtifactRecord
	Refresh *RefreshResult
}

type UpdateWorkspaceRequest

type UpdateWorkspaceRequest struct {
	RootID              artifactstoreSpec.RootID    `json:"rootID"`
	ExpectedModifiedAt  time.Time                   `json:"expectedModifiedAt"`
	DisplayName         *string                     `json:"displayName,omitempty"`
	Description         *string                     `json:"description,omitempty"`
	Enabled             *bool                       `json:"enabled,omitempty"`
	TrustReference      *string                     `json:"trustReference,omitempty"`
	Discovery           *DiscoveryPreferences       `json:"discovery,omitempty"`
	AttachedPackages    *AttachedPackagePreferences `json:"attachedPackages,omitempty"`
	DisplayPreferences  *DisplayPreferences         `json:"displayPreferences,omitempty"`
	DiscoverImmediately bool                        `json:"discoverImmediately"`
}

type Workspace

type Workspace struct {
	Root        artifactstoreSpec.ArtifactRoot           `json:"root"`
	Data        RootData                                 `json:"data"`
	Attachments []artifactstoreSpec.RootSourceAttachment `json:"attachments"`
	Sources     []AttachedSource                         `json:"sources"`
}

type YAMLDecoder

type YAMLDecoder func(ctx context.Context, content []byte) (json.RawMessage, error)

Jump to

Keyboard shortcuts

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