apprunrole

package
v1.164.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package apprunrole answers what the application database toolkit asks about the applications holding its schemas (#2539): which application holds a schema, and an application's run role with its password, opened from the sealed value the platform stored when the schema was added, for the pool the toolkit builds and nowhere else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reach

func Reach(toolkits *registry.Registry, personas *persona.Registry, stored connview.StoreLister) func(ctx context.Context, actor application.Actor) ([]string, error)

Reach is ReachVia over the live toolkits, the persona registry and the stored connections.

func ReachVia

func ReachVia(lister *connreach.Lister, personaOf func(roles []string) string) func(ctx context.Context, actor application.Actor) ([]string, error)

ReachVia is the application database connections an actor may hold a schema on: the appdb connections their persona reaches, every one for an administrator.

func SessionApplications

func SessionApplications(db *sql.DB) scriptsession.Applications

SessionApplications is what a script session asks about applications (#2539): the application whose run role a script's statements log in as, and the application holding a schema. Its zero value without a database.

Types

type Lookups

type Lookups struct {
	Holder  func(ctx context.Context, connection, schema string) (string, error)
	RunRole func(ctx context.Context, connection, application string) (role, password string, err error)
}

Lookups are the two the toolkit's SetApplications takes; both nil without a database or an encryption key, which governs no schema.

func New

func New(store application.Store, sealer appsvc.Sealer) Lookups

New is the lookups over store, opening passwords with sealer.

func Over

func Over(db *sql.DB, sealer *fieldcrypt.RestFieldEncryptor) Lookups

Over is New over the platform's database; empty without one.

Jump to

Keyboard shortcuts

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