Documentation
¶
Index ¶
- func ContentURLAndFileConflictError() error
- func FilesystemPathToContentURL(path string) (string, error)
- func GeneratedPartFromPart(part interfaces.WorkContentPart) (factoryapi.WorkContentPart, bool)
- func GeneratedPtrFromParts(parts []interfaces.WorkContentPart) *factoryapi.WorkContent
- func NormalizeFileBackedContent(content []interfaces.WorkContentPart) ([]interfaces.WorkContentPart, error)
- func NormalizeFileBackedContentPart(part interfaces.WorkContentPart) (interfaces.WorkContentPart, error)
- func PartFromGenerated(part factoryapi.WorkContentPart) (interfaces.WorkContentPart, bool)
- func PartsFromGenerated(content *factoryapi.WorkContent) []interfaces.WorkContentPart
- func ResolveDispatchContentURL(workingDirectory, rawURL string) (string, error)
- func ValidateContentURL(rawURL string) error
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 ¶
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 ¶
ResolveDispatchContentURL resolves relative file:// URLs against workingDirectory so dispatch-time materialization can stat the correct host path.
func ValidateContentURL ¶
ValidateContentURL reports whether rawURL is a non-empty supported content URL.
Types ¶
This section is empty.