Documentation
¶
Overview ¶
Package schema exposes the embedded schema catalog through application ports.
Index ¶
- type Service
- func (service *Service) Export(ctx context.Context, id ports.AssetID, root ports.AnchoredRoot, ...) (ports.SecureWriteReceipt, error)
- func (service *Service) List(ctx context.Context) ([]ports.AssetMetadata, error)
- func (service *Service) Show(ctx context.Context, id ports.AssetID) (ports.AssetMetadata, []byte, error)
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.
Click to show internal directories.
Click to hide internal directories.