app

package
v0.0.0-...-3a0d94f Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const MaxImportBodyBytes int64 = 1 << 30

Variables

View Source
var BasePath = "/directory"
View Source
var ConnectionString = cmp.Or(os.Getenv("DATABASE_URL"), "postgresql://postgres:directory@localhost:54322/directory")
View Source
var Host = cmp.Or(os.Getenv("HOST"), "localhost")
View Source
var MigrationsFolder = "file://migrations"
View Source
var Port = cmp.Or(os.Getenv("HTTP_PORT"), "8086")

Functions

func ImportBodyLimitMiddleware

func ImportBodyLimitMiddleware(maxBytes int64, next http.Handler) http.Handler

func InitDbPool

func InitDbPool() *pgxpool.Pool

func InitHandler

func InitHandler(ctx context.Context, dbpool *pgxpool.Pool) http.Handler

func RunMigrateScripts

func RunMigrateScripts() (resultErr error)

RunMigrateScripts applies the Directory migrations and closes the migration resources. Initialization, application, and cleanup failures are returned to the caller.

func StartApp

func StartApp(ctx context.Context, dbpool *pgxpool.Pool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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