Clarify collection contracts and migration docs

This commit is contained in:
2026-10-17 06:35:56 +00:00
parent 29f104fbc0
commit dfd8da843e
16 changed files with 236 additions and 102 deletions

View File

@@ -20,8 +20,9 @@ type Namespaces struct {
// defaults on the new view and leaves the receiver unchanged; resource
// existence is checked when selected. An empty field clears that resource's
// scope. Captured configuration references, defaults, and global configuration
// inspection are not rewritten. Invalid namespace syntax or a nil engine
// returns an error matching ErrInvalidConfig.
// inspection are not rewritten. [Engine.ListNamespaces] and
// [Engine.ListCollections] remain global inventories. Invalid namespace syntax
// or a nil engine returns an error matching ErrInvalidConfig.
func (e *Engine) WithNamespaces(namespaces Namespaces) (*Engine, error) {
if e == nil || e.internal == nil {
return nil, fmt.Errorf("%w: engine is nil", ErrInvalidConfig)