karbur

module
v0.0.0-...-d4212fa Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: BSD-3-Clause

README

karbur

Local Development

Requirements
Setup

You may initialize your local environment for developing this package with the following command, executed in the root of the repository:

$ ./_scripts/env_init.bash
$ ./_scripts/db_init.bash
$ ./_scripts/cert_init.bash
Environment Variables

A direnv-managed .envrc file should exist at the root of the repository, although that file is not version-controlled. The env_init.bash script creates it with default values. Required variables are (values may be adjusted as needed):

  • PGPASSFILE=$(pwd)/_db/secrets/pgpass
  • PGHOST=localhost
  • PGPORT=5432
  • PGCONNECT_TIMEOUT=10
  • PGUSER=postgres
  • PGDATABASE=postgres
  • PGSSLMODE=prefer

Extra variables are required for the TLS tests, created automatically by the cert_init.bash script:

  • KARBUR_TEST_LOCALHOST_CERT=$(pwd)/_certs/cert.pem
  • KARBUR_TEST_LOCALHOST_KEY=$(pwd)/_certs/key.pem

License

The BSD 3-Clause license.

Directories

Path Synopsis
Package accounts provides a substantial implementation of the security-sensitive and often subtle flows related to accounts: registration and deletion, login and logout, reset password, verify and change email, and a simple group-based authorization mechanism.
Package accounts provides a substantial implementation of the security-sensitive and often subtle flows related to accounts: registration and deletion, login and logout, reset password, verify and change email, and a simple group-based authorization mechanism.
acctctx
Package acctctx provides type-safe access to account-related values stored in the context.
Package acctctx provides type-safe access to account-related values stored in the context.
acctmw
Package acctmw provides a substantial implementation of the security-sensitive and often subtle flows related to accounts: registration and deletion, login and logout, reset password, verify and change email, and a simple group-based authorization mechanism.
Package acctmw provides a substantial implementation of the security-sensitive and often subtle flows related to accounts: registration and deletion, login and logout, reset password, verify and change email, and a simple group-based authorization mechanism.
Package ctxvals provides type-safe functions to store and access values in the context.
Package ctxvals provides type-safe functions to store and access values in the context.
Package errors provides functions and types to define and manipulate errors.
Package errors provides functions and types to define and manipulate errors.
Package pgdb streamlines the database API by exposing only the context-aware version of methods and enhances querying by supporting scanning into structs and slices.
Package pgdb streamlines the database API by exposing only the context-aware version of methods and enhances querying by supporting scanning into structs and slices.
migrate
Package migrate implements a postgresql database migrations runner based on pgdb.
Package migrate implements a postgresql database migrations runner based on pgdb.
pgxadapt
Package pgxadapt provides functions to adapt types specific for the pgx postgresql driver to the common abstract database interfaces.
Package pgxadapt provides functions to adapt types specific for the pgx postgresql driver to the common abstract database interfaces.
sqladapt
Package sqladapt provides functions to adapt types for the stdlib's database/sql package to the common abstract database interfaces.
Package sqladapt provides functions to adapt types for the stdlib's database/sql package to the common abstract database interfaces.
testdb
Package testdb provides functions to test a pgdb project using a real, non-mocked but isolated test database.
Package testdb provides functions to test a pgdb project using a real, non-mocked but isolated test database.
Package server defines an HTTP server that helps build a production-ready, hardened Go http server with optional graceful shutdown and automatic TLS certificates.
Package server defines an HTTP server that helps build a production-ready, hardened Go http server with optional graceful shutdown and automatic TLS certificates.
middleware
Package middleware provides middleware commonly-required for Web servers.
Package middleware provides middleware commonly-required for Web servers.
params
Package params implements a decoder of HTTP parameters from the query string, path parameters and request body into a struct.
Package params implements a decoder of HTTP parameters from the query string, path parameters and request body into a struct.
webpages
Package webpages parses templates used to render pages.
Package webpages parses templates used to render pages.
Package tokens implements a random, secure and time-limited token generator that helps implement common features like session IDs (multi-use, long-lived), password resets and verify email (single-use, short-lived) scenarios.
Package tokens implements a random, secure and time-limited token generator that helps implement common features like session IDs (multi-use, long-lived), password resets and verify email (single-use, short-lived) scenarios.

Jump to

Keyboard shortcuts

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