execscope

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package execscope computes the workspace catalog scope a user-identity session may reach (ADR 0018 §5). It is the only place outside queryengine that builds a session's AllowedCatalogsSource; call sites pass its result into SessionSpec instead of setting Identity.UserID without a scope.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func For

func For(store Store, workspaceID, engineID db.UUID) func(context.Context) ([]string, error)

For returns engine_scope(workspace, engine): the engine-side catalog names of every enabled, active binding the workspace may use on that engine. The source re-reads the scope before each statement, so a revocation stops the next statement instead of the next run.

A catalog name containing "," or "=" is refused: the guard splits baleia.catalogs on "," (and Trino the header on "="), so such a name would be read as two grants. Names are validated at creation, so this is fail-closed defense in depth.

Types

type Store

type Store interface {
	ListWorkspaceTargets(ctx context.Context, workspaceID db.UUID) ([]db.ListWorkspaceTargetsRow, error)
}

Store lists the workspace's targets; *repo.Repo implements it.

Jump to

Keyboard shortcuts

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