34 lines
3.7 KiB
Go
34 lines
3.7 KiB
Go
// Package extensions describes trusted system services, separate from MIME
|
|
// viewers/editors. The initial registry is built-in only: a manifest is not
|
|
// permission to load arbitrary Go, JavaScript, executables, or remote URLs.
|
|
package extensions
|
|
|
|
type Manifest struct {
|
|
ID string `json:"id"`
|
|
APIVersion int `json:"api_version"`
|
|
Version string `json:"version"`
|
|
Kind string `json:"kind"`
|
|
Scope string `json:"scope"`
|
|
NameKey string `json:"name_key"`
|
|
DescriptionKey string `json:"description_key"`
|
|
Capabilities []string `json:"capabilities"`
|
|
Events []string `json:"events"`
|
|
SettingsPanel string `json:"settings_panel"`
|
|
Builtin bool `json:"builtin"`
|
|
Enabled bool `json:"enabled"`
|
|
ResourceClass string `json:"resource_class,omitempty"`
|
|
}
|
|
|
|
func Catalog() []Manifest {
|
|
return []Manifest{
|
|
{ID: "organizer.contacts", APIVersion: 1, Version: "0.2.0", Kind: "contacts", Scope: "domain", NameKey: "contacts.title", DescriptionKey: "contacts.help", Capabilities: []string{"contacts.own.read", "contacts.own.write"}, Events: []string{}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
|
|
{ID: "organizer.tasks", APIVersion: 1, Version: "0.12.0", Kind: "tasks", Scope: "domain", NameKey: "tasks.title", DescriptionKey: "tasks.help", Capabilities: []string{"tasks.own.read", "tasks.own.write"}, Events: []string{"organizer.task.changed", "organizer.project.changed", "task.digest.deliver"}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+background+index"},
|
|
{ID: "organizer.calendar", APIVersion: 1, Version: "0.2.0", Kind: "calendar", Scope: "domain", NameKey: "calendar.title", DescriptionKey: "calendar.help", Capabilities: []string{"calendar.read", "calendar.write"}, Events: []string{}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
|
|
{ID: "content.diary", APIVersion: 1, Version: "0.1.0", Kind: "diary", Scope: "domain", NameKey: "periodical.diary", DescriptionKey: "periodical.diary_help", Capabilities: []string{"path.read", "path.write", "domain.extensions.manage"}, Events: []string{"periodical.registered", "periodical.removed"}, SettingsPanel: "diary", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
|
|
{ID: "content.blog", APIVersion: 1, Version: "0.1.0", Kind: "blog", Scope: "domain", NameKey: "periodical.blog", DescriptionKey: "periodical.blog_help", Capabilities: []string{"path.read", "path.write", "domain.extensions.manage"}, Events: []string{"periodical.registered", "periodical.removed"}, SettingsPanel: "blog", Builtin: true, Enabled: true, ResourceClass: "foreground+index"},
|
|
{ID: "system.resources", APIVersion: 1, Version: "1.0.0", Kind: "monitor", Scope: "instance", NameKey: "config.resource_status", DescriptionKey: "extension.resources", Capabilities: []string{"instance.metrics.read", "instance.metrics.store"}, Events: []string{"resource.sample"}, SettingsPanel: "resources", Builtin: true, Enabled: true, ResourceClass: "background+io"},
|
|
{ID: "navigation.bookmarks", APIVersion: 1, Version: "1.0.0", Kind: "navigation", Scope: "domain", NameKey: "home.bookmarks", DescriptionKey: "extension.bookmarks", Capabilities: []string{"domain.bookmarks.manage", "path.read"}, Events: []string{}, SettingsPanel: "bookmarks", Builtin: true, Enabled: true, ResourceClass: "foreground+read"},
|
|
{ID: "sharing.x", APIVersion: 1, Version: "1.0.0", Kind: "sharing", Scope: "domain", NameKey: "extension.share_x", DescriptionKey: "extension.share_x_help", Capabilities: []string{"page.share"}, Events: []string{"share.intent.created"}, SettingsPanel: "extensions", Builtin: true, Enabled: true, ResourceClass: "foreground+network"},
|
|
}
|
|
}
|