Documentation
¶
Overview ¶
templ: version: v0.3.1001
Package settings owns the admin area at /admin: everything scoped to this installation, users, registries, TLS, notification defaults and maintenance.
It used to serve one /settings page that mixed three different scopes: per-org connectors, instance infrastructure and the signed-in user's own API keys. Personal settings now live under /account and org settings on the org's own page, so every section here reaches exactly as far as the admin badge on it says.
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
- func DestinationsSection(c echo.Context, dests []repo.BackupDestination, base string, global bool) templ.Component
- func ListDestinations(ctx context.Context, store repo.Store, orgID string) ([]repo.BackupDestination, error)
- func NewHandler(store repo.Store, bk *backup.Service, admin *service.AdminService, ...) *handler
- type ConnectorView
- type OrgConnectors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DestinationsSection ¶
func DestinationsSection(c echo.Context, dests []repo.BackupDestination, base string, global bool) templ.Component
DestinationsSection is rendered by both the admin page (server-wide destinations) and an org's settings page (that org's own). base is the URL the two forms post to, which is what scopes them.
func ListDestinations ¶
func ListDestinations(ctx context.Context, store repo.Store, orgID string) ([]repo.BackupDestination, error)
ListDestinations returns the destinations visible at one scope: an org's own for an org page, the server-wide ones for the admin page.
Types ¶
type ConnectorView ¶
type ConnectorView struct {
ID string
Name string
Provider string
Slug string // github app slug, "" while pending
Connected bool
}
ConnectorView is one connector rendered on the org settings page.
type OrgConnectors ¶
type OrgConnectors struct {
Org repo.Org
Items []ConnectorView
}
OrgConnectors is the per-org connector listing.
func LoadOrgConnectors ¶
LoadOrgConnectors lists connectors for one org.