Help us shape the future of Go! Take the 2026 Go Developer Survey

deeplinks

package
v1.11.9 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreightContext

func FreightContext(freight *kargoapi.Freight) (map[string]any, error)

FreightContext converts a Freight resource into a template context map with a single "freight" key for use with EvaluateLinks.

func StageContext

func StageContext(stage *kargoapi.Stage) (map[string]any, error)

StageContext converts a Stage resource into a template context map with a single "stage" key for use with EvaluateLinks.

Types

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(
	links []kargoapi.DeepLink,
	ctx map[string]any,
) ([]ResolvedLink, []string)

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.

Jump to

Keyboard shortcuts

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