project

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package project models the GoForj project facts Atlas needs to guide agents.

Index

Constants

View Source
const DefaultAppName = "app"

DefaultAppName is the conventional name for the default GoForj app.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name     string   `json:"name"`
	Default  bool     `json:"default"`
	Runtimes []string `json:"runtimes,omitempty"`
}

App describes one runnable GoForj app boundary.

type Project

type Project struct {
	Root           string   `json:"root"`
	Name           string   `json:"name"`
	GoVersion      string   `json:"go_version"`
	GoForjVersion  string   `json:"goforj_version"`
	DocsRevision   string   `json:"docs_revision,omitempty"`
	Components     []string `json:"components,omitempty"`
	Apps           []App    `json:"apps,omitempty"`
	FrontendKit    string   `json:"frontend_kit,omitempty"`
	DatabaseDriver string   `json:"database_driver,omitempty"`
	QueueDriver    string   `json:"queue_driver,omitempty"`
}

Project contains the project facts Atlas needs without importing GoForj.

func Discover

func Discover(root string) (Project, error)

Discover inspects a GoForj project root and returns the facts Atlas needs.

func (Project) AppByName

func (p Project) AppByName(name string) (App, bool)

AppByName returns the selected app and whether it was found.

func (Project) DefaultApp

func (p Project) DefaultApp() App

DefaultApp returns the default app, synthesizing one when discovery has not provided explicit app metadata.

func (Project) WithDiscoveredDefaults

func (p Project) WithDiscoveredDefaults() Project

WithDiscoveredDefaults normalizes default app metadata and runtime lists.

Jump to

Keyboard shortcuts

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