Versions in this module Expand all Collapse all v0 v0.4.0 Sep 6, 2026 Changes in this version + const ClassInline + const ClassObserve + const CodeBundleExpands + const CodeBundleInvalid + const CodeBundleMismatch + const CodeDigestInvalid + const CodeDigestMismatch + const CodeFetchStatus + const CodeMigrationsUnsupported + const CodeURLInvalid + const ContentTypeWrapped + const DefaultFetchMaxBytes + const DefaultFetchTimeout + const DefaultInlineDeadline + const DefaultInstantiateDeadline + const DefaultLoadTimeout + const DefaultPoolSize + const DefaultPoolTTL + const DefaultRouteDeadline + const InstallFetchTimeout + const InvalidName + const ManifestFile + const MaxSettingValueBytes + const MaxSignInLabelBytes + const MaxSignInPathBytes + const MaxUploadBytes + const MigrationsDir + const PermissionRedirectInline + const PermissionRedirectObserve + const PermissionRewriteQuery + const PermissionRoutes + const PermissionSessionContext + const PermissionSessionMint + const RemoveGrace + const RoutePrefix + const SchemaVersion + const SignInConsentSetting + const StartFunction + const StepCall + const StepInstantiate + var ErrBusy = errors.New("too many add-on requests are in flight") + var ErrGuestFailed = errors.New("the add-on's handler failed") + var ErrNoAddonDatabase = fmt.Errorf(..., domain.ErrUnavailable) + var ErrNoAddonsDir = fmt.Errorf(..., domain.ErrUnavailable) + var ErrNoHandler = errors.New("the add-on exports no request handler") + var ErrNoResponse = errors.New("the add-on's handler wrote no response") + var ErrNoRoute = errors.New("no add-on serves this prefix") + var ErrRequestTooLarge = errors.New("the request record is larger than one value may be") + var ResponseMediaTypes = []string + var URLInstallCodes = []string + func EncodeRequestBody(body []byte) (string, bool) + type Cookie struct + MaxAge int + Name string + Value string + type DeclarationClass string + const ClassNone + const ClassRedirectInline + const ClassRedirectObserve + type FailureClass string + const ClassDegrade + const ClassRequired + type FailureClassError struct + Addon string + Value string + Var string + func (e *FailureClassError) Error() string + type Grants struct + func (g Grants) Has(permission string) bool + func (g Grants) Len() int + func (g Grants) Names() []string + func (g Grants) String() string + type Host struct + func Open(ctx context.Context, opts Options) (*Host, error) + func (h *Host) Addons() []Loaded + func (h *Host) Close(ctx context.Context) error + func (h *Host) Detail(ctx context.Context, actor *auth.Identity, name string) (Managed, error) + func (h *Host) HasInline() bool + func (h *Host) Inline(ctx context.Context, d RedirectDecision) InlineResult + func (h *Host) InlineAddons() []string + func (h *Host) Install(ctx context.Context, actor *auth.Identity, req InstallRequest) (Installed, error) + func (h *Host) InstallFromURL(ctx context.Context, actor *auth.Identity, req URLInstallRequest) (Installed, error) + func (h *Host) Len() int + func (h *Host) List(ctx context.Context, actor *auth.Identity) ([]Managed, error) + func (h *Host) Observe(ev RedirectEvent) + func (h *Host) ObserveSchemaSizes(ctx context.Context) + func (h *Host) ObservingAddons() []string + func (h *Host) OrphanSchemas(ctx context.Context) ([]string, error) + func (h *Host) Orphans(ctx context.Context, actor *auth.Identity) ([]Orphan, error) + func (h *Host) PurgeData(ctx context.Context, actor *auth.Identity, name string) (Orphan, error) + func (h *Host) Remove(ctx context.Context, actor *auth.Identity, name string) (Installed, error) + func (h *Host) Route(ctx context.Context, name string, in RequestIn) (Response, error) + func (h *Host) RoutedAddons() []string + func (h *Host) SaveSettings(ctx context.Context, actor *auth.Identity, name string, ...) ([]SettingView, error) + func (h *Host) Schemas() []string + func (h *Host) ServesRoutes(name string) bool + func (h *Host) SignInLinks(ctx context.Context) []SignInLink + type InlineResult struct + Destination string + Rewritten bool + Vetoed bool + type InstallRequest struct + Manifest []byte + Module []byte + type Installed struct + ABIVersion int + Draining bool + FailureClass FailureClass + Name string + Permissions []string + SHA256 string + Schema string + Version string + type JarCookie struct + MaxAge int + Name string + Value string + type LoadError struct + Addon string + Err error + Outcome Outcome + func (e *LoadError) Error() string + func (e *LoadError) Unwrap() error + type Loaded struct + Dir string + FailureClass FailureClass + Manifest Manifest + Schema string + func (l Loaded) CanMint() bool + func (l Loaded) ConfiguredSettings() int + func (l Loaded) Declaration() DeclarationClass + func (l Loaded) Grants() Grants + func (l Loaded) MemorySize() uint32 + func (l Loaded) Module() api.Module + func (l Loaded) ObservesRedirects() bool + func (l Loaded) PathPrefix() string + func (l Loaded) RunsInline() bool + func (l Loaded) ServesRoutes() bool + func (l Loaded) SignInHref() (string, bool) + func (l Loaded) SignInLabel() (string, bool) + type Managed struct + ConfiguredCount int + Declaration DeclarationClass + Declared []string + DeclaredSettings int + MemoryBytes uint32 + Performance observability.AddonPerformance + SchemaBytes int64 + Settings []SettingView + type Manifest struct + ABIVersion int + CookiePrefixes []string + FailureClass FailureClass + Migrations []MigrationFile + Module string + Name string + Permissions []string + SHA256 string + SchemaVersion int + Settings []Setting + SignInLabel string + SignInPath string + Version string + func ReadManifest(dir string) (Manifest, error) + func (m Manifest) Validate() error + type MigrationFile struct + File string + SHA256 string + type Minted struct + ExpiresAt time.Time + PendingToken config.Secret + SecondFactorRequired bool + Token config.Secret + type MintedSession struct + ExpiresAt string + SecondFactorRequired bool + type Options struct + Audit audit.Recorder + DB *pgxpool.Pool + DSN string + Dir string + FetchMaxBytes int64 + FetchTimeout time.Duration + InlineDeadline time.Duration + InstantiateDeadline time.Duration + LoadTimeout time.Duration + Logger *slog.Logger + Metrics *observability.Metrics + Overrides func(addon string) map[string]string + PoolSize int + PoolTTL time.Duration + RouteDeadline time.Duration + Sessions SessionMinter + Settings func(addon string, declared []string) map[string]config.Secret + type Orphan struct + Bytes int64 + IdentityLinks int64 + LargeObjects int64 + Measured bool + Name string + Schema string + StoredSettings int64 + type Outcome string + const OutcomeABIUnsupported + const OutcomeChecksumMismatch + const OutcomeInstantiateFailed + const OutcomeLoadTimeout + const OutcomeLoaded + const OutcomeManifestInvalid + const OutcomeModuleUnreadable + const OutcomeNameCollision + const OutcomeStorageFailed + type RedirectAnswer struct + Query string + Rewrite bool + Verdict string + type RedirectDecision struct + Alias string + Destination string + LinkID uuid.UUID + WorkspaceID uuid.UUID + type RedirectEvent struct + Browser string + Country string + Device string + IsBot bool + IsFirstVisit bool + Language string + LinkID string + OS string + OccurredAt string + ReferrerHost string + VisitorHash string + WorkspaceID string + type Request struct + AcceptLanguage string + Body string + BodyBase64 bool + ContentType string + Cookies map[string]string + Method string + Path string + Query string + type RequestIn struct + AcceptLanguage string + Body []byte + ClientIP netip.Addr + ContentType string + Cookies []*http.Cookie + Identity *auth.Identity + Method string + Path string + Query string + UserAgent string + type Response struct + Body string + ContentType string + Jar []JarCookie + Location string + Minted *Minted + SetCookie []Cookie + Status int + type SessionClaim struct + DisplayName string + Email string + EmailVerified bool + Groups []string + Issuer string + Subject string + type SessionContext struct + DisplayName string + Email string + OrganizationID string + Role string + SignedIn bool + UserID string + WorkspaceID string + type SessionMinter interface + LinkAddonIdentity func(ctx context.Context, actor *auth.Identity, addon, issuer, subject string) error + MintFromAddonAssertion func(ctx context.Context, in auth.AddonAssertion) (*auth.AddonMint, error) + type Setting struct + Default string + Name string + Options []string + Origin bool + Type SettingType + type SettingSource string + const SourceEnvironment + const SourceStored + const SourceUnset + type SettingType string + const SettingSecret + const SettingSelect + const SettingText + const SettingToggle + type SettingView struct + Configured bool + Default string + EnvVar string + Name string + Options []string + Origin bool + SignIn bool + Source SettingSource + Type SettingType + UpdatedAt *time.Time + Value string + func (v SettingView) Editable() bool + func (v SettingView) IsOrigin() bool + func (v SettingView) IsSecret() bool + func (v SettingView) IsSelect() bool + func (v SettingView) IsSignIn() bool + func (v SettingView) IsText() bool + func (v SettingView) IsToggle() bool + func (v SettingView) On() bool + type SignInLink struct + Addon string + Href string + Label string + type URLInstallRequest struct + SHA256 string + URL string