remoteserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package remoteserver adds deployment authentication to the shared server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken() (string, error)

GenerateToken returns a high-entropy credential suitable for bearer or Basic auth.

func Handler

func Handler(ctx context.Context, store *reviewstore.Store, account, token string, assets fs.FS) (http.Handler, func() error, error)

func MultiHandler

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

MultiHandler composes one application service per provisioned user. Provisioning uses the database ownership lock, so the account set is fixed while serving.

func Retention

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

func Run

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

Types

type Settings

type Settings struct {
	Listen         string
	State          string
	Account        string
	Token          string
	RetentionDays  int
	BootstrapReady func(string)
}

Jump to

Keyboard shortcuts

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