Documentation
¶
Index ¶
- func HandleSettingsForm(registry *contributor.ContributorRegistry, basePath string) forge.Handler
- func HandleSettingsIndex(aggregator *Aggregator, registry *contributor.ContributorRegistry, ...) forge.Handler
- func HandleSettingsSubmit(registry *contributor.ContributorRegistry, basePath string) forge.Handler
- type Aggregator
- type GroupedSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleSettingsForm ¶
func HandleSettingsForm(registry *contributor.ContributorRegistry, basePath string) forge.Handler
HandleSettingsForm returns a handler that renders a specific contributor's settings form. GET {base}/ext/:name/settings/:id
func HandleSettingsIndex ¶
func HandleSettingsIndex( aggregator *Aggregator, registry *contributor.ContributorRegistry, basePath string, ) forge.Handler
HandleSettingsIndex returns a handler that renders the settings overview page. This lists all available settings grouped by contributor.
func HandleSettingsSubmit ¶
func HandleSettingsSubmit(registry *contributor.ContributorRegistry, basePath string) forge.Handler
HandleSettingsSubmit returns a handler that processes a settings form submission. POST {base}/ext/:name/settings/:id
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator collects and organizes settings from all contributors.
func NewAggregator ¶
func NewAggregator(registry *contributor.ContributorRegistry) *Aggregator
NewAggregator creates a new settings aggregator.
func (*Aggregator) GetAllGrouped ¶
func (a *Aggregator) GetAllGrouped() []GroupedSettings
GetAllGrouped returns all settings organized by group.
func (*Aggregator) GetForContributor ¶
func (a *Aggregator) GetForContributor(name string) []contributor.ResolvedSetting
GetForContributor returns settings for a specific contributor.
type GroupedSettings ¶
type GroupedSettings struct {
Group string
Settings []contributor.ResolvedSetting
}
GroupedSettings represents settings organized by group.