workcontent

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentURLAndFileConflictError

func ContentURLAndFileConflictError() error

ContentURLAndFileConflictError is returned when both url and file are set on one part.

func FilesystemPathToContentURL

func FilesystemPathToContentURL(path string) (string, error)

FilesystemPathToContentURL maps a host filesystem path to a canonical file:// content URL. Absolute paths use a proper file URL path; relative paths keep the legacy file://<relative> shape resolved later at dispatch-time materialization.

func GeneratedPartFromPart

func GeneratedPartFromPart(part interfaces.WorkContentPart) (factoryapi.WorkContentPart, bool)

GeneratedPartFromPart translates one canonical content part into the generated API shape.

func GeneratedPtrFromParts

func GeneratedPtrFromParts(parts []interfaces.WorkContentPart) *factoryapi.WorkContent

GeneratedPtrFromParts translates supported canonical work content parts into the generated API shape while preserving order.

func NormalizeFileBackedContent

func NormalizeFileBackedContent(content []interfaces.WorkContentPart) ([]interfaces.WorkContentPart, error)

NormalizeFileBackedContent applies NormalizeFileBackedContentPart to each part in order.

func NormalizeFileBackedContentPart

func NormalizeFileBackedContentPart(part interfaces.WorkContentPart) (interfaces.WorkContentPart, error)

NormalizeFileBackedContentPart maps legacy file-only parts to url and clears bare file so canonical content persists url only.

func PartFromGenerated

func PartFromGenerated(part factoryapi.WorkContentPart) (interfaces.WorkContentPart, bool)

PartFromGenerated translates one generated content part into the canonical backend-owned shape.

func PartsFromGenerated

func PartsFromGenerated(content *factoryapi.WorkContent) []interfaces.WorkContentPart

PartsFromGenerated translates supported generated work content parts into the backend-owned canonical shape while preserving order.

func ResolveDispatchContentURL

func ResolveDispatchContentURL(workingDirectory, rawURL string) (string, error)

ResolveDispatchContentURL resolves relative file:// URLs against workingDirectory so dispatch-time materialization can stat the correct host path.

func ValidateContentURL

func ValidateContentURL(rawURL string) error

ValidateContentURL reports whether rawURL is a non-empty supported content URL.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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