impulse

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 10 Imported by: 1 module, 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.

README

Impulse Framework

The Impulse Framework builds permission-enforced, Spanner-backed web applications in Go and Angular: a generator turns annotated Go structs and schema migrations into handlers, routes, request structs and a typed TypeScript client, the libraries around it carry sessions, permissions, logging, tracing and the cloud drivers, and a command-line tool creates, checks and upgrades the applications built on it.

The framework is one Go module, github.com/impulseframework/impulse. An application requires it once, and that one version pins the libraries, the generator, the tool and the browser packages together.

Module layout

Every package below lives at the module root unless its path says otherwise.

Package What it is
impulse (the root package) Utility types and functions shared by the rest of the module.
accesstypes The permission, role, domain, resource and user types the access package works with.
access The permission engine: roles, grants and memberships, validated against the resources an application declares.
session Cookie-backed sessions for web applications: the Auth, its sign-in methods and its tables. Its subpackages carry the pieces: sessionstorage, oidc, azure, google, signin, mail, deviceflow, cookie and sessioninfo.
httpio Encoding and decoding for HTTP input and output.
logger The HTTP request logger, with correlated logging to the supported platforms.
tracer Convenience functions for OpenTelemetry tracing.
securehash Hashing and comparing secrets.
cloud What the cloud drivers share: the settings struct a driver declares and an application embeds in its configuration.
db Database testing and migrations: the Spanner and Firestore emulators in containers for test suites, and the migration runner.
spxscan Scanning Spanner rows into Go structs and other composite types.
resource The generator-driven data layer: permission-enforced CRUD over Spanner-backed resources, with query decoding, permission enforcement and patch sets at run time. Its subpackages hold the drivers (database, live, jobs), the file store (filestore) and the rest; see resource/README.md.
generation The code generator library: it reads the annotated structs and the schema and writes the Go handlers, routes, request structs and TypeScript.
persona The persona sign-in a host application offers the test environments: an OpenID Connect provider that signs a person in as a registered persona.
cast The contract between an application and that persona sign-in: the cast the application declares and the registration its deploy sends.
app Discovers the shape of an Impulse application from its code, for the tool and for bedrock.
ci Renders an application's CI workflows from its code, and owns them.
deployhook The contract between an application's hooks program and the deploy pipeline.
cmd/impulse The command-line tool, impulse; see cmd/impulse/README.md.
lodestar/ A nested module: the demonstration application (below).
web/ The bun and Angular workspace that builds the three browser packages (below).

The browser packages

The workspace under web/ publishes three npm packages from web/projects:

  • @impulseframework/resource, the framework-neutral TypeScript client that interprets the generated zz_gen_api.ts at run time (README);
  • @impulseframework/resource-angular, its Angular binding: the components, guards and services that render pages from the generated descriptor (README);
  • @impulseframework/resource-firestore, the Firestore change feed that keeps live pages current (README).

The three release with the Go module. Their version is always the Go release without its v (release v0.3.0 publishes 0.3.0 of each): one release-please component bumps the module and the three package.json files together (release-please-config.json), and the npm publish workflow builds and publishes them from the release's tag. An application pins all three at the same version as its Go pin, in every package.json that names them, and the tool's web-pins check holds it to that.

Lodestar, the demonstration application

lodestar/ is a complete application built on the framework, with its own README (lodestar/README.md): an operations console and a client portal over a synthetic domain, where every annotation, handler shape and permission rule is something a person can sign in to and watch working. It is a nested Go module that replaces the framework module with this checkout, and its web workspace links the browser packages from web/dist, so it always runs on the framework's current source, and CI builds, vets and tests it. It is also the generator's committed regression baseline.

The command-line tool

go install github.com/impulseframework/impulse/cmd/impulse@latest

impulse new creates an application from an embedded skeleton, impulse add and impulse remove put options in and take them out, impulse check verifies the agreements between an application's parts, impulse render writes the files the tool owns, and impulse upgrade walks an application through the framework's releases. Inside an application the tool is the tool github.com/impulseframework/impulse/cmd/impulse directive in go.mod, and go tool impulse <command> runs it at the pinned version. Every command, flag and check is described in cmd/impulse/README.md.

Developing the repository

The module is Go 1.27 (go.mod), and the web workspace is built with bun 1.4.4, the bun that wrote web/bun.lock. From the repository root:

go build ./... && go vet ./...
go test ./...
golangci-lint run ./...
golangci-lint run --build-tags dev ./...

The database tests start the Spanner and Firestore emulators in containers through the testcontainers library, so Docker or podman must be running. CI lints the whole module under both tag sets, "" and dev, with the configuration at .golangci.yml, which includes a US English spelling check.

The browser packages:

cd web && bun install && bun run build
bun run lint
bun run test

Lodestar builds against the packages in web/dist, so build them first; then cd lodestar/web && bun install && bun run build and, for the Go side, cd lodestar && go build ./... && go vet ./... && go test -race ./.... The skeletons the tool renders are validated by rendering each one and building, testing, linting and checking the result, which CI does for every skeleton against the framework at the commit (impulse render <candidate> <dir> --module <path> --dev-root <checkout>).

A release is cut by release-please from the conventional commit titles of the merged pull requests, as one component with the tag vX.Y.Z. A release that needs something of an application beyond moving its pin records a step in the upgrade ledger (cmd/impulse/internal/ledger), and CI refuses a release that would leave the ledger's last step behind.

Taking a release in an application

An application's go.mod has one framework requirement, github.com/impulseframework/impulse vX.Y.Z, and the tool directive; that version is the framework pin, and its web roots pin the three browser packages at the same version without the v. Moving to a new release is go run github.com/impulseframework/impulse/cmd/impulse@<version> upgrade, which walks the application through the ledger's steps after the one its pin stands at, running each step's recipes, moving the Go pin and the web pins, regenerating and checking, one commit per step, and ends at the release named. When no step is pending, moving the pin is go get -tool github.com/impulseframework/impulse/cmd/impulse@<version>, then go tool impulse render, then go tool impulse check.

License

MIT; see LICENSE.

Documentation

Overview

Package impulse contains utility types and functions

Index

Constants

This section is empty.

Variables

View Source
var NilUUID = UUID{}

NilUUID represents the nil value of UUID

Functions

func BatchIter2

func BatchIter2[T any](iter2 iter.Seq2[T, error], size int) iter.Seq[iter.Seq2[T, error]]

BatchIter2 takes an iter.Seq2 and returns an iter.Seq of iter.Seq2, where each inner iter.Seq2 yields a batch of T of the specified size.

BatchIter2 returns a single-use iterator, but can take in a reusable iterator.

The inner batch iterator must be ranged over with a range loop (or iter.Pull) before the next outer iterator can be accessed. It is acceptable to break early from a range loop, in which case the remaining items will be returned by the next outer iterator. If the inner iterator is not properly ranged over, the outer iterator will panic.

If the provided size is not a positive integer, the returned iterator will yield a single error.

Example:

for batch := range BatchIter2(myIter, 10) {
	// Do some operation between batches such as start a new db transaction

	for resource, err := range batch {
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(resource)
	}
}

func Must

func Must[T any](value T, err error) T

Must is a helper function to avoid the need to check for errors.

func NextIter

func NextIter[T any](r NextIterator[T]) iter.Seq2[T, error]

NextIter returns a reusable iter.Seq2 iterator from anything that implements the NextIterator interface.

func ReadIter

func ReadIter[T any](r ReadIterator[T]) iter.Seq2[T, error]

ReadIter returns a reusable iter.Seq2 iterator from anything that implements the ReadIterator interface.

Types

type Duration

type Duration struct {
	time.Duration
}

Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years. This custom type provides support for marshaling to and from text, json, and Spanner.

func NewDuration

func NewDuration(d time.Duration) Duration

NewDuration returns a Duration from a time.Duration

func NewDurationFromString

func NewDurationFromString(s string) (Duration, error)

NewDurationFromString parses a Duration from a string representation in the same manner as time.ParseDuration(), but with the added step of removing any spaces from the string.

func (*Duration) DecodeSpanner

func (d *Duration) DecodeSpanner(val any) error

DecodeSpanner implements the spanner.Decoder interface

func (Duration) EncodeSpanner

func (d Duration) EncodeSpanner() (any, error)

EncodeSpanner implements the spanner.Encoder interface

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface for Duration.

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for Duration.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface

type JSONMap

type JSONMap map[string]any

JSONMap is a map that can be unmarshalled from JSON, converting all json.Number values to their appropriate int or float64 types.

func (*JSONMap) UnmarshalJSON

func (jM *JSONMap) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type NextIterator

type NextIterator[T any] interface {
	Next() bool
	Value() T
	Error() error
}

NextIterator implements an interface where each Next() yields the next item from the Reader, with Error() returning any problems that occur during the Next() call. This iterator will start with a Next() call. If Next() returns true, it will call Value(). This will continue until Next() returns false, at which point it will call Error() one time.

type NullDuration

type NullDuration struct {
	Duration
	Valid bool
}

NullDuration handles null values of the Duration type

func NewNullDuration

func NewNullDuration(d time.Duration) NullDuration

NewNullDuration returns a NullDuration from a time.Duration

func NewNullDurationFromString

func NewNullDurationFromString(s string) (NullDuration, error)

NewNullDurationFromString parses a NullDuration from a string representation

func (*NullDuration) DecodeSpanner

func (d *NullDuration) DecodeSpanner(val any) error

DecodeSpanner implements the spanner.Decoder interface

func (NullDuration) EncodeSpanner

func (d NullDuration) EncodeSpanner() (any, error)

EncodeSpanner implements the spanner.Encoder interface

func (NullDuration) MarshalJSON

func (d NullDuration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for NullDuration.

func (NullDuration) MarshalText

func (d NullDuration) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface

func (*NullDuration) UnmarshalJSON

func (d *NullDuration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NullDuration.

func (*NullDuration) UnmarshalText

func (d *NullDuration) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface

type NullEnum

type NullEnum[T ~string | ~int | ~int64 | ~float64] struct {
	Value T
	Valid bool
}

NullEnum represents a generic enum that may be null. NullEnum implements the Spanner (DecodeSpanner, EncodeSpanner), JSON (MarshalJSON, UnmarshalJSON), and Text (MarshalText, UnmarshalText) interfaces.

func (*NullEnum[T]) DecodeSpanner

func (n *NullEnum[T]) DecodeSpanner(val any) error

DecodeSpanner implements the spanner.Decoder interface

func (NullEnum[T]) EncodeSpanner

func (n NullEnum[T]) EncodeSpanner() (any, error)

EncodeSpanner implements the spanner.Encoder interface

func (NullEnum[T]) MarshalJSON

func (n NullEnum[T]) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface for NullEnum.

func (NullEnum[T]) MarshalText

func (n NullEnum[T]) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface

func (*NullEnum[T]) UnmarshalJSON

func (n *NullEnum[T]) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullEnum.

func (*NullEnum[T]) UnmarshalText

func (n *NullEnum[T]) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface

type NullUUID

type NullUUID struct {
	UUID
	Valid bool
}

NullUUID represents a UUID that may be null. NullUUID implements the Spanner (DecodeSpanner, EncodeSpanner), JSON (MarshalJSON, UnmarshalJSON), and Text (MarshalText, UnmarshalText) interfaces.

func NewNullUUID

func NewNullUUID() (NullUUID, error)

NewNullUUID returns a new NullUUID

func NullUUIDFromString

func NullUUIDFromString(s string) (NullUUID, error)

NullUUIDFromString parses a NullUUID from a string representation

func NullUUIDFromUUID

func NullUUIDFromUUID(u UUID) NullUUID

NullUUIDFromUUID returns a NullUUID from a UUID

func (*NullUUID) DecodeSpanner

func (u *NullUUID) DecodeSpanner(val any) error

DecodeSpanner implements the spanner.Decoder interface

func (NullUUID) EncodeSpanner

func (u NullUUID) EncodeSpanner() (any, error)

EncodeSpanner implements the spanner.Encoder interface

func (NullUUID) IsNil

func (u NullUUID) IsNil() bool

IsNil implements NullableValue.IsNil for NullUUID.

func (NullUUID) MarshalJSON

func (u NullUUID) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface for NullUUID.

func (NullUUID) MarshalText

func (u NullUUID) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface

func (*NullUUID) UnmarshalJSON

func (u *NullUUID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for NullUUID.

func (*NullUUID) UnmarshalText

func (u *NullUUID) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface

type ReadIterator

type ReadIterator[T any] interface {
	Read() (item T, err error)
}

ReadIterator implements an interface where each Read() yields the next item from the Reader, with err returning any problems that occur during the Read() call. The semantics of how the end of stream is signaled is left up to the implementation.

This can be used to convert the csv.Read() to an iter.Seq2 as an example.

type UUID

type UUID struct {
	uuid.UUID
}

UUID represents a UUID. UUID implements the Spanner (DecodeSpanner, EncodeSpanner), JSON (MarshalJSON, UnmarshalJSON), and Text (MarshalText, UnmarshalText) interfaces.

func NewUUID

func NewUUID() (UUID, error)

NewUUID returns a new UUID

func UUIDFromString

func UUIDFromString(s string) (UUID, error)

UUIDFromString parses a UUID from a string representation

func (*UUID) DecodeSpanner

func (u *UUID) DecodeSpanner(val any) error

DecodeSpanner implements the spanner.Decoder interface

func (UUID) EncodeSpanner

func (u UUID) EncodeSpanner() (any, error)

EncodeSpanner implements the spanner.Encoder interface

func (UUID) MarshalJSON

func (u UUID) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface for UUID.

func (UUID) MarshalText

func (u UUID) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface

func (*UUID) UnmarshalJSON

func (u *UUID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON for UUID.

func (*UUID) UnmarshalText

func (u *UUID) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface

Directories

Path Synopsis
Package access implements tools to manage access to resources.
Package access implements tools to manage access to resources.
internal/policy
Package policy defines the normalized policy records that flow between a policy store and the snapshot compiler: a store reader turns rows into records; everything after (interning, bitsets, caches) is one shared code path in the access package.
Package policy defines the normalized policy records that flow between a policy store and the snapshot compiler: a store reader turns rows into records; everything after (interning, bitsets, caches) is one shared code path in the access package.
internal/signaltest
Package signaltest is an in-memory signal channel with the shape of the application's one: Signal publishes a kind and Subscribe follows one.
Package signaltest is an in-memory signal channel with the shape of the application's one: Signal publishes a kind and Subscribe follows one.
internal/storetest
Package storetest is the shared conformance suite for access.Store implementations.
Package storetest is the shared conformance suite for access.Store implementations.
mock
Package mock contains the generated mocks for the project.
Package mock contains the generated mocks for the project.
mock/mock_access
Package mock_access is a generated GoMock package.
Package mock_access is a generated GoMock package.
postgresstore
Package postgresstore implements access.Store over PostgreSQL, riding the application's existing connection pool.
Package postgresstore implements access.Store over PostgreSQL, riding the application's existing connection pool.
spannerstore
Package spannerstore implements access.Store over Cloud Spanner.
Package spannerstore implements access.Store over Cloud Spanner.
Package accesstypes provides the permission, role, domain, resource, and user types used by the access package
Package accesstypes provides the permission, role, domain, resource, and user types used by the access package
condition
Package condition compiles and folds the ABAC condition language: a small expression language with a SQL-flavored surface in which grant conditions are written.
Package condition compiles and folds the ABAC condition language: a small expression language with a SQL-flavored surface in which grant conditions are written.
condition/conditiontest
Package conditiontest generates random condition expressions for property tests.
Package conditiontest generates random condition expressions for property tests.
Package app discovers the shape of an Impulse application from its code.
Package app discovers the shape of an Impulse application from its code.
Package cast is the contract between an application and the persona sign-in of its test environments: the cast the application declares, the client ID a deployment is known by at the persona provider, and the registration the deploy sends the provider.
Package cast is the contract between an application and the persona sign-in of its test environments: the cast the application declares, the client ID a deployment is known by at the persona provider, and the registration the deploy sends the provider.
Package ci renders the application's CI workflows from the code, and owns them: .github/workflows/ci.yml, the checks on every pull request; .github/workflows/ci-cache.yml, the run after a push to the default branch or a patch release branch that fills the caches the checks restore; and .github/workflows/security-scan.yml, the daily run of the vulnerability check and the image scan over the default branch and the latest release, which reports to an issue of the repository.
Package ci renders the application's CI workflows from the code, and owns them: .github/workflows/ci.yml, the checks on every pull request; .github/workflows/ci-cache.yml, the run after a push to the default branch or a patch release branch that fills the caches the checks restore; and .github/workflows/security-scan.yml, the daily run of the vulnerability check and the image scan over the default branch and the latest release, which reports to an issue of the repository.
Package cloud is what the cloud drivers share.
Package cloud is what the cloud drivers share.
gcp
Package gcp is the Google Cloud driver: from the variables it declares, it builds the pieces of an application that are Google's, request logs to Cloud Logging and spans to Cloud Trace.
Package gcp is the Google Cloud driver: from the variables it declares, it builds the pieces of an application that are Google's, request logs to Cloud Logging and spans to Cloud Trace.
gcp/declaration
Package declaration publishes the declaration of the Google Cloud driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what gcp.Settings declares, in the shape the cloud package defines.
Package declaration publishes the declaration of the Google Cloud driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what gcp.Settings declares, in the shape the cloud package defines.
cmd
impulse command
Command impulse is the command-line tool for Impulse applications: apps built on the Impulse Framework, with its resource package at the center.
Command impulse is the command-line tool for Impulse applications: apps built on the Impulse Framework, with its resource package at the center.
impulse/internal/advise
Package advise writes the brief impulse advise hands to an agent: what the application's generate programs raised under -audit (or where the accepted warnings are pinned, when generation is skipped), where the accepted role warnings are pinned, impulse's own deterministic reading of each kind, and the question each kind leaves to judgment.
Package advise writes the brief impulse advise hands to an agent: what the application's generate programs raised under -audit (or where the accepted warnings are pinned, when generation is skipped), where the accepted role warnings are pinned, impulse's own deterministic reading of each kind, and the question each kind leaves to judgment.
impulse/internal/audit
Package audit runs an application's generate programs with -audit and prints what they raised: the schema warnings every generation prints and the audit pass's findings, advisory findings about shapes the framework handles under a stated limitation, which a normal generation never prints.
Package audit runs an application's generate programs with -audit and prints what they raised: the schema warnings every generation prints and the audit pass's findings, advisory findings about shapes the framework handles under a stated limitation, which a normal generation never prints.
impulse/internal/authpkg
Package authpkg renders an auth package: pkg/auth/<name>, the package that owns one session Auth (its tables, its cookies, its permission store and its role file) and the sign-in methods registered on it, one file per method.
Package authpkg renders an auth package: pkg/auth/<name>, the package that owns one session Auth (its tables, its cookies, its permission store and its role file) and the sign-in methods registered on it, one file per method.
impulse/internal/check
Package check holds the invariants `impulse check` verifies against an Impulse application.
Package check holds the invariants `impulse check` verifies against an Impulse application.
impulse/internal/cli
Package cli is the command tree of the impulse tool.
Package cli is the command tree of the impulse tool.
impulse/internal/framework
Package framework names the Impulse Framework as an application sees it: the one Go module every application requires, the command line's package in it, which the tool directive names, and the browser packages, which release with the module at its version.
Package framework names the Impulse Framework as an application sees it: the one Go module every application requires, the command line's package in it, which the tool directive names, and the browser packages, which release with the module at its version.
impulse/internal/handoff
Package handoff is the protocol between impulse and an agent for the work the tool cannot do mechanically.
Package handoff is the protocol between impulse and an agent for the work the tool cannot do mechanically.
impulse/internal/ledger
Package ledger records the steps that take an application from the framework release an earlier impulse pinned to the one the current impulse pins.
Package ledger records the steps that take an application from the framework release an earlier impulse pinned to the one the current impulse pins.
impulse/internal/names
Package names holds the naming rules the tool applies to an auth and to the application: how a name is substituted through a tree of code and prose, and what names each may take.
Package names holds the naming rules the tool applies to an auth and to the application: how a name is substituted through a tree of code and prose, and what names each may take.
impulse/internal/skeleton
Package skeleton carries the application templates impulse renders: the candidate skeletons under _candidates, embedded in the binary so new and add render offline and ship exactly the tree the release was tested with.
Package skeleton carries the application templates impulse renders: the candidate skeletons under _candidates, embedded in the binary so new and add render offline and ship exactly the tree the release was tested with.
impulse/internal/skeleton/_candidates/outlets command
main serves the application: the generated resource API behind browser sessions, and the console's built Angular bundle for everything else.
main serves the application: the generated resource API behind browser sessions, and the console's built Angular bundle for everything else.
impulse/internal/skeleton/_candidates/outlets/app
Package app contains the application's http handlers.
Package app contains the application's http handlers.
impulse/internal/skeleton/_candidates/outlets/cmd/bootstrap command
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check of each auth), seeds the development tenants, and creates the development logins.
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check of each auth), seeds the development tenants, and creates the development logins.
impulse/internal/skeleton/_candidates/outlets/cmd/deployment/migrate command
Package main is the deployment's migration step: it applies the schema migrations, checks each auth's role policy against what its permission engine's store holds, and seeds each auth's first administrator while its users table holds no rows.
Package main is the deployment's migration step: it applies the schema migrations, checks each auth's role policy against what its permission engine's store holds, and seeds each auth's first administrator while its users table holds no rows.
impulse/internal/skeleton/_candidates/outlets/cmd/generate
Package generate produces all generated code for the application.
Package generate produces all generated code for the application.
impulse/internal/skeleton/_candidates/outlets/cmd/generate/internal/regen
Package regen serializes the tests that regenerate the tree.
Package regen serializes the tests that regenerate the tree.
impulse/internal/skeleton/_candidates/outlets/cmd/generate/resourcegenerator command
Package main is the application's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
Package main is the application's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
impulse/internal/skeleton/_candidates/outlets/cmd/sensor command
Package main is the sensor: the program the release ships to the devices that report readings, which the devices outlet serves to its installed copies and which keeps itself at the outlet's release.
Package main is the sensor: the program the release ships to the devices that report readings, which the devices outlet serves to its installed copies and which keeps itself at the outlet's release.
impulse/internal/skeleton/_candidates/outlets/pkg/auth
Package auth holds what the auths share: the request-scoped record of which auth a request came through.
Package auth holds what the auths share: the request-scoped record of which auth a request came through.
impulse/internal/skeleton/_candidates/outlets/pkg/auth/members
Package members is the members auth: the people who sign in through the organization's directory (OpenID Connect against Microsoft Entra), the portal's people, who hold their roles in the members permission store.
Package members is the members auth: the people who sign in through the organization's directory (OpenID Connect against Microsoft Entra), the portal's people, who hold their roles in the members permission store.
impulse/internal/skeleton/_candidates/outlets/pkg/auth/staff
Package staff is the staff auth: the people who sign in to the console with a password, who hold their roles in the staff permission store.
Package staff is the staff auth: the people who sign in to the console with a password, who hold their roles in the staff permission store.
impulse/internal/skeleton/_candidates/outlets/pkg/config
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
impulse/internal/skeleton/_candidates/outlets/pkg/deploy
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
impulse/internal/skeleton/_candidates/outlets/pkg/resources
Package resources provides the application's resource types.
Package resources provides the application's resource types.
impulse/internal/skeleton/_candidates/outlets/pkg/router
Package router serves the application.
Package router serves the application.
impulse/internal/skeleton/_candidates/sites/apps/console command
main serves the console site: its generated resource API behind browser sessions, and its built Angular bundle for everything else.
main serves the console site: its generated resource API behind browser sessions, and its built Angular bundle for everything else.
impulse/internal/skeleton/_candidates/sites/apps/console/app
Package app contains the http handlers for the console site.
Package app contains the http handlers for the console site.
impulse/internal/skeleton/_candidates/sites/apps/console/pkg/resources
Package resources provides the resource types the console site serves.
Package resources provides the resource types the console site serves.
Package router serves the application.
impulse/internal/skeleton/_candidates/sites/apps/portal command
main serves the portal site: its generated resource API behind browser sessions, and its built Angular bundle for everything else.
main serves the portal site: its generated resource API behind browser sessions, and its built Angular bundle for everything else.
impulse/internal/skeleton/_candidates/sites/apps/portal/app
Package app contains the http handlers for the portal site.
Package app contains the http handlers for the portal site.
impulse/internal/skeleton/_candidates/sites/apps/portal/pkg/resources
Package resources provides the resource types the portal site serves.
Package resources provides the resource types the portal site serves.
Package router serves the application.
impulse/internal/skeleton/_candidates/sites/cmd/bootstrap command
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check), seeds the development tenants, and creates the development logins.
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check), seeds the development tenants, and creates the development logins.
impulse/internal/skeleton/_candidates/sites/cmd/deployment/migrate command
Package main is the deployment's migration step: it applies the schema migrations, checks the release's role policy against what the permission engine's store holds, and seeds the staff auth's first administrator while its users table holds no rows.
Package main is the deployment's migration step: it applies the schema migrations, checks the release's role policy against what the permission engine's store holds, and seeds the staff auth's first administrator while its users table holds no rows.
impulse/internal/skeleton/_candidates/sites/cmd/generate
Package generate produces all generated code for the application: one generator per site, then the shared generator whose TypeScript reaches every site.
Package generate produces all generated code for the application: one generator per site, then the shared generator whose TypeScript reaches every site.
impulse/internal/skeleton/_candidates/sites/cmd/generate/consolegenerator command
Package main is the console site's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
Package main is the console site's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
impulse/internal/skeleton/_candidates/sites/cmd/generate/internal/regen
Package regen serializes the tests that regenerate the tree.
Package regen serializes the tests that regenerate the tree.
impulse/internal/skeleton/_candidates/sites/cmd/generate/portalgenerator command
Package main is the portal site's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
Package main is the portal site's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
impulse/internal/skeleton/_candidates/sites/cmd/generate/sharedgenerator command
Package main is the shared vocabulary's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
Package main is the shared vocabulary's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
impulse/internal/skeleton/_candidates/sites/pkg/auth/staff
Package staff is the staff auth: the people who sign in to the console with a password, who hold their roles in the staff permission store.
Package staff is the staff auth: the people who sign in to the console with a password, who hold their roles in the staff permission store.
impulse/internal/skeleton/_candidates/sites/pkg/config
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
impulse/internal/skeleton/_candidates/sites/pkg/deploy
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
impulse/internal/skeleton/_candidates/sites/pkg/sharedresources
Package sharedresources holds what every site's browser application needs in the same shape: the enumerations.
Package sharedresources holds what every site's browser application needs in the same shape: the enumerations.
impulse/internal/skeleton/_candidates/solo command
main serves the application: the generated resource API behind browser sessions, and the console's built Angular bundle for everything else.
main serves the application: the generated resource API behind browser sessions, and the console's built Angular bundle for everything else.
impulse/internal/skeleton/_candidates/solo/app
Package app contains the application's http handlers.
Package app contains the application's http handlers.
impulse/internal/skeleton/_candidates/solo/cmd/bootstrap command
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check), and creates the development logins.
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check), and creates the development logins.
impulse/internal/skeleton/_candidates/solo/cmd/deployment/migrate command
Package main is the deployment's migration step: it applies the schema migrations, checks the release's role policy against what the permission engine's store holds, and seeds the staff auth's first administrator while its users table holds no rows.
Package main is the deployment's migration step: it applies the schema migrations, checks the release's role policy against what the permission engine's store holds, and seeds the staff auth's first administrator while its users table holds no rows.
impulse/internal/skeleton/_candidates/solo/cmd/generate
Package generate produces all generated code for the application.
Package generate produces all generated code for the application.
impulse/internal/skeleton/_candidates/solo/cmd/generate/internal/regen
Package regen serializes the tests that regenerate the tree.
Package regen serializes the tests that regenerate the tree.
impulse/internal/skeleton/_candidates/solo/cmd/generate/resourcegenerator command
Package main is the application's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
Package main is the application's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
impulse/internal/skeleton/_candidates/solo/pkg/auth/staff
Package staff is the staff auth: the people who sign in to the console with a password, who hold their roles in the staff permission store.
Package staff is the staff auth: the people who sign in to the console with a password, who hold their roles in the staff permission store.
impulse/internal/skeleton/_candidates/solo/pkg/config
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
impulse/internal/skeleton/_candidates/solo/pkg/deploy
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
impulse/internal/skeleton/_candidates/solo/pkg/resources
Package resources provides the application's resource types.
Package resources provides the application's resource types.
impulse/internal/skeleton/_candidates/solo/pkg/router
Package router serves the application.
Package router serves the application.
impulse/internal/skeleton/_candidates/tenanted command
main serves the application: the generated resource API behind browser sessions, and the console's built Angular bundle for everything else.
main serves the application: the generated resource API behind browser sessions, and the console's built Angular bundle for everything else.
impulse/internal/skeleton/_candidates/tenanted/app
Package app contains the application's http handlers.
Package app contains the application's http handlers.
impulse/internal/skeleton/_candidates/tenanted/cmd/bootstrap command
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check), seeds the development tenants, and creates the development logins.
Package main bootstraps a development database in a Spanner emulator: it creates the instance and database, runs the deployment's steps (the schema migrations, then the role policy check), seeds the development tenants, and creates the development logins.
impulse/internal/skeleton/_candidates/tenanted/cmd/deployment/migrate command
Package main is the deployment's migration step: it applies the schema migrations, checks the release's role policy against what the permission engine's store holds, and seeds the staff auth's first administrator while its users table holds no rows.
Package main is the deployment's migration step: it applies the schema migrations, checks the release's role policy against what the permission engine's store holds, and seeds the staff auth's first administrator while its users table holds no rows.
impulse/internal/skeleton/_candidates/tenanted/cmd/generate
Package generate produces all generated code for the application.
Package generate produces all generated code for the application.
impulse/internal/skeleton/_candidates/tenanted/cmd/generate/internal/regen
Package regen serializes the tests that regenerate the tree.
Package regen serializes the tests that regenerate the tree.
impulse/internal/skeleton/_candidates/tenanted/cmd/generate/resourcegenerator command
Package main is the application's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
Package main is the application's generate program: it runs the resource generator generator.go declares (newGenerator) and prints what a successful run raised, one line each, to standard error with a fixed prefix and no timestamp, so a tool that reads the lines has one contract per prefix.
impulse/internal/skeleton/_candidates/tenanted/pkg/auth/staff
Package staff is the staff auth: the people who sign in to the console with a password, or with any Google account to create their own tenant, who hold their roles in the staff permission store.
Package staff is the staff auth: the people who sign in to the console with a password, or with any Google account to create their own tenant, who hold their roles in the staff permission store.
impulse/internal/skeleton/_candidates/tenanted/pkg/config
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
Package config loads the application's configuration from the environment and constructs the shared clients its processes depend on.
impulse/internal/skeleton/_candidates/tenanted/pkg/deploy
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
Package deploy holds the database steps a deployment runs and the development bootstrap reuses: applying the schema migrations, checking the release's role policy against what the permission engine's store holds, seeding each auth's first administrator while its users table holds no rows, and bringing the feature flags to the release's declarations.
impulse/internal/skeleton/_candidates/tenanted/pkg/resources
Package resources provides the application's resource types.
Package resources provides the application's resource types.
impulse/internal/skeleton/_candidates/tenanted/pkg/router
Package router serves the application.
Package router serves the application.
impulse/internal/transition
Package transition holds the changes impulse add makes to an application: the half of each option that files and source edits do reliably, applied before the rest is handed to an agent with the failing checks as its obligations.
Package transition holds the changes impulse add makes to an application: the half of each option that files and source edits do reliably, applied before the rest is handed to an agent with the failing checks as its obligations.
db
Implements tooling to start a Firestore emulator for running integration tests against.
Implements tooling to start a Firestore emulator for running integration tests against.
internal/runner
Package runner applies migration files to a database and keeps the version table that says how far they got.
Package runner applies migration files to a database and keeps the version table that says how far they got.
Package deployhook is the contract between an application's hooks program and the deploy pipeline bedrock renders for it.
Package deployhook is the contract between an application's hooks program and the deploy pipeline bedrock renders for it.
Package generation provides tools for generating resource-driven API boilerplate in Go & TypeScript based on Go structures and a Spanner DB schema.
Package generation provides tools for generating resource-driven API boilerplate in Go & TypeScript based on Go structures and a Spanner DB schema.
internal/cache
Package cache provides a thread-safe key-value interface for persisting data to disk.
Package cache provides a thread-safe key-value interface for persisting data to disk.
internal/gomod
Package gomod reads the module path and root of the application being generated from the nearest go.mod.
Package gomod reads the module path and root of the application being generated from the nearest go.mod.
parser
Package parser is a simplified abstraction over go/parser, tailored for the go:generate resource/generation tool.
Package parser is a simplified abstraction over go/parser, tailored for the go:generate resource/generation tool.
parser/genlang
Package genlang provides parsing for godoc comment annotations
Package genlang provides parsing for godoc comment annotations
Package httpio handles encoding and decoding for http i/o.
Package httpio handles encoding and decoding for http i/o.
Package logger is an HTTP request logger that implements correlated logging to one of several supported platforms.
Package logger is an HTTP request logger that implements correlated logging to one of several supported platforms.
Package persona is the persona sign-in a host application offers the test environments of the applications it knows: an OpenID Connect provider that signs a person in as one of the personas an application's deploy registered, after the host has signed the person in and said they may enter that application.
Package persona is the persona sign-in a host application offers the test environments of the applications it knows: an OpenID Connect provider that signs a person in as one of the personas an application's deploy registered, after the host has signed the person in and said they may enter that application.
spannerstore
Package spannerstore keeps the persona sign-in's state in the host application's Spanner database, in the tables the migrations under schema/spanner/migrations create.
Package spannerstore keeps the persona sign-in's state in the host application's Spanner database, in the tables the migrations under schema/spanner/migrations create.
Package resource provides a set of types and functions for working with resources.
Package resource provides a set of types and functions for working with resources.
database/postgres
Package postgres is the PostgreSQL database driver: from the variables it declares, it opens a connection pool on the application's database and the resource client over it.
Package postgres is the PostgreSQL database driver: from the variables it declares, it opens a connection pool on the application's database and the resource client over it.
database/postgres/declaration
Package declaration publishes the declaration of the PostgreSQL database driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what postgres.Settings declares, in the shape the cloud package defines.
Package declaration publishes the declaration of the PostgreSQL database driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what postgres.Settings declares, in the shape the cloud package defines.
database/spanner
Package spanner is the Spanner database driver: from the variables it declares, it opens the application's database, the Spanner client over it and the resource client the generated handlers read and write through.
Package spanner is the Spanner database driver: from the variables it declares, it opens the application's database, the Spanner client over it and the resource client the generated handlers read and write through.
database/spanner/declaration
Package declaration publishes the declaration of the Spanner database driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what spanner.Settings declares, in the shape the cloud package defines.
Package declaration publishes the declaration of the Spanner database driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what spanner.Settings declares, in the shape the cloud package defines.
filestore
Package filestore holds the framework's file stores: the stores an application's uploaded files live in, opened from one URL per store.
Package filestore holds the framework's file stores: the stores an application's uploaded files live in, opened from one URL per store.
internal/declarationtest
Package declarationtest holds a driver's settings declaration to its settings struct, for the drivers' tests: the live, job and database drivers each publish a declaration in the package beside them, and each driver's test calls Hold on it, as the cloud driver's test does on its own, so a field renamed, retagged or re-documented without the declaration following fails in the resource module and never only in a tool reading it.
Package declarationtest holds a driver's settings declaration to its settings struct, for the drivers' tests: the live, job and database drivers each publish a declaration in the package beside them, and each driver's test calls Hold on it, as the cloud driver's test does on its own, so a field renamed, retagged or re-documented without the declaration following fails in the resource module and never only in a tool reading it.
jobs
Package jobs is the seam between the application's scheduled methods and its job process: Starter, which starts one execution of the job with the command's arguments.
Package jobs is the seam between the application's scheduled methods and its job process: Starter, which starts one execution of the job with the command's arguments.
jobs/cloudrun
Package cloudrun is the Cloud Run job driver: from the variable it declares, it names the job process of this build and starts its executions through the Cloud Run Admin API.
Package cloudrun is the Cloud Run job driver: from the variable it declares, it names the job process of this build and starts its executions through the Cloud Run Admin API.
jobs/cloudrun/declaration
Package declaration publishes the declaration of the Cloud Run job driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what cloudrun.Settings declares, in the shape the cloud package defines.
Package declaration publishes the declaration of the Cloud Run job driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what cloudrun.Settings declares, in the shape the cloud package defines.
live
Package live is the server side of live pages: a page that asked for a live list or a live row stays current without polling and without refetching while nothing changed, and a page mounted again inside a short window is served by the browser with no request.
Package live is the server side of live pages: a page that asked for a live list or a live row stays current without polling and without refetching while nothing changed, and a page mounted again inside a short window is served by the browser with no request.
live/firestore
Package firestore is the Firestore implementation of the live service: the subscription record in one server-owned collection, the change sets under each user's document, the browser's identity as a Firebase custom token, and the application's signals in one server-owned document with a field per kind, which this instance's one snapshot listener watches.
Package firestore is the Firestore implementation of the live service: the subscription record in one server-owned collection, the change sets under each user's document, the browser's identity as a Firebase custom token, and the application's signals in one server-owned document with a field per kind, which this instance's one snapshot listener watches.
live/firestore/declaration
Package declaration publishes the declaration of the Firestore live driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what firestore.Settings declares, in the shape the cloud package defines.
Package declaration publishes the declaration of the Firestore live driver's settings struct for the tools that read an application embedding it without loading its packages (impulse's checks, bedrock's stack): what firestore.Settings declares, in the shape the cloud package defines.
maintenance
Package maintenance is what an application serves while it is down for maintenance: a revision the deploy pipeline starts with the maintenance variable set, before a release that replaces or interrupts the database, so that the people using the application see a maintenance page instead of errors while the database is away.
Package maintenance is what an application serves while it is down for maintenance: a revision the deploy pipeline starts with the maintenance variable set, before a release that replaces or interrupts the database, so that the people using the application see a maintenance page instead of errors while the database is away.
scheduled
Package scheduled is the framework's side of a scheduled route: a method the application declares with @schedule, which Cloud Scheduler calls on its schedule.
Package scheduled is the framework's side of a scheduled route: a method the application declares with @schedule, which Cloud Scheduler calls on its schedule.
server
Package server starts the HTTP server an application runs behind, speaking HTTP/1.1 and unencrypted HTTP/2 (h2c) on one listener.
Package server starts the HTTP server an application runs behind, speaking HTTP/1.1 and unencrypted HTTP/2 (h2c) on one listener.
sessionusers
Package sessionusers adapts the session library's user API to the resource package's account store (resource.UserAccounts), so an application hands its Auth's users to the user-management surface in one line: resource.NewUserSurface[router.CrewAuth]( sessionusers.Accounts(crewAuth.API()), engine.UserManager()).
Package sessionusers adapts the session library's user API to the resource package's account store (resource.UserAccounts), so an application hands its Auth's users to the user-management surface in one line: resource.NewUserSurface[router.CrewAuth]( sessionusers.Accounts(crewAuth.API()), engine.UserManager()).
shipped
Package shipped is the handshake between a machine outlet and the installed copies of the programs a release ships through it: the route the outlet serves the compiled programs at, the header that carries each file's checksum, and the release header every answer of the outlet already carries.
Package shipped is the handshake between a machine outlet and the installed copies of the programs a release ships through it: the route the outlet serves the compiled programs at, the header that carries each file's checksum, and the release header every answer of the outlet already carries.
Package securehash provides a secure and easy way to hash and compare secrets.
Package securehash provides a secure and easy way to hash and compare secrets.
Package session provides cookie-backed sessions for web applications.
Package session provides cookie-backed sessions for web applications.
azure
Package azure is the Microsoft Entra ID (Azure) sign-in method: the OpenID Connect authorization code flow with PKCE against the tenants the registration admits, and its registration on an Auth session.
Package azure is the Microsoft Entra ID (Azure) sign-in method: the OpenID Connect authorization code flow with PKCE against the tenants the registration admits, and its registration on an Auth session.
cookie
Package cookie provides cookie encryption using PASETO
Package cookie provides cookie encryption using PASETO
deviceflow
Package deviceflow signs a command-line program in to an impulse application's machine outlet through the device flow (RFC 8628) the session library serves, keeps the token pair in the person's configuration directory, and hands the program an http.Client that carries the access token and refreshes it.
Package deviceflow signs a command-line program in to an impulse application's machine outlet through the device flow (RFC 8628) the session library serves, keeps the token pair in the person's configuration directory, and hands the program an http.Client that carries the access token and refreshes it.
google
Package google is the Google Workspace sign-in method: the OpenID Connect authorization code flow with PKCE (Proof Key for Code Exchange), restricted to the Workspaces the registration admits and keyed by the connection the slot selects for the account.
Package google is the Google Workspace sign-in method: the OpenID Connect authorization code flow with PKCE (Proof Key for Code Exchange), restricted to the Workspaces the registration admits and keyed by the connection the slot selects for the account.
internal/attempts
Package attempts limits the failed password attempts of an Auth.
Package attempts limits the failed password attempts of an Auth.
internal/basesession
Package basesession implements the session management for the application.
Package basesession implements the session management for the application.
internal/cookie
Package cookie implements all cookie handling for the session package
Package cookie implements all cookie handling for the session package
internal/dbtype
Package dbtype contains types used by the database driver packages for session storage.
Package dbtype contains types used by the database driver packages for session storage.
internal/oidctest
Package oidctest holds the test doubles the OIDC authenticator tests share: a minimal identity provider that signs real ID tokens, and a cookie client with a fresh key.
Package oidctest holds the test doubles the OIDC authenticator tests share: a minimal identity provider that signs real ID tokens, and a cookie client with a fresh key.
internal/sessioncore
Package sessioncore is what the session types are built from: the base session over the storage and the cookie client, the options every session type takes, session establishment, the API methods every session type shares, impersonation establishment and its guards, the custom data type checks, the password comparison and the login refusal redirect.
Package sessioncore is what the session types are built from: the base session over the storage and the cookie client, the options every session type takes, session establishment, the API methods every session type shares, impersonation establishment and its guards, the custom data type checks, the password comparison and the login refusal redirect.
internal/signinflow
Package signinflow establishes the session of an Auth sign-in over a storage driver: it resolves the identity's user, decides the sign-in and inserts the session, once for every driver, generic over the driver's transaction type.
Package signinflow establishes the session of an Auth sign-in over a storage driver: it resolves the identity's user, decides the sign-in and inserts the session, once for every driver, generic over the driver's transaction type.
internal/simulated
Package simulated is the development build's simulated sign-in: under the skipAuth build tag the Azure and Google methods contact no provider and take who signed in, and which roles they hold, from the environment.
Package simulated is the development build's simulated sign-in: under the skipAuth build tag the Azure and Google methods contact no provider and take who signed in, and which roles they hold, from the environment.
internal/testkey
Package testkey holds the one cookie master key the test suites share.
Package testkey holds the one cookie master key the test suites share.
internal/util
Package util is used for general utility function such as generic sorting/filtering and more.
Package util is used for general utility function such as generic sorting/filtering and more.
internal/workos
Package workos is the WorkOS SSO sign-in method: a client for the Standalone SSO authorization code flow.
Package workos is the WorkOS SSO sign-in method: a client for the Standalone SSO authorization code flow.
mail
Package mail is how the session library sends mail: the invitation a tenant's administrator sends to an address, the link that verifies an address a person adds or changes, and the link a password sign-up starts from.
Package mail is how the session library sends mail: the invitation a tenant's administrator sends to an address, the link that verifies an address a person adds or changes, and the link a password sign-up starts from.
mail/workspace
Package workspace sends the session library's mail through the Google Workspace SMTP relay: a plain mail submission to smtp-relay.gmail.com on port 587 over TLS, which Google Cloud's compute products allow (they block port 25, the port a mail server of our own would need), authenticated as one mailbox of the organization's Workspace domain with an app password.
Package workspace sends the session library's mail through the Google Workspace SMTP relay: a plain mail submission to smtp-relay.gmail.com on port 587 over TLS, which Google Cloud's compute products allow (they block port 25, the port a mail server of our own would need), authenticated as one mailbox of the organization's Workspace domain with an app password.
mock
Package mock is used to generate mock files for testing.
Package mock is used to generate mock files for testing.
mock/mock_azure
Package mock_azure is a generated GoMock package.
Package mock_azure is a generated GoMock package.
mock/mock_cookie
Package mock_cookie is a generated GoMock package.
Package mock_cookie is a generated GoMock package.
mock/mock_google
Package mock_google is a generated GoMock package.
Package mock_google is a generated GoMock package.
mock/mock_oidc
Package mock_oidc is a generated GoMock package.
Package mock_oidc is a generated GoMock package.
mock/mock_session
Package mock_session is a generated GoMock package.
Package mock_session is a generated GoMock package.
mock/mock_signin
Package mock_signin is a generated GoMock package.
Package mock_signin is a generated GoMock package.
oidc
Package oidc is the OpenID Connect machinery the identity provider packages build on: the provider loader (discovery), the authorization code flow with PKCE and the state cookie, and the claims decoding.
Package oidc is the OpenID Connect machinery the identity provider packages build on: the provider loader (discovery), the authorization code flow with PKCE and the state cookie, and the claims decoding.
sessioninfo
Package sessioninfo handles session information.
Package sessioninfo handles session information.
sessionstorage
Package sessionstorage implements database storage for session data.
Package sessionstorage implements database storage for session data.
sessionstorage/internal/drivertest
Package drivertest is the conformance suite the PostgreSQL and Spanner drivers share.
Package drivertest is the conformance suite the PostgreSQL and Spanner drivers share.
sessionstorage/internal/postgres
Package postgres implements the session storage driver for PostgreSQL.
Package postgres implements the session storage driver for PostgreSQL.
sessionstorage/internal/spanner
Package spanner provides the session storage driver for Spanner.
Package spanner provides the session storage driver for Spanner.
sessionstorage/mock/mock_sessionstorage
Package mock_sessionstorage is a generated GoMock package.
Package mock_sessionstorage is a generated GoMock package.
signin
Package signin is the contract between the Auth session and a sign-in method.
Package signin is the contract between the Auth session and a sign-in method.
Package scan allows scanning data into Go structs and other composite types, when working with spanner library native interface.
Package scan allows scanning data into Go structs and other composite types, when working with spanner library native interface.
spxapi
package spxapi implements the core logic of the API type and exposes the functionality available in the package.
package spxapi implements the core logic of the API type and exposes the functionality available in the package.
Package tracer provides convenience functions for OpenTelemetry tracing.
Package tracer provides convenience functions for OpenTelemetry tracing.

Jump to

Keyboard shortcuts

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