cmdtracker

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTrackerCmd

func BuildTrackerCmd(loader func(string) ([]tracker.Instance, error)) *cobra.Command

BuildTrackerCmd creates the "tracker" command with list and find subcommands.

func PrintFindJSON

func PrintFindJSON(w io.Writer, entry FindResultEntry) error

PrintFindJSON prints a find result as JSON.

func PrintFindTable

func PrintFindTable(out io.Writer, entry FindResultEntry) error

PrintFindTable prints a find result as a table.

func PrintTrackerJSON

func PrintTrackerJSON(w io.Writer, entries []TrackerEntry) error

PrintTrackerJSON prints tracker entries as JSON.

func PrintTrackerTable

func PrintTrackerTable(out io.Writer, entries []TrackerEntry) error

PrintTrackerTable prints tracker entries as a table.

func RunTrackerFind

func RunTrackerFind(ctx context.Context, out io.Writer, dir, key string, table bool, loader func(string) ([]tracker.Instance, error)) error

RunTrackerFind finds which tracker owns a key.

func RunTrackerFindWithInstances

func RunTrackerFindWithInstances(ctx context.Context, out io.Writer, key string, instances []tracker.Instance, table bool) error

RunTrackerFindWithInstances finds which tracker owns a key given pre-loaded instances.

func RunTrackerList

func RunTrackerList(out io.Writer, dir string, table bool, loader func(string) ([]tracker.Instance, error)) error

RunTrackerList lists configured tracker instances.

Types

type FindResultEntry

type FindResultEntry struct {
	Provider string `json:"provider"`
	Project  string `json:"project"`
	Key      string `json:"key"`
}

FindResultEntry is the JSON output structure for tracker find.

type TrackerEntry

type TrackerEntry struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	URL         string `json:"url"`
	User        string `json:"user"`
	Description string `json:"description"`
}

TrackerEntry is the JSON output structure for a single tracker instance.

Jump to

Keyboard shortcuts

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