Documentation
¶
Index ¶
- Constants
- Variables
- func ValidateDiscoveryPreferences(value DiscoveryPreferences) error
- type ArtifactData
- type ArtifactSupport
- type AttachmentData
- type CatalogView
- type CollectionData
- type DirectoryRoot
- type DiscoveryPreferences
- type DiscoveryProfile
- type DiscoveryProfiles
- type DiscoveryRoot
- type LoadPlan
- type LoadPlanItem
- type Mode
- type Resource
- type ResourceGroup
- type Workspace
- type WorkspaceRef
Constants ¶
const ( RolePrimary collection.AttachmentRole = "primary" RoleLibrary collection.AttachmentRole = "library" RoleAttachedPackage collection.AttachmentRole = "attached-package" RoleOverlay collection.AttachmentRole = "overlay" )
const ( DiagnosticCodeArtifactInvalid = "workspace.artifact.invalid" DiagnosticCodeContextInvalidContent = "workspace.context.invalid-content" DiagnosticCodeContextInvalidUTF8 = "workspace.context.invalid-utf8" DiagnosticCodeArtifactSchemaUnsupported = "workspace.artifact.schema-unsupported" DiagnosticCodeArtifactKindMismatch = "workspace.artifact.kind-mismatch" DiagnosticCodeProjectionInvalid = "workspace.projection.invalid" DiagnosticCodeArtifactUnresolved = "workspace.artifact.unresolved" DiagnosticCodeRuntimeDenied = "workspace.runtime.denied" DiagnosticCodeCatalogStale = "workspace.catalog.stale" DiagnosticCodeCatalogDecoderStale = "workspace.catalog.decoder-stale" DiagnosticCodeCatalogPlanStale = "workspace.catalog.plan-stale" )
Variables ¶
var ( ErrInvalidWorkspace = errors.New("workspace: invalid") ErrNotWorkspace = errors.New("workspace: collection is not a Workspace") ErrPrimarySourceImmutable = errors.New("workspace: primary source is immutable") ErrReferenceUnresolved = errors.New("workspace: reference unresolved") ErrWorkspaceDefinitionInvalid = errors.New("workspace: descriptor invalid") )
Functions ¶
func ValidateDiscoveryPreferences ¶
func ValidateDiscoveryPreferences( value DiscoveryPreferences, ) error
Types ¶
type ArtifactData ¶
type ArtifactData struct {
RuntimeDisabled bool `json:"runtimeDisabled,omitempty"`
}
type ArtifactSupport ¶
type ArtifactSupport struct {
Kind artifact.ArtifactKind
SchemaID schema.SchemaID
SchemaVersion string
DecoderID basespec.DecoderID
}
func (ArtifactSupport) Validate ¶
func (s ArtifactSupport) Validate() error
type AttachmentData ¶
type CatalogView ¶
type CatalogView struct {
Workspace Workspace `json:"-"`
Catalog catalog.Snapshot `json:"-"`
Resources []Resource `json:"-"`
Unrecorded []catalog.Occurrence `json:"-"`
UnresolvedArtifacts []artifact.Artifact `json:"-"`
Groups []ResourceGroup `json:"-"`
CatalogCurrent bool `json:"-"`
FreshnessDiagnostics []diagnostic.Diagnostic `json:"-"`
}
type CollectionData ¶
type CollectionData struct {
Discovery DiscoveryPreferences `json:"discovery"`
}
CollectionData contains persisted Workspace preferences only. Workspace mode and primary Source are derived from current collection attachments. Provider behavior revision is Artifact Store capability input and is intentionally not persisted in Collection local data.
type DirectoryRoot ¶
type DirectoryRoot = providerapi.DirectoryRoot
DirectoryRoot is the generic source-discovery scope type.
type DiscoveryPreferences ¶
type DiscoveryPreferences struct {
AdditionalLocators []basespec.Locator `json:"additionalLocators,omitempty"`
AdditionalRoots []DiscoveryRoot `json:"additionalRoots,omitempty"`
IncludeReadme bool `json:"includeReadme,omitempty"`
}
type DiscoveryProfile ¶
type DiscoveryProfile struct {
ExplicitLocators []basespec.Locator
ReadmeLocator basespec.Locator
DirectoryRoots []DirectoryRoot
}
DiscoveryProfile defines discovery rules for one attachment class.
Artifact adapters contribute their own conventions through this type.
type DiscoveryProfiles ¶
type DiscoveryProfiles struct {
Primary DiscoveryProfile
Attached DiscoveryProfile
}
type DiscoveryRoot ¶
type DiscoveryRoot = providerapi.DirectoryRoot
DiscoveryRoot is retained as the Workspace preference name.
type LoadPlan ¶
type LoadPlan struct {
Workspace WorkspaceRef `json:"-"`
WorkspaceState Workspace `json:"-"`
CatalogRevision uint64 `json:"-"`
Items []LoadPlanItem `json:"-"`
Diagnostics []diagnostic.Diagnostic `json:"-"`
}
type LoadPlanItem ¶
type LoadPlanItem struct {
Resolved resource.ResolvedArtifact `json:"-"`
ArtifactData ArtifactData `json:"-"`
ArtifactDataValid bool `json:"-"`
ProjectionValid bool `json:"-"`
}
LoadPlanItem contains privileged materialized source state. It must be projected into an explicit adapter response before crossing an API boundary.
type Resource ¶
type Resource struct {
Artifact artifact.Artifact `json:"-"`
ArtifactData ArtifactData `json:"-"`
ArtifactDataValid bool `json:"-"`
Definition definition.Definition `json:"-"`
Occurrence *catalog.Occurrence `json:"-"`
Source source.Summary `json:"-"`
CatalogCurrent bool `json:"-"`
// ProjectionValid covers Workspace-owned local Artifact projection only.
// Artifact-family semantic projection occurs at the runtime-use boundary.
ProjectionValid bool `json:"-"`
Diagnostics []diagnostic.Diagnostic `json:"-"`
// Resolved is populated only when Artifact Store has verified a current,
// available Artifact resource chain for this Catalog resource.
Resolved *resource.ResolvedArtifact `json:"-"`
}
type ResourceGroup ¶
type ResourceGroup struct {
Kind artifact.ArtifactKind `json:"-"`
Resources []Resource `json:"-"`
Unrecorded []catalog.Occurrence `json:"-"`
}
type Workspace ¶
type Workspace struct {
Collection collection.Collection `json:"-"`
Data CollectionData `json:"-"`
Mode Mode `json:"-"`
PrimarySourceID source.SourceID `json:"-"`
Attachments []collection.Attachment `json:"-"`
Sources []source.Summary `json:"-"`
}
Workspace is an internal privileged aggregate. API packages project it into explicit view models and must not serialize collection local data, attachment local data, or Source configuration.
type WorkspaceRef ¶
type WorkspaceRef = collection.CollectionRef