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, 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"`
}
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 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 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.