Documentation
¶
Overview ¶
Package remoteserver composes distributed identity and owner-scoped applications.
Index ¶
- func Handler(ctx context.Context, store *pgstore.Store, settings Settings, assets fs.FS) (http.Handler, func() error, error)
- func MultiHandler(ctx context.Context, store *pgstore.Store, assets fs.FS, options ...Settings) (http.Handler, func() error, error)
- func Retention(days int) (time.Duration, error)
- func Run(ctx context.Context, settings Settings, ready func(string)) error
- type GitHubSettings
- type GoogleSettings
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(ctx context.Context, store *pgstore.Store, settings Settings, assets fs.FS) (http.Handler, func() error, error)
Handler supplies distributed identity; local composition never calls it.
func MultiHandler ¶
Types ¶
type GitHubSettings ¶ added in v0.2.1
type GitHubSettings struct {
AppID int64
ClientID string
ClientSecret string
PrivateKeyFile string
WebhookSecret string
TokenKey string
PublicURL string
// InternalListen serves the fetcher protocol, authenticated by FetcherSecret.
InternalListen string
FetcherSecret string
// contains filtered or unexported fields
}
GitHubSettings enables the GitHub App integration; nil disables its routes.
type GoogleSettings ¶ added in v0.2.2
type Settings ¶
type Settings struct {
Listen string
// DatabaseURL selects the shared Postgres database; it holds credentials and is never logged.
DatabaseURL string
// PublicURL is the browser-facing origin. An https origin, or loopback http
// for development, enables Web Push.
PublicURL string
InsecureCookies bool
RetentionDays int
GitHub *GitHubSettings
// Google enables Google sign-in; it requires PublicURL.
Google *GoogleSettings
// ClientIPHeader names the header a trusted ingress sets to the client IP.
// Non-empty enables authentication rate limiting shared by every replica.
ClientIPHeader string
}
Click to show internal directories.
Click to hide internal directories.