Documentation
¶
Overview ¶
Package appcatalog describes the applications a SystemForge deployment hosts, for the product switcher every application's shell shows: each application's name, where it opens, its icon and its place in the list.
An application's identifier is the one its authz.AppVocabulary declares and its entitlements and the orgs claim's apps map use, so registering an application is one step: roles and scopes in the vocabulary, how it is shown here. SystemAuth publishes the catalog at WellKnownPath; it is public, since names and launch URLs are not secret. Which entries a person sees is decided per organization by the orgs claim: an application they hold no role in is not shown.
Index ¶
Constants ¶
const DefaultCacheTTL = 5 * time.Minute
DefaultCacheTTL is how long Remote reuses a fetched catalog.
const WellKnownPath = "/.well-known/sf-apps"
WellKnownPath is where SystemAuth publishes the catalog.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// ID is the application identifier, as its vocabulary declares it.
ID string `json:"id"`
// Name is what the switcher shows.
Name string `json:"name"`
// URL is where the application opens: an absolute https URL (http only
// for a loopback host).
URL string `json:"url"`
// Icon is an optional icon URL or short icon name the shells know.
Icon string `json:"icon,omitempty"`
// Order places the application in the list, lowest first; ties are
// ordered by name.
Order int `json:"order,omitempty"`
}
App is one application in the catalog.
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog is a validated, ordered set of applications.
func New ¶
New validates apps and returns their catalog. Identifiers must be unique short lower-case names (the vocabulary rule), names non-empty, and URLs absolute https (http only for a loopback host) without credentials.
type Document ¶
type Document struct {
Apps []App `json:"apps"`
}
Document is the published catalog.
type Source ¶
Source supplies the catalog to a relying party.