api

package
v0.0.0-...-169d7d5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package api serves /api/v1/repos/{owner}/{repo}/pkgs/* — the silo-specific dependency index over its per-repo pkgs.sqlite3. Shapes match `git pkgs <cmd> --format=json` field-for-field so the CLI's output structs (re-exported by git-pkgs/index) can be reused as the response payloads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(st *store.Store, gst *gitstore.Store, ps *pkgs.Store) http.Handler

Handler builds the /api/v1 mux. Pass it the silo-shared gitstore, the in-process pkgs index, and the metadata store; the handler does its own JSON encoding and never touches the templates.

Types

type DiffEntry

type DiffEntry struct {
	Name            string `json:"name"`
	Ecosystem       string `json:"ecosystem,omitempty"`
	ManifestPath    string `json:"manifest_path"`
	DependencyType  string `json:"dependency_type,omitempty"`
	FromRequirement string `json:"from_requirement,omitempty"`
	ToRequirement   string `json:"to_requirement,omitempty"`
}

DiffEntry mirrors cmd/diff.go shape until the CLI is rewired onto the index package (SPEC-pkgs.md R9). One row per added/removed/updated dep.

type DiffResult

type DiffResult struct {
	Added    []DiffEntry `json:"added,omitempty"`
	Modified []DiffEntry `json:"modified,omitempty"`
	Removed  []DiffEntry `json:"removed,omitempty"`
}

DiffResult mirrors cmd/diff.go.

Jump to

Keyboard shortcuts

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