inspect

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package inspect runs an inspection command of an application and returns the JSON document that it printed.

The routes, the modules and the models of an application live in its own code, so the CLI and the MCP server both ask the application. The application answers before it loads the configuration and before it opens the database. See the SDD, S14 and S16.

Index

Constants

View Source
const (
	// Routes returns the routes of the application.
	Routes = "routes"
	// Modules returns the contribution of each module.
	Modules = "modules"
	// Schema returns the models that the modules describe.
	Schema = "schema"
	// Doctor proves the configuration, the database and the broker.
	Doctor = "doctor"
)

The inspection commands.

View Source
const Prefix = "avero:"

Prefix marks a command that the binary sends to the application.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// Stdout holds the document that the application printed.
	Stdout string
	// Stderr holds the faults that the application printed.
	Stderr string
	// Code is the exit code of the application.
	Code int
}

Result is the answer of one inspection.

func Run

func Run(ctx context.Context, dir, command string, asJSON bool) (*Result, error)

Run asks the application for one inspection. asJSON returns the document that the schema of the report accepts.

Jump to

Keyboard shortcuts

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