Help us shape the future of Go! Take the 2026 Go Developer Survey

internal/

directory
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: AGPL-3.0

Directories

Path Synopsis
admin
Package auth contains shared auth primitives used across the auth surface (handlers, middleware, services).
Package auth contains shared auth primitives used across the auth surface (handlers, middleware, services).
audit
Package audit writes structured rows into the auth_audit_log table for security-relevant events.
Package audit writes structured rows into the auth_audit_log table for security-relevant events.
email
Package email is the transactional-email layer for the auth surface.
Package email is the transactional-email layer for the auth surface.
password
Package password implements argon2id password hashing with PHC-string encoding.
Package password implements argon2id password hashing with PHC-string encoding.
pat
Package pat owns personal-access-token minting, hashing, scope constants, and the auth-middleware verification path.
Package pat owns personal-access-token minting, hashing, scope constants, and the auth-middleware verification path.
policy
Package policy is the single source of truth for "who can do what".
Package policy is the single source of truth for "who can do what".
secretbox
Package secretbox is a thin AEAD wrapper used to protect at-rest secrets — currently TOTP secrets, future sprints will reuse it for per-user key material (PATs, deploy keys, etc.).
Package secretbox is a thin AEAD wrapper used to protect at-rest secrets — currently TOTP secrets, future sprints will reuse it for per-user key material (PATs, deploy keys, etc.).
session
Package session owns the cookie-based session pipeline.
Package session owns the cookie-based session pipeline.
sshkey
Package sshkey wraps the parsing, validation, and fingerprinting of user-supplied SSH public keys.
Package sshkey wraps the parsing, validation, and fingerprinting of user-supplied SSH public keys.
throttle
Package throttle implements counter-based rate limiting for the auth surface, backed by the auth_throttle table.
Package throttle implements counter-based rate limiting for the auth surface, backed by the auth_throttle table.
token
Package token mints high-entropy random tokens and stores their sha256 hashes.
Package token mints high-entropy random tokens and stores their sha256 hashes.
totp
Package totp implements RFC 6238 TOTP (time-based one-time password) enrollment and verification.
Package totp implements RFC 6238 TOTP (time-based one-time password) enrollment and verification.
Package avatars owns avatar resolution for shithub user profiles.
Package avatars owns avatar resolution for shithub user profiles.
cache
lru
Package lru is an in-process least-recently-used cache with optional TTL + singleflight wrapping.
Package lru is an in-process least-recently-used cache with optional TTL + singleflight wrapping.
Package checks owns CI check-suite + check-run orchestration.
Package checks owns CI check-suite + check-run orchestration.
git
hooks
Package hooks owns the bare-repo hook installation contract used by the push pipeline (S14).
Package hooks owns the bare-repo hook installation contract used by the push pipeline (S14).
protocol
Package protocol carries the smart-HTTP and (later) smart-SSH bits of the git wire protocol that we generate ourselves.
Package protocol carries the smart-HTTP and (later) smart-SSH bits of the git wire protocol that we generate ourselves.
infra
config
Package config owns the layered configuration loader.
Package config owns the layered configuration loader.
db
Package db owns the Postgres connection lifecycle.
Package db owns the Postgres connection lifecycle.
errrep
Package errrep wires the Sentry-protocol-compatible error reporter.
Package errrep wires the Sentry-protocol-compatible error reporter.
log
Package log builds the slog handler the rest of the binary uses.
Package log builds the slog handler the rest of the binary uses.
metrics
Package metrics owns the Prometheus registry.
Package metrics owns the Prometheus registry.
storage
Package storage provides shithub's storage abstractions:
Package storage provides shithub's storage abstractions:
tracing
Package tracing wires the OpenTelemetry SDK and exposes a small HTTP-middleware helper.
Package tracing wires the OpenTelemetry SDK and exposes a small HTTP-middleware helper.
Package issues owns the issue + comment + label + milestone domain logic.
Package issues owns the issue + comment + label + milestone domain logic.
Package markdown is shithub's canonical markdown rendering pipeline.
Package markdown is shithub's canonical markdown rendering pipeline.
extensions
Package extensions hosts the AST transformer that adds shithub- specific inline patterns (`@user`, `#N`, `owner/repo#N`, commit SHAs, emoji shortcodes) to Goldmark's parsed text without ever touching the contents of code blocks or inline code.
Package extensions hosts the AST transformer that adds shithub- specific inline patterns (`@user`, `#N`, `owner/repo#N`, commit SHAs, emoji shortcodes) to Goldmark's parsed text without ever touching the contents of code blocks or inline code.
meta
Package migrationsfs embeds the SQL migrations from the repo root and registers them with the db package.
Package migrationsfs embeds the SQL migrations from the repo root and registers them with the db package.
Package notif owns S29's notification fan-out: consume from `domain_events`, compute the recipient set per the routing matrix, materialize inbox rows + email-side dispatch.
Package notif owns S29's notification fan-out: consume from `domain_events`, compute the recipient set per the routing matrix, materialize inbox rows + email-side dispatch.
Package orgs owns the organization domain: create, members, invitations, suspend/restore, soft-delete, and the principals resolver that unifies /{slug} routing across users + orgs.
Package orgs owns the organization domain: create, members, invitations, suspend/restore, soft-delete, and the principals resolver that unifies /{slug} routing across users + orgs.
pagination
keyset
Package keyset implements opaque keyset-pagination cursors.
Package keyset implements opaque keyset-pagination cursors.
Package passwords exposes the embedded common-password blocklist used at signup and password-reset to reject the most-prevalent passwords.
Package passwords exposes the embedded common-password blocklist used at signup and password-reset to reject the most-prevalent passwords.
Package pulls owns the pull-request orchestrator.
Package pulls owns the pull-request orchestrator.
review
Package review owns PR-review orchestration: inline comments, review submission with attached pending comments, dismissal, reviewer requests, thread resolution, and the required-reviews gate consulted by the merge handler.
Package review owns PR-review orchestration: inline comments, review submission with attached pending comments, dismissal, reviewer requests, thread resolution, and the required-reviews gate consulted by the merge handler.
Package ratelimit owns the cross-surface counter used by S35's rate-limit middleware.
Package ratelimit owns the cross-surface counter used by S35's rate-limit middleware.
Package repos owns repository creation, validation, and identity.
Package repos owns repository creation, validation, and identity.
diff/parse
Package parse wraps go-gitdiff.
Package parse wraps go-gitdiff.
diff/render
Package render produces HTML for parsed diffs.
Package render produces HTML for parsed diffs.
diff/source
Package source produces raw git-diff patch bytes for the parser.
Package source produces raw git-diff patch bytes for the parser.
finder
Package finder implements the "Go to file" fuzzy match used by the /find/{ref} endpoint.
Package finder implements the "Go to file" fuzzy match used by the /find/{ref} endpoint.
fork
Package fork owns S27's fork orchestration.
Package fork owns S27's fork orchestration.
git
Package git wraps the git plumbing commands we need to build the optional initial commit on a freshly-init'd bare repo.
Package git wraps the git plumbing commands we need to build the optional initial commit on a freshly-init'd bare repo.
highlight
Package highlight wraps Chroma so the rest of the project doesn't import it directly.
Package highlight wraps Chroma so the rest of the project doesn't import it directly.
identity
Package identity resolves a commit author's email to a shithub user.
Package identity resolves a commit author's email to a shithub user.
lifecycle
Package lifecycle owns the post-creation mutations of a repo: rename, transfer, archive/unarchive, visibility flip, soft-delete, restore, and hard-delete.
Package lifecycle owns the post-creation mutations of a repo: rename, transfer, archive/unarchive, visibility flip, soft-delete, restore, and hard-delete.
protection
Package protection enforces branch-protection rules on incoming pushes.
Package protection enforces branch-protection rules on incoming pushes.
templates
Package templates embeds the curated set of license, gitignore, and README templates offered by the repo-creation form.
Package templates embeds the curated set of license, gitignore, and README templates offered by the repo-creation form.
Package search owns S28's search surface.
Package search owns S28's search surface.
security
openredirect
Package openredirect validates `next=` style redirect targets so a crafted query parameter can't bounce a logged-in user off-host (the canonical phishing primitive).
Package openredirect validates `next=` style redirect targets so a crafted query parameter can't bounce a logged-in user off-host (the canonical phishing primitive).
ssrf
Package ssrf is the canonical SSRF-defense layer (S35).
Package ssrf is the canonical SSRF-defense layer (S35).
Package social owns S26's stars / watches / events surface.
Package social owns S26's stars / watches / events surface.
testing
dbtest
Package dbtest provides a parallel-safe test database harness.
Package dbtest provides a parallel-safe test database harness.
users
Package version exposes build-time information embedded via -ldflags.
Package version exposes build-time information embedded via -ldflags.
web
Package web boots the shithub HTTP server.
Package web boots the shithub HTTP server.
handlers
Package handlers registers HTTP handlers on the web server's mux.
Package handlers registers HTTP handlers on the web server's mux.
handlers/admin
Package admin owns the /admin/* surface — the operator dashboard for users/orgs/repos/jobs/audit/system management.
Package admin owns the /admin/* surface — the operator dashboard for users/orgs/repos/jobs/audit/system management.
handlers/api
Package api owns shithub's PAT-authenticated HTTP API surface.
Package api owns shithub's PAT-authenticated HTTP API surface.
handlers/auth
Package auth wires the email/password auth handlers (signup, login, logout, password reset, email verification) onto the chi router.
Package auth wires the email/password auth handlers (signup, login, logout, password reset, email verification) onto the chi router.
handlers/githttp
Package githttp wires the smart-HTTP git protocol routes: info/refs + git-upload-pack + git-receive-pack.
Package githttp wires the smart-HTTP git protocol routes: info/refs + git-upload-pack + git-receive-pack.
handlers/notifications
Package notifications wires the S29 notification web surface:
Package notifications wires the S29 notification web surface:
handlers/orgs
Package orgs wires the S30 organization web surface:
Package orgs wires the S30 organization web surface:
handlers/profile
Package profile owns the read-only public profile handlers: /{username} and /avatars/{username}.
Package profile owns the read-only public profile handlers: /{username} and /avatars/{username}.
handlers/repo
Package repo wires the HTTP handlers for repository creation and the (placeholder) repo home page.
Package repo wires the HTTP handlers for repository creation and the (placeholder) repo home page.
handlers/search
Package search wires the S28 web search surface.
Package search wires the S28 web search surface.
middleware
Package middleware provides shithub's HTTP middleware stack.
Package middleware provides shithub's HTTP middleware stack.
render
Package render owns the html/template loading and rendering pipeline.
Package render owns the html/template loading and rendering pipeline.
Package worker drives the Postgres-backed job queue introduced in S14.
Package worker drives the Postgres-backed job queue introduced in S14.
jobs
Package jobs holds the concrete worker handlers wired into the pool at boot.
Package jobs holds the concrete worker handlers wired into the pool at boot.

Jump to

Keyboard shortcuts

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