schema

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package schema exposes the embedded schema catalog through application ports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service exposes schema assets from the immutable contract catalog. A writer is optional because listing and showing schemas never need a durable effect.

func NewService

func NewService(catalog ports.ContractCatalog, writer ports.SecureFileWriter) *Service

NewService constructs a schema service over the supplied inward ports.

func (*Service) Export

func (service *Service) Export(ctx context.Context, id ports.AssetID, root ports.AnchoredRoot, destination ports.SafeRelativePath) (ports.SecureWriteReceipt, error)

Export streams one schema's exact embedded bytes through the secure writer. It returns a receipt only when the writer accepted bytes bound to the requested destination and catalog integrity metadata.

func (*Service) List

func (service *Service) List(ctx context.Context) ([]ports.AssetMetadata, error)

List returns schema metadata only, ordered by stable AssetID.

func (*Service) Show

func (service *Service) Show(ctx context.Context, id ports.AssetID) (ports.AssetMetadata, []byte, error)

Show returns a schema's immutable metadata and a caller-owned exact copy of its authoritative embedded bytes.

Jump to

Keyboard shortcuts

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