Help us shape the future of Go! Take the 2026 Go Developer Survey

remoteserver

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Package remoteserver composes distributed identity and owner-scoped applications.

Index

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

func MultiHandler(ctx context.Context, store *pgstore.Store, assets fs.FS, options ...Settings) (http.Handler, func() error, error)

func Retention

func Retention(days int) (time.Duration, error)

func Run

func Run(ctx context.Context, settings Settings, ready func(string)) error

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 GoogleSettings struct {
	ClientID     string
	ClientSecret string
	// contains filtered or unexported fields
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL