Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FreightContext ¶
FreightContext converts a Freight resource into a template context map with a single "freight" key for use with EvaluateLinks.
Types ¶
type ResolvedLink ¶
type ResolvedLink struct {
Title string `json:"title"`
URL string `json:"url"`
Description string `json:"description,omitempty"`
} // @name ResolvedLink
ResolvedLink is a DeepLink whose URL template has been evaluated against a specific resource.
func EvaluateLinks ¶
EvaluateLinks evaluates each DeepLink against ctx, applying any If conditions and resolving URL templates. Links whose conditions evaluate to false are silently omitted. Non-fatal evaluation errors are collected and returned alongside resolved links so callers can surface them without aborting the whole response.
Click to show internal directories.
Click to hide internal directories.