atlas

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package atlas derives the Atlas JSON (docs/atlas.md): what each project is and how it moves, from the declared file and each checkout's own git history and manifest, with no host call.

Index

Constants

View Source
const DeclaredFile = "atlas.md"

DeclaredFile is ~/.f10/atlas.md, the user's own words about each project.

View Source
const Version = 1

Version is the spec version docs/atlas.md opens with.

Variables

This section is empty.

Functions

func Resolve

func Resolve(ctx context.Context, decl Declared, scope []Checkout, roots []string) (map[string]Entry, error)

Resolve checks the declared file's rules, links and aliases included so a broken file fails on its first read, and maps each checkout to its entry. roots (nil without F10_ROOTS) turns a key matching nothing into a typo.

Types

type Checkout

type Checkout struct {
	Main  string
	Name  string // the main checkout's basename
	ID    string // the normalised remote; unused when Local
	Local bool
}

A Checkout is one project in scope: its main checkout, never a linked worktree.

func (Checkout) NodeID

func (c Checkout) NodeID() string

NodeID is the id edges name the project by; a local one carries its name, never its path.

type Declared

type Declared struct {
	Projects map[string]Entry `yaml:"projects"`
}

Declared is the declared file's frontmatter; unknown keys are refused by the reader, as for every user file.

type Document

type Document struct {
	Version     int    `json:"version"`
	GeneratedAt string `json:"generated_at"`
	Nodes       []Node `json:"nodes"`
	Edges       []Edge `json:"edges"`
}

func Build

func Build(ctx context.Context, entries map[string]Entry, scope []Checkout, now time.Time) (Document, []string)

Build reads every public checkout and only the manifests of an aliased one, so no private history reaches the process. The warnings are anonymous nodes' failed reads, because their closed shape has no error field.

type Edge

type Edge struct {
	From     string `json:"from"`
	To       string `json:"to"`
	Kind     string `json:"kind"`
	Source   string `json:"source"`
	Manifest string `json:"manifest,omitempty"`
	Dev      bool   `json:"dev,omitempty"`
	Relation string `json:"relation,omitempty"`
}

An Edge joins two nodes, not both anonymous: a manifest dependency or a declared link.

type Entry

type Entry struct {
	Role    string `yaml:"role"`
	Status  string `yaml:"status"`
	Tagline string `yaml:"tagline"`
	Public  bool   `yaml:"public"`
	Alias   string `yaml:"alias"`
	Links   []Link `yaml:"links"`
}
type Link struct {
	To       string `yaml:"to"`
	Relation string `yaml:"relation"`
}

type Month

type Month struct {
	Month   string `json:"month"`
	Commits int    `json:"commits"`
}

type Node

type Node struct {
	ID              string  `json:"id"`
	Kind            string  `json:"kind"`
	Name            string  `json:"name,omitempty"`
	Alias           string  `json:"alias,omitempty"`
	Role            string  `json:"role,omitempty"`
	Status          string  `json:"status,omitempty"`
	Tagline         string  `json:"tagline,omitempty"`
	Language        string  `json:"language,omitempty"`
	FirstCommit     string  `json:"first_commit,omitempty"`
	LastCommit      string  `json:"last_commit,omitempty"`
	CommitsPerMonth []Month `json:"commits_per_month,omitempty"`
	LatestTag       *Tag    `json:"latest_tag,omitempty"`
	Error           string  `json:"error,omitempty"`
}

A Node is a public node, or an anonymous one carrying only ID, Kind and Alias; every optional field is absent rather than empty.

type Tag

type Tag struct {
	Name string `json:"name"`
	At   string `json:"at"`
}

Jump to

Keyboard shortcuts

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