Documentation
¶
Overview ¶
Package describe runs aicoded describe: a compact summary of what each app of a workspace serves, calls and may reach, from its permission list, of its surface, of what is out of date in it, of its local setup in dev.yaml, never a value of it, and, in JSON, of its pages and layouts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Name string `json:"name"`
Dir string `json:"dir"`
Class string `json:"class,omitempty"`
Owner string `json:"owner,omitempty"`
Audience *Audience `json:"audience,omitempty"`
Pages []Page `json:"pages,omitempty"`
Serves []Serve `json:"serves,omitempty"`
Calls map[string][]string `json:"calls,omitempty"`
SQLDB bool `json:"sqldb,omitempty"`
Stores []string `json:"stores,omitempty"`
Connectors []string `json:"connectors,omitempty"`
Email *Email `json:"email,omitempty"`
Egress []string `json:"egress,omitempty"`
Bindings []Binding `json:"bindings,omitempty"`
Schedule []Job `json:"schedule,omitempty"`
Settings []string `json:"settings,omitempty"`
Secrets []string `json:"secrets,omitempty"` // names only
Modules []string `json:"modules,omitempty"`
Size string `json:"size,omitempty"`
Resources string `json:"resources,omitempty"`
TTL string `json:"ttl,omitempty"`
// Surface is the app's size. Its writes come from lint, and are left out, with a warning, when
// lint cannot read the app or its precheck stops it.
Surface surface.Surface `json:"surface"`
Warnings []string `json:"warnings,omitempty"`
// Findings are the generated files that are out of date, E-CHK-001, and the errors of generate.
Findings []problem.Problem `json:"findings,omitempty"`
// Routes lists every page and layout, sorted by path, from the templates as aicoded generate
// reads them. The text summary leaves them out.
Routes []generate.RouteInfo `json:"routes,omitempty"`
// Local is the app's local setup for aicoded dev.
Local Local `json:"local"`
}
App describes one app.
type Audience ¶
type Audience struct {
Internal []string `json:"internal,omitempty"`
External []string `json:"external,omitempty"`
}
Audience is who may use the app: people of the company and outside people.
type Binding ¶
type Binding struct {
Host string `json:"host"`
Secret string `json:"secret"`
Header string `json:"header"`
Prefix string `json:"prefix,omitempty"`
}
Binding is a key the runner adds to every request to an outside service: the secret's name, never its value, the header it goes in and the text before it.
type Local ¶ added in v0.12.0
type Local struct {
// Workspace is the folder described when dev.yaml holds settings for it, as aicoded dev run
// there uses them, or "" when it holds none, and aicoded dev runs with its defaults.
Workspace string `json:"workspace"`
// Note says what aicoded dev does when dev.yaml holds no settings for the folder, and names
// the nearest folder above it that dev.yaml holds settings for.
Note string `json:"note,omitempty"`
// Problem is why aicoded dev cannot read dev.yaml, or nil.
Problem *problem.Problem `json:"problem,omitempty"`
// MySQL is whether dev.yaml names a local MySQL server, for an app that declares sqldb.
MySQL *bool `json:"mysql,omitempty"`
// Personas are the personas dev.yaml names. When it names none, aicoded dev signs in as
// all-roles, with every role the apps ask for, or as no-roles.
Personas []Persona `json:"personas,omitempty"`
// Settings and Secrets are those the permission list declares, each with whether dev.yaml
// sets a local value for it.
Settings []Value `json:"settings,omitempty"`
Secrets []Value `json:"secrets,omitempty"`
}
Local is what dev.yaml sets for an app in aicoded dev: names, and whether each value is set, never a value.
type Page ¶
type Page struct {
Path string `json:"path"`
Require []string `json:"require"`
Guard bool `json:"guard,omitempty"`
Calls []string `json:"calls,omitempty"`
}
Page is one page of the access section: its path, the role rules a viewer must meet, whether a Guard on its path decides who sees each record, whether everyone the rules admit may see every record, and the page calls it makes.
type Persona ¶ added in v0.12.0
type Persona struct {
Name string `json:"name"`
Roles []string `json:"roles,omitempty"`
Groups []string `json:"groups,omitempty"`
}
Persona is a test viewer of aicoded dev: its name, roles and groups.
type Serve ¶
type Serve struct {
Name string `json:"name"`
Callers []string `json:"callers"`
Require []string `json:"require,omitempty"`
Apps bool `json:"apps,omitempty"`
}
Serve is one function the app serves other apps.