Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeYAML(ctx context.Context, content []byte) (json.RawMessage, error)
- type AgentDefinitionDocument
- type AgentMCPServerSelection
- type AgentMCPToolSelection
- type AgentSkillSelection
- type AgentToolSelection
- type ArtifactStore
- type AttachSourceRequest
- type AttachedPackagePreferences
- type AttachedSource
- type AttachmentData
- type Catalog
- type CatalogResource
- type CollectionData
- type DeleteWorkspaceRequest
- type DiscoveryInput
- type DiscoveryPlanner
- type DiscoveryPreferences
- type DiscoveryRoot
- type DisplayPreferences
- type EmbeddedSourceAttachmentRequest
- type EmptyWorkspaceRequest
- type FilesystemSelectionRequest
- type KindDescriptor
- type LoadPlan
- type LoadPlanItem
- type Option
- func WithArtifactFrontend(frontend artifactstoreSpec.ArtifactFrontend) Option
- func WithArtifactVersionMatcher(matcher artifactstoreSpec.ArtifactVersionMatcher) Option
- func WithDiscoveryPlanner(planner DiscoveryPlanner) Option
- func WithKindDescriptor(descriptor KindDescriptor) Option
- func WithResourceProjector(projector ResourceProjector) Option
- func WithYAMLDecoder(decoder YAMLDecoder) Option
- type ProjectedAgent
- type ProjectedDocument
- type ProjectedMCPServer
- type ProjectedModel
- type ProjectedSkill
- type ProjectedSkillArgument
- type ProjectedStructuredDefinition
- type ProjectedTool
- type ProjectedWorkspaceDefinition
- type Projection
- type ProjectionDiagnosticError
- type ProjectionInput
- type Reference
- type RefreshResult
- type ResourceProjector
- type RootData
- type RootMode
- type Service
- func (s *Service) AttachSource(ctx context.Context, request AttachSourceRequest) (Workspace, error)
- func (s *Service) CaptureRecord(ctx context.Context, request artifactstoreSpec.CaptureRecordRequest, ...) (TransferResult, error)
- func (s *Service) Catalog(ctx context.Context, rootID artifactstoreSpec.RootID) (Catalog, error)
- func (s *Service) ComposeLoadPlan(ctx context.Context, rootID artifactstoreSpec.RootID, ...) (LoadPlan, error)
- func (s *Service) CreateEmptyWorkspace(ctx context.Context, request EmptyWorkspaceRequest) (Workspace, error)
- func (s *Service) DeleteWorkspace(ctx context.Context, request DeleteWorkspaceRequest) (artifactstoreSpec.ArtifactRoot, error)
- func (s *Service) DetachSource(ctx context.Context, rootID artifactstoreSpec.RootID, ...) (Workspace, error)
- func (s *Service) ExportRecord(ctx context.Context, recordID artifactstoreSpec.RecordID) (artifactstoreSpec.ExportedRecord, error)
- func (s *Service) ForkRecord(ctx context.Context, request artifactstoreSpec.ForkRecordRequest, ...) (TransferResult, error)
- func (s *Service) GetWorkspace(ctx context.Context, rootID artifactstoreSpec.RootID) (Workspace, error)
- func (s *Service) ImportDefinition(ctx context.Context, request artifactstoreSpec.ImportDefinitionRequest, ...) (TransferResult, error)
- func (s *Service) ListWorkspaces(ctx context.Context) ([]Workspace, error)
- func (s *Service) MountEmbeddedSource(ctx context.Context, request EmbeddedSourceAttachmentRequest) (Workspace, error)
- func (s *Service) Project(ctx context.Context, recordID artifactstoreSpec.RecordID) (Projection, error)
- func (s *Service) Refresh(ctx context.Context, rootID artifactstoreSpec.RootID) (RefreshResult, error)
- func (s *Service) ResolveReference(ctx context.Context, rootID artifactstoreSpec.RootID, reference Reference) (CatalogResource, error)
- func (s *Service) SelectFilesystemRoot(ctx context.Context, request FilesystemSelectionRequest) (Workspace, error)
- func (s *Service) UpdateWorkspace(ctx context.Context, request UpdateWorkspaceRequest) (Workspace, error)
- type TransferResult
- type UpdateWorkspaceRequest
- type Workspace
- type YAMLDecoder
Constants ¶
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" )
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" )
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 ¶
var ( ErrInvalidWorkspace = errors.New("workspace: invalid workspace") ErrNotWorkspace = errors.New("workspace: root is not a workspace") ErrAmbiguousWorkspaceDefinition = errors.New("workspace: multiple workspace definitions") ErrReferenceUnresolved = errors.New("workspace: reference unresolved") )
Functions ¶
func DecodeYAML ¶
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 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 ProjectedModel ¶
type ProjectedModel struct {
Provider modelpresetSpec.ProviderPreset
Model modelpresetSpec.ModelPreset
Ref modelpresetSpec.ModelPresetRef
}
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 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 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 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) ComposeLoadPlan ¶
func (s *Service) ComposeLoadPlan( ctx context.Context, rootID artifactstoreSpec.RootID, recordIDs []artifactstoreSpec.RecordID, ) (LoadPlan, error)
func (*Service) CreateEmptyWorkspace ¶
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 (s *Service) ExportRecord( ctx context.Context, recordID artifactstoreSpec.RecordID, ) (artifactstoreSpec.ExportedRecord, error)
func (*Service) ForkRecord ¶
func (s *Service) ForkRecord( ctx context.Context, request artifactstoreSpec.ForkRecordRequest, discoverImmediately bool, ) (TransferResult, error)
func (*Service) GetWorkspace ¶
func (*Service) ImportDefinition ¶
func (s *Service) ImportDefinition( ctx context.Context, request artifactstoreSpec.ImportDefinitionRequest, discoverImmediately bool, ) (TransferResult, error)
func (*Service) ListWorkspaces ¶
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 (*Service) UpdateWorkspace ¶
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"`
}