internal/

directory
v0.0.0-...-79b1474 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT

Directories

Path Synopsis
auth
argon2id
Package argon2id implements password hashing for Story 10.1.
Package argon2id implements password hashing for Story 10.1.
authz
Package authz is Maktaba's permission decision point (Story 10.13).
Package authz is Maktaba's permission decision point (Story 10.13).
cloudlink
Package cloudlink is the home's side of linked accounts (Epic 42 story 42.7): a home user links a Maktaba Cloud account, and that account can then sign in to this home through the cloud.
Package cloudlink is the home's side of linked accounts (Epic 42 story 42.7): a home user links a Maktaba Cloud account, and that account can then sign in to this home through the cloud.
cloudlink/cloudlinktest
Package cloudlinktest signs home assertions the way the cloud does (cloud/internal/homeassert), for the home's tests.
Package cloudlinktest signs home assertions the way the cloud does (cloud/internal/homeassert), for the home's tests.
jwt
Package jwt is a small RS256-only JWT issuer/verifier on top of internal/auth/keys.
Package jwt is a small RS256-only JWT issuer/verifier on top of internal/auth/keys.
keys
Package keys owns the RS256 key material used to mint and verify Maktaba access tokens (Story 10.6).
Package keys owns the RS256 key material used to mint and verify Maktaba access tokens (Story 10.6).
middleware
Package middleware wires authentication into the HTTP request pipeline.
Package middleware wires authentication into the HTTP request pipeline.
pat
Package pat implements personal access tokens (web-pages-batch2, slot 0071): long-lived bearer credentials a user creates for scripts, CI, and the CLI.
Package pat implements personal access tokens (web-pages-batch2, slot 0071): long-lived bearer credentials a user creates for scripts, CI, and the CLI.
principal
Package principal carries the authenticated identity through a request lifecycle.
Package principal carries the authenticated identity through a request lifecycle.
refresh
Package refresh implements Stories 10.3 (issue) and 10.4 (rotate / detect reuse) for opaque refresh tokens.
Package refresh implements Stories 10.3 (issue) and 10.4 (rotate / detect reuse) for opaque refresh tokens.
securityaudit
Package securityaudit implements Story 10.16's vocabulary and write/read paths over the canonical `audit_log` table (slot 0036).
Package securityaudit implements Story 10.16's vocabulary and write/read paths over the canonical `audit_log` table (slot 0036).
serverkeys
Package serverkeys owns the long-lived Ed25519 keypair that identifies a Maktaba Server to its federation peers, the cloud relay, and any consumer that needs to verify signatures originating from "this exact box."
Package serverkeys owns the long-lived Ed25519 keypair that identifies a Maktaba Server to its federation peers, the cloud relay, and any consumer that needs to verify signatures originating from "this exact box."
sessions
Package sessions implements Story 10.2's `web_sessions` persistence layer (slot 0050).
Package sessions implements Story 10.2's `web_sessions` persistence layer (slot 0050).
signedurl
Package signedurl is the API's signed-URL minter for the streaming service (Story 10.8; verified by Epic 8 Story 8.1's middleware).
Package signedurl is the API's signed-URL minter for the streaming service (Story 10.8; verified by Epic 8 Story 8.1's middleware).
users
Package users implements Story 10.1's persistence layer for the `users` table (slot 0029).
Package users implements Story 10.1's persistence layer for the `users` table (slot 0029).
Package broadcast is the home's side of home broadcasting (Epic 50 story 50.22): the Broadcast page's API (Admin → Live TV → Broadcast), the six publish checks, the uplink rule, the encoder slots, the calls to Maktaba Cloud through the relay agent (which alone holds the home's server secret) and the hourly ingest-token refresh.
Package broadcast is the home's side of home broadcasting (Epic 50 story 50.22): the Broadcast page's API (Admin → Live TV → Broadcast), the six publish checks, the uplink rule, the encoder slots, the calls to Maktaba Cloud through the relay agent (which alone holds the home's server secret) and the hourly ingest-token refresh.
Package broadcastaccess is the home's side of who may watch its broadcast channels (Epic 50 story 50.26): each channel's access (invite or open), the home's viewer limits, its invite links and codes and the devices on each invite.
Package broadcastaccess is the home's side of who may watch its broadcast channels (Epic 50 story 50.26): each channel's access (invite or open), the home's viewer limits, its invite links and codes and the devices on each invite.
Package castgrant is the cast grant (Epic 58 story 58.07): the credential a signed-in sender (the Android Player, the Apple Player, the web) mints for Maktaba's Cast receiver, so the TV reports progress, renews its stream URLs and walks a play queue by itself, without the person's own token.
Package castgrant is the cast grant (Epic 58 story 58.07): the credential a signed-in sender (the Android Player, the Apple Player, the web) mints for Maktaba's Cast receiver, so the TV reports progress, renews its stream URLs and walks a play queue by itself, without the person's own token.
Package client says which app sent a request (Epic 44 story 44.2).
Package client says which app sent a request (Epic 44 story 44.2).
Package cluster is the home side of multi-instance Maktaba (Epic 31, specs/epics/31-multi-instance/design.md): the join cryptography (§3.2), the instance identity and machine registry store (§4) and the database role provisioning for joined machines (§3.3).
Package cluster is the home side of multi-instance Maktaba (Epic 31, specs/epics/31-multi-instance/design.md): the join cryptography (§3.2), the instance identity and machine registry store (§4) and the database role provisioning for joined machines (§3.3).
agent
Package agent is the home's side of the cluster channel (Epic 31 phase 2, specs/epics/31-multi-instance/design-agent.md): the authenticated, encrypted WebSocket every Maktaba process holds to the home (/api/cluster/agent), the hub that keeps the live state of every connected process, the browser WebSocket (/api/cluster/ws), the history endpoints that read the cluster files on the share, the per-process commands and the LLM router with its OpenAI-compatible door.
Package agent is the home's side of the cluster channel (Epic 31 phase 2, specs/epics/31-multi-instance/design-agent.md): the authenticated, encrypted WebSocket every Maktaba process holds to the home (/api/cluster/agent), the hub that keeps the live state of every connected process, the browser WebSocket (/api/cluster/ws), the history endpoints that read the cluster files on the share, the per-process commands and the LLM router with its OpenAI-compatible door.
agent/relayfixture command
Command relayfixture is the home side of the extension relay's two-process test (pipeline/tests/cluster/test_relay_two_process.py): the real cluster hub with the real service door, on a scratch Postgres database, reading the node registry (cluster_nodes), rules.relay and the Plex extension's row and token (home_secrets) from it.
Command relayfixture is the home side of the extension relay's two-process test (pipeline/tests/cluster/test_relay_two_process.py): the real cluster hub with the real service door, on a scratch Postgres database, reading the node registry (cluster_nodes), rules.relay and the Plex extension's row and token (home_secrets) from it.
ca
Package ca is the home's cluster CA (Epic 35 story 35.16, design §18.2): a small ECDSA P-256 root, valid ten years, created by the home's API at its first start after the story.
Package ca is the home's cluster CA (Epic 35 story 35.16, design §18.2): a small ECDSA P-256 root, valid ten years, created by the home's API at its first start after the story.
cache
Package cache is the home database's cache of the cluster channel (specs/epics/31-multi-instance/design-agent.md §7.9).
Package cache is the home database's cache of the cluster channel (specs/epics/31-multi-instance/design-agent.md §7.9).
clustertest
Package clustertest gives the Epic 31 tests a scratch, fully migrated Postgres database.
Package clustertest gives the Epic 31 tests a scratch, fully migrated Postgres database.
delegation
Package delegation is how a full node acts for a user without ever reading the sessions table (Epic 35 story 35.9, design §10): every node → home HTTP request is signed with the node's delegation key, a per-node HMAC key the home issues over the cluster channel (`keys` frame), keeps sealed in home_secrets, rotates daily and deletes when the machine is revoked.
Package delegation is how a full node acts for a user without ever reading the sessions table (Epic 35 story 35.9, design §10): every node → home HTTP request is signed with the node's delegation key, a per-node HMAC key the home issues over the cluster channel (`keys` frame), keeps sealed in home_secrets, rotates daily and deletes when the machine is revoked.
homelink
Package homelink is a full node's way to the home (Epic 35 stories 35.9, 35.10): the session checks, the cluster sign-in's exchange, the home's JWKS, the home-class requests the node proxies, and the events the home pushes (a new delegation key, a revocation).
Package homelink is a full node's way to the home (Epic 35 stories 35.9, 35.10): the session checks, the cluster sign-in's exchange, the home's JWKS, the home-class requests the node proxies, and the events the home pushes (a new delegation key, a revocation).
homeproxy
Package homeproxy is a full node's reverse proxy to its home (Epic 35 story 35.10, design §11.2): every `home` route a node gets goes to the home's API with the user's session as X-Maktaba-Delegated-Session, the node's signature (story 35.9) and X-Maktaba-Via: node.
Package homeproxy is a full node's reverse proxy to its home (Epic 35 story 35.10, design §11.2): every `home` route a node gets goes to the home's API with the user's session as X-Maktaba-Delegated-Session, the node's signature (story 35.9) and X-Maktaba-Via: node.
link
Package link is the cluster link (Epic 35 story 35.16, design §18): machine-to-home traffic over WebSockets on mutual TLS, on the home API's existing port.
Package link is the cluster link (Epic 35 story 35.16, design §18): machine-to-home traffic over WebSockets on mutual TLS, on the home API's existing port.
linkctx
Package linkctx carries the cluster link's word on a request (Epic 35 story 35.16): which machine sent it over its mutual-TLS link, and the home's link mode.
Package linkctx carries the cluster link's word on a request (Epic 35 story 35.16): which machine sent it over its mutual-TLS link, and the home's link mode.
nodeauth
Package nodeauth resolves who is asking on a full node (Epic 35 story 35.9, design §10.3).
Package nodeauth resolves who is asking on a full node (Epic 35 story 35.9, design §10.3).
nodedb
Package nodedb is a full node's database (specs/epics/37-node-replica): one *sql.DB over two Postgres servers, this machine's own read-only copy of the home's database and the home's database itself.
Package nodedb is a full node's database (specs/epics/37-node-replica): one *sql.DB over two Postgres servers, this machine's own read-only copy of the home's database and the home's database itself.
nodemetrics
Package nodemetrics is a full node's Prometheus metrics (Epic 35 story 35.15 AC1), on the API's /metrics: the sessions it asks the home about (delegation, story 35.9), the requests it serves by placement class (story 35.10) and whether the schema guard paused it (story 35.8 AC4).
Package nodemetrics is a full node's Prometheus metrics (Epic 35 story 35.15 AC1), on the API's /metrics: the sessions it asks the home about (delegation, story 35.9), the requests it serves by placement class (story 35.10) and whether the schema guard paused it (story 35.8 AC4).
placement
Package placement says where each API route is served when the API runs on a full node (Epic 35 story 35.10, design §11.1):
Package placement says where each API route is served when the API runs on a full node (Epic 35 story 35.10, design §11.1):
relay
Package relay is the home's service door (story 31.R, design specs/epics/31-multi-instance/story-31-relay-service-door.md): a cluster node sends an extension's HTTP request over its sealed agent channel, and the home checks it against that extension's allow-list, adds the secret the node never sees (the Plex token, kept in home_secrets), forwards it to the configured server and streams the answer back with the secret scrubbed out of it.
Package relay is the home's service door (story 31.R, design specs/epics/31-multi-instance/story-31-relay-service-door.md): a cluster node sends an extension's HTTP request over its sealed agent channel, and the home checks it against that extension's allow-list, adds the secret the node never sees (the Plex token, kept in home_secrets), forwards it to the configured server and streams the answer back with the secret scrubbed out of it.
schemaguard
Package schemaguard is a full node's API schema guard (Epic 35 story 35.8, design §9.3): the same rule, table and reason texts as the pipeline's cluster/schema.py and the streaming node's streaming/internal/cluster/schema.go (Epic 31 design §5.1).
Package schemaguard is a full node's API schema guard (Epic 35 story 35.8, design §9.3): the same rule, table and reason texts as the pipeline's cluster/schema.py and the streaming node's streaming/internal/cluster/schema.go (Epic 31 design §5.1).
switchover
Package switchover runs a switch of the home from the home's API (specs/epics/ 37-node-replica, "Switching the home"): another machine of the cluster, whose copy follows this home, becomes the home, and this one one of its machines.
Package switchover runs a switch of the home from the home's API (specs/epics/ 37-node-replica, "Switching the home"): another machine of the cluster, whose copy follows this home, becomes the home, and this one one of its machines.
vodfallback
Package vodfallback serves video on demand on a full node (Epic 35 story 35.8 AC9, story 35.10 AC4a, design §11.5).
Package vodfallback serves video on demand on a full node (Epic 35 story 35.8 AC9, story 35.10 AC4a, design §11.5).
Package compat is the compatibility contract between a home and its apps (Epic 58 story 58.01).
Package compat is the compatibility contract between a home and its apps (Epic 58 story 58.01).
levelcheck
Package levelcheck keeps the API level honest (Epic 58 story 58.01): it reads the response surface of an OpenAPI document (every operation's success responses, their schemas inlined) and finds what an older app would get wrong in a newer one, a route or a response gone, a field gone, a field whose type changed, a field that may now be missing.
Package levelcheck keeps the API level honest (Epic 58 story 58.01): it reads the response surface of an OpenAPI document (every operation's success responses, their schemas inlined) and finds what an older app would get wrong in a newer one, a route or a response gone, a field gone, a field whose type changed, a field that may now be missing.
Package components is the API's handle on the component tables (Epic 51): the shared store (shared/components/store) stamped with this build's version.
Package components is the API's handle on the component tables (Epic 51): the shared store (shared/components/store) stamped with this build's version.
Package directaccess is the home's side of direct remote access (Epic 50, story 50.15): it asks the router to open a port (UPnP-IGD, NAT-PMP, then PCP), notices a shared address (CGNAT), keeps the home's key and certificate for *.<home id>.<its domain>, serves the same web and API as the LAN port over TLS on the direct listener, and tells the cloud through the relay agent (POST /admin/cloud-link/direct).
Package directaccess is the home's side of direct remote access (Epic 50, story 50.15): it asks the router to open a port (UPnP-IGD, NAT-PMP, then PCP), notices a shared address (CGNAT), keeps the home's key and certificate for *.<home id>.<its domain>, serves the same web and API as the LAN port over TLS on the direct listener, and tells the cloud through the relay agent (POST /admin/cloud-link/direct).
Package discovery implements LAN service discovery (Epic 15 plans 15.1/15.5/15.6).
Package discovery implements LAN service discovery (Epic 15 plans 15.1/15.5/15.6).
Package extcheck is "Test connection" for the Plex and web search extensions (the Cloudflare Stream one lives in tvremote).
Package extcheck is "Test connection" for the Plex and web search extensions (the Cloudflare Stream one lives in tvremote).
Package flags resolves the feature-flag bundle a signed-in user sees (Epic 16 Story 16.8) and signs it with the server's long-term Ed25519 identity key (Story 10.18) so a client that keeps it can tell a tampered copy from the server's.
Package flags resolves the feature-flag bundle a signed-in user sees (Epic 16 Story 16.8) and signs it with the server's long-term Ed25519 identity key (Story 10.18) so a client that keeps it can tell a tampered copy from the server's.
Package graphql is the GraphQL surface of the API (Story 7.17).
Package graphql is the GraphQL surface of the API (Story 7.17).
grpcclients
jsoncodec
Package jsoncodec is a gRPC codec that marshals messages with encoding/json instead of protobuf.
Package jsoncodec is a gRPC codec that marshals messages with encoding/json instead of protobuf.
pipeline
Package pipeline is the API's typed wrapper around the Pipeline gRPC service (Story 7.18 AC-1).
Package pipeline is the API's typed wrapper around the Pipeline gRPC service (Story 7.18 AC-1).
streaming
Package streaming is the API's typed wrapper around the Streaming gRPC service (Story 7.18 AC-2).
Package streaming is the API's typed wrapper around the Streaming gRPC service (Story 7.18 AC-2).
handlers
analytics
Package analytics implements the admin analytics reads (Epic 29, widened by Epic 44 story 44.6), per-video statistics (29.5) and the CSV/JSON export (29.6).
Package analytics implements the admin analytics reads (Epic 29, widened by Epic 44 story 44.6), per-video statistics (29.5) and the CSV/JSON export (29.6).
apitokens
Package apitokens implements the self-service personal-access-token surface (web-pages-batch2 Profile → API Tokens):
Package apitokens implements the self-service personal-access-token surface (web-pages-batch2 Profile → API Tokens):
auth
Package auth implements Phase 9 (Epic 10) HTTP handlers for the login surface:
Package auth implements Phase 9 (Epic 10) HTTP handlers for the login surface:
browse
Package browse implements the browsing API of Epic 45 (story 45.4): the library cards, each user's pinned libraries, the home rows and a library's hub.
Package browse implements the browsing API of Epic 45 (story 45.4): the library cards, each user's pinned libraries, the home rows and a library's hub.
channels
Package channels implements Story 27.1 — virtual channel CRUD:
Package channels implements Story 27.1 — virtual channel CRUD:
cluster
Package cluster serves the home side of multi-instance Maktaba (Epic 31, specs/epics/31-multi-instance/design.md §8):
Package cluster serves the home side of multi-instance Maktaba (Epic 31, specs/epics/31-multi-instance/design.md §8):
clusterauth
Package clusterauth serves sign-ins across the machines of a cluster (Epic 35 story 35.9, design §10): on the home, the delegation endpoint a full node resolves a session, a bearer or a personal access token through, and the sign-outs a node made while the home did not answer; on every machine, its /api/cluster/self (node.go).
Package clusterauth serves sign-ins across the machines of a cluster (Epic 35 story 35.9, design §10): on the home, the delegation endpoint a full node resolves a session, a bearer or a personal access token through, and the sign-outs a node made while the home did not answer; on every machine, its /api/cluster/self (node.go).
collections
Package collections implements Story 7.14 collection routes:
Package collections implements Story 7.14 collection routes:
common
Package common holds the small handler primitives that every Epic 7 / Phase 6 handler package consumes: JSON read/write, URL-id extraction, query parsing, and the JSON envelope shape.
Package common holds the small handler primitives that every Epic 7 / Phase 6 handler package consumes: JSON read/write, URL-id extraction, query parsing, and the JSON envelope shape.
components
Package components serves the admin routes of the components (Epic 51, story 51.08):
Package components serves the admin routes of the components (Epic 51, story 51.08):
contextcard
Package contextcard implements the Story 26.9 web context card:
Package contextcard implements the Story 26.9 web context card:
devices
Package devices implements Story 7.22 device-registration routes:
Package devices implements Story 7.22 device-registration routes:
discovery
A TV signed in from anywhere with a code through Maktaba Cloud (Epic 58 story 58.03).
A TV signed in from anywhere with a code through Maktaba Cloud (Epic 58 story 58.03).
enrichment
Package enrichment implements the Story 26.6 enrichment review surface:
Package enrichment implements the Story 26.6 enrichment review surface:
filler
Package filler implements the Story 27.10 filler & bumper routes:
Package filler implements the Story 27.10 filler & bumper routes:
flags
Package flags is the HTTP surface of feature-flag resolution (Epic 16 Story 16.8; the client side is Story 16.6):
Package flags is the HTTP surface of feature-flag resolution (Epic 16 Story 16.8; the client side is Story 16.6):
guide
Package guide implements Story 27.4 — the EPG read surface over channel_programs:
Package guide implements Story 27.4 — the EPG read surface over channel_programs:
jobs
Package jobs implements Stories 7.12 + 7.13:
Package jobs implements Stories 7.12 + 7.13:
libraries
Story 9.17 — surfaced library audit log + helpers shared by the destructive endpoints (Story 9.15 deletion, Story 9.1 settings PATCH, Story 9.11 speaker merge — owned in their respective handlers).
Story 9.17 — surfaced library audit log + helpers shared by the destructive endpoints (Story 9.15 deletion, Story 9.1 settings PATCH, Story 9.11 speaker merge — owned in their respective handlers).
libraryacl
Package libraryacl implements the admin Library-ACL matrix surface (web-pages-batch2):
Package libraryacl implements the admin Library-ACL matrix surface (web-pages-batch2):
logs
Package logs implements the troubleshooting log-collection surface:
Package logs implements the troubleshooting log-collection surface:
models
Package models implements the Model Management surface used by the web Settings page:
Package models implements the Model Management surface used by the web Settings page:
parental
Package parental serves restricted accounts and their guardians (Epic 57 story 57.02): who is restricted, at what limit, who looks after them, and their allow and block rules.
Package parental serves restricted accounts and their guardians (Epic 57 story 57.02): who is restricted, at what limit, who looks after them, and their allow and block rules.
perf
Package perf wires the admin endpoints documented in plan-18-08 (cache flush) and plan-18-01 (budget surface):
Package perf wires the admin endpoints documented in plan-18-08 (cache flush) and plan-18-01 (budget surface):
playqueue
Package playqueue is Epic 56 story 56.01: one play queue on the server.
Package playqueue is Epic 56 story 56.01: one play queue on the server.
plugins
Package plugins holds the HTTP routes of Epic 54 on the API's TCP listener.
Package plugins holds the HTTP routes of Epic 54 on the API's TCP listener.
processes
Package processes serves the process supervisor's state to the web app and records crashes for the control centre (Story 22.9).
Package processes serves the process supervisor's state to the web app and records crashes for the control centre (Story 22.9).
queues
Package queues implements the queue control-centre API of plan-06-11 §8 (workstream B):
Package queues implements the queue control-centre API of plan-06-11 §8 (workstream B):
queues/queuestest
Package queuestest is a tiny scripted database/sql driver for unit tests of the queue handlers.
Package queuestest is a tiny scripted database/sql driver for unit tests of the queue handlers.
recommendations
Package recommendations implements Story 7.21 + Epic 14 (Stories 14.6 / 14.7):
Package recommendations implements Story 7.21 + Epic 14 (Stories 14.6 / 14.7):
reports
Package reports serves the HTML reports the pipeline writes into its reports folder (default ~/.maktaba/cache/reviews, beside the thumbnail cache) and drives the channel plan preview:
Package reports serves the HTML reports the pipeline writes into its reports folder (default ~/.maktaba/cache/reviews, beside the thumbnail cache) and drives the channel plan preview:
review
Package review serves word review (Epic 52): the suspect words word_check saved, the audio around each, the fixes a reviewer makes (transcript edits, undo), what the fixes teach (the vocabulary), each library's word review settings and the language packs' report.
Package review serves word review (Epic 52): the suspect words word_check saved, the audio around each, the fixes a reviewer makes (transcript edits, undo), what the fixes teach (the vocabulary), each library's word review settings and the language packs' report.
rules
Package rules exposes the admin-editable pipeline "rules" (planner, grouping and detection knobs) over HTTP:
Package rules exposes the admin-editable pipeline "rules" (planner, grouping and detection knobs) over HTTP:
search
Package search implements Stories 7.8 and 7.9 and the per-video results:
Package search implements Stories 7.8 and 7.9 and the per-video results:
security
Package security wires the public security endpoints:
Package security wires the public security endpoints:
series
Package series implements the Story 26.10 cross-library series browser read paths:
Package series implements the Story 26.10 cross-library series browser read paths:
serversettings
Package serversettings is the admin's view of server.toml (Epic 45, story 45.3):
Package serversettings is the admin's view of server.toml (Epic 45, story 45.3):
settings
Package settings implements Story 7.15:
Package settings implements Story 7.15:
speakers
Package speakers implements the Story 7.14 speaker routes:
Package speakers implements the Story 7.14 speaker routes:
streaming
Package streaming implements Stories 7.10, 7.11:
Package streaming implements Stories 7.10, 7.11:
subscriptions
Package subscriptions wires the entitlement HTTP surface (Epic 16):
Package subscriptions wires the entitlement HTTP surface (Epic 16):
systemstatus
Package systemstatus answers "is everything OK, and if not, what is wrong and what do I do" for the System health page (/admin/health):
Package systemstatus answers "is everything OK, and if not, what is wrong and what do I do" for the System health page (/admin/health):
tags
Package tags implements the Story 7.14 tag routes:
Package tags implements the Story 7.14 tag routes:
telemetry
Package telemetry is the home's part of anonymous usage data (Epic 16 stories 16.5 and 16.7): what goes to Maktaba Cloud to improve Maktaba, never to the home's admin (who already has Epic 44's named analytics).
Package telemetry is the home's part of anonymous usage data (Epic 16 stories 16.5 and 16.7): what goes to Maktaba Cloud to improve Maktaba, never to the home's admin (who already has Epic 44's named analytics).
transcription
Package transcription serves the live report of the whole-library transcription programme:
Package transcription serves the live report of the whole-library transcription programme:
tv
Package tv is the admin + client surface that makes Maktaba TV reachable from outside the web app:
Package tv is the admin + client surface that makes Maktaba TV reachable from outside the web app:
tvchange
Package tvchange serves the TV change API (Epic 33, story 33.10 AC8; README "APIs"):
Package tvchange serves the TV change API (Epic 33, story 33.10 AC8; README "APIs"):
tvcluster
Package tvcluster is the admin surface of Maktaba TV across the cluster (Epic 32, stories 32.4 and 32.5):
Package tvcluster is the admin surface of Maktaba TV across the cluster (Epic 32, stories 32.4 and 32.5):
tvremote
Package tvremote is the admin HTTP surface of Epic 32's remote viewing (story 32.6: the Cloudflare Stream integration).
Package tvremote is the admin HTTP surface of Epic 32's remote viewing (story 32.6: the Cloudflare Stream integration).
videos
Package videos implements Story 7.4 (list/detail/patch/delete), Story 7.5 (process/reprocess), Story 7.6 (transcript window), and the read-only enumerations from Story 7.7 (subtitles/chapters lists scoped to a video).
Package videos implements Story 7.4 (list/detail/patch/delete), Story 7.5 (process/reprocess), Story 7.6 (transcript window), and the read-only enumerations from Story 7.7 (subtitles/chapters lists scoped to a video).
watch
Package watch implements Epic 29's watch-session collection and the per-user history / activity reads built on top of it.
Package watch implements Epic 29's watch-session collection and the per-user history / activity reads built on top of it.
ws
Package ws implements Story 7.16 fan-out endpoints:
Package ws implements Story 7.16 fan-out endpoints:
ws/eventbus
Package eventbus is the cross-replica WebSocket event bus (Epic 19 Story 19.2, HLB-353).
Package eventbus is the cross-replica WebSocket event bus (Epic 19 Story 19.2, HLB-353).
Package hostload says when the machine this server runs on is overloaded: more work wants the CPU than it has cores, for minutes, so every job and the database are slow.
Package hostload says when the machine this server runs on is overloaded: more work wants the CPU than it has cores, for minutes, so every job and the database are slow.
Package httperror implements the API's RFC 9457 problem+json error envelope (Story 7.1 AC-1).
Package httperror implements the API's RFC 9457 problem+json error envelope (Story 7.1 AC-1).
Package httpsec ships the transport-security middleware for the Maktaba API (Story 10.15).
Package httpsec ships the transport-security middleware for the Maktaba API (Story 10.15).
Package idempotency stores the per-key request/response pair the API replays when a client retries a mutation with the same Idempotency-Key header.
Package idempotency stores the per-key request/response pair the API replays when a client retries a mutation with the same Idempotency-Key header.
Package libaccess answers whether Maktaba may write a library (Epic 59, story 59.03): the result of the library's last access check (libraries.access), which the API's writing actions consult before they touch a file.
Package libaccess answers whether Maktaba may write a library (Epic 59, story 59.03): the result of the library's last access check (libraries.access), which the API's writing actions consult before they touch a file.
Package libpaths resolves a library folder between the database's form and this machine's (epic 45).
Package libpaths resolves a library folder between the database's form and this machine's (epic 45).
Package middleware bundles the canonical chi.Mux middleware stack for the Maktaba API.
Package middleware bundles the canonical chi.Mux middleware stack for the Maktaba API.
Package nodemode is what a full node's API (Epic 35 story 35.8, design §9.1) knows about itself: that it runs in node mode (MAKTABA_NODE_MODE=1, set by the node's supervisor from node.json), the home it belongs to, and the rule that it never changes the schema: it refuses to migrate, and refuses to start when its database role could run DDL (a copied superuser URL must never let a node migrate by mistake).
Package nodemode is what a full node's API (Epic 35 story 35.8, design §9.1) knows about itself: that it runs in node mode (MAKTABA_NODE_MODE=1, set by the node's supervisor from node.json), the home it belongs to, and the rule that it never changes the schema: it refuses to migrate, and refuses to start when its database role could run DDL (a copied superuser URL must never let a node migrate by mistake).
Package notify is the in-app notification store and fan-out (Epic 33, story 33.13; README decision 8: a general notifications table, TV changes its first user).
Package notify is the in-app notification store and fan-out (Epic 33, story 33.13; README decision 8: a general notifications table, TV changes its first user).
Package paginate implements the API's single cursor-pagination contract (Story 7.2).
Package paginate implements the API's single cursor-pagination contract (Story 7.2).
Package parental holds restricted accounts (Epic 57): a viewer's policy, the guardians an admin named for them, and their allow and block rules (story 57.02, slot 0221).
Package parental holds restricted accounts (Epic 57): a viewer's policy, the guardians an admin named for them, and their allow and block rules (story 57.02, slot 0221).
Package perf implements the API-side performance budget gate (Epic 18).
Package perf implements the API-side performance budget gate (Epic 18).
Package pgdsn adapts a libpq connection string to lib/pq, which has no sslmode=prefer or sslmode=allow: it fails with `pq: unsupported sslmode "prefer"`.
Package pgdsn adapts a libpq connection string to lib/pq, which has no sslmode=prefer or sslmode=allow: it fails with `pq: unsupported sslmode "prefer"`.
Package plugins is the plugin API's rules (Epic 54, story 54.04): invocation tokens minted from the grants the API stores, and the checks every plugin call passes (token, capability, subject and library scope, quota, rate).
Package plugins is the plugin API's rules (Epic 54, story 54.04): invocation tokens minted from the grants the API stores, and the checks every plugin call passes (token, capability, subject and library scope, quota, rate).
catalog
Package catalog is the home's side of the plugin store (Epic 54, story 54.17): the loop `api:plugins_catalog` that fetches the signed lists from the store's CDN, verifies them by the chain of trust (story 54.14, shared/plugins/pluginsig), keeps them and the newest versions seen (in <data>/state and in Postgres, the newer of the two winning), applies the revocation list to the installed plugins (the kill switch), offers updates, and installs from the store.
Package catalog is the home's side of the plugin store (Epic 54, story 54.17): the loop `api:plugins_catalog` that fetches the signed lists from the store's CDN, verifies them by the chain of trust (story 54.14, shared/plugins/pluginsig), keeps them and the newest versions seen (in <data>/state and in Postgres, the newer of the two winning), applies the revocation list to the installed plugins (the kill switch), offers updates, and installs from the store.
statements
Package statements is the plugin API's registry of named SQL statements (Epic 54, story 54.24 §2): the only way Maktaba's own first-party plugins reach the database.
Package statements is the plugin API's registry of named SQL statements (Epic 54, story 54.24 §2): the only way Maktaba's own first-party plugins reach the database.
storelink
Package storelink is the home's half of linking it to a plugin store account (Epic 54, story 54.15 §5).
Package storelink is the home's half of linking it to a plugin store account (Epic 54, story 54.15 §5).
Package reqid carries the per-request UUID v7 across the middleware chain via context.
Package reqid carries the per-request UUID v7 across the middleware chain via context.
Package reviewhome seeds and maintains the store reviewers' home (Epic 58 story 58.04): review.maktaba.tv, a Maktaba home the project runs with public-domain and openly licensed content only.
Package reviewhome seeds and maintains the store reviewers' home (Epic 58 story 58.04): review.maktaba.tv, a Maktaba home the project runs with public-domain and openly licensed content only.
Phase 10 handler wiring — the four packages that previously had working Mount() methods but no caller.
Phase 10 handler wiring — the four packages that previously had working Mount() methods but no caller.
Package runtimecfg reads the runtime settings an admin PATCHes through /api/settings (app_settings rows such as search.fts_weight or session.url_ttl_sec) for the handlers that use them.
Package runtimecfg reads the runtime settings an admin PATCHes through /api/settings (app_settings rows such as search.fts_weight or session.url_ttl_sec) for the handlers that use them.
runtimecfgtest
Package runtimecfgtest gives tests an app_settings table to store runtime settings in (SQLite, in memory).
Package runtimecfgtest gives tests an app_settings table to store runtime settings in (SQLite, in memory).
Package safego starts background goroutines that cannot take the API down.
Package safego starts background goroutines that cannot take the API down.
Package scale carries the horizontal-scaling stubs documented in Epic 19 plans 19.2–19.4 and 19.7.
Package scale carries the horizontal-scaling stubs documented in Epic 19 plans 19.2–19.4 and 19.7.
Package searchindex makes keyword search's BM25 indexes (Epic 49, stories 49.5 and 49.6) where the database can hold them.
Package searchindex makes keyword search's BM25 indexes (Epic 49, stories 49.5 and 49.6) where the database can hold them.
Package searchterms is keyword search's terms dictionary in Go (Epic 49 story 49.8): a word's key, as search_terms holds it (slot 0235), and the words of a text.
Package searchterms is keyword search's terms dictionary in Go (Epic 49 story 49.8): a word's key, as search_terms holds it (slot 0235), and the words of a text.
Package secret centralises Maktaba's handling of sensitive configuration values (Story 10.14).
Package secret centralises Maktaba's handling of sensitive configuration values (Story 10.14).
Package secrets is the home's sealed secret store (Epic 32 story 32.6, slot 0120 home_secrets).
Package secrets is the home's sealed secret store (Epic 32 story 32.6, slot 0120 home_secrets).
Package security holds the cross-cutting security primitives wired across Epic 23 stories:
Package security holds the cross-cutting security primitives wired across Epic 23 stories:
Package sharepath resolves the canonical media paths of story 31.3 (smb://<server>/<share>/<path>, nfs://..., file:///...) on the home.
Package sharepath resolves the canonical media paths of story 31.3 (smb://<server>/<share>/<path>, nfs://..., file:///...) on the home.
embedded_pubkey.go bundles the license-server Ed25519 public key into the binary at build time (Story 16.4: "Server bundles license-server public key at build time").
embedded_pubkey.go bundles the license-server Ed25519 public key into the binary at build time (Story 16.4: "Server bundles license-server public key at build time").
Package swr is a stale-while-revalidate cache of one value with a single build in flight.
Package swr is a stale-while-revalidate cache of one value with a single build in flight.
Security advisories for the running version (Story 23.8 AC4, TC2).
Security advisories for the running version (Story 23.8 AC4, TC2).
Package textnorm is the Arabic normalisation of keyword search (Epic 49 story 49.4) in Go: the same folding as Postgres's maktaba_normalize() (migration 0231), for what normalises in the application (SQLite installs, whose FTS5 indexes and matches the normalised text).
Package textnorm is the Arabic normalisation of keyword search (Epic 49 story 49.4) in Go: the same folding as Postgres's maktaba_normalize() (migration 0231), for what normalises in the application (SQLite installs, whose FTS5 indexes and matches the normalised text).
Package transcript writes a reviewer's word fixes (Epic 52, story 52.9).
Package transcript writes a reviewer's word fixes (Epic 52, story 52.9).
transcripttest
Package transcripttest seeds a scratch Postgres with a video, its active transcript and word flags, for the word review tests (Epic 52).
Package transcripttest seeds a scratch Postgres with a video, its active transcript and word flags, for the word review tests (Epic 52).
worddata
Package worddata reads and writes a transcript sentence's packed words (Epic 52, story 52.1): transcript_segments.word_data.
Package worddata reads and writes a transcript sentence's packed words (Epic 52, story 52.1): transcript_segments.word_data.
Package tvchange is the TV change controller (Epic 33, stories 33.10 and 33.12): the change store, the state machine of design §11.2, approval and the auto-promote rules, the open drafts the channel editor and the TV settings write into, and the controller loop that verifies staged changes, promotes approved ones and enqueues the pipeline's tv_stage / tv_swap / tv_gc jobs.
Package tvchange is the TV change controller (Epic 33, stories 33.10 and 33.12): the change store, the state machine of design §11.2, approval and the auto-promote rules, the open drafts the channel editor and the TV settings write into, and the controller loop that verifies staged changes, promotes approved ones and enqueues the pipeline's tv_stage / tv_swap / tv_gc jobs.
tvchangetest
Package tvchangetest gives the Epic 33 tests a database with the TV change tables on both backends: SQLite (always: the slot 0127 / 0128 / 0130 SQLite twins plus the tables they read) and Postgres (a scratch, fully migrated database when MAKTABA_TEST_PG_URL is set).
Package tvchangetest gives the Epic 33 tests a database with the TV change tables on both backends: SQLite (always: the slot 0127 / 0128 / 0130 SQLite twins plus the tables they read) and Postgres (a scratch, fully migrated database when MAKTABA_TEST_PG_URL is set).
Package tvremote is Maktaba's remote viewing through Cloudflare Stream (Epic 32).
Package tvremote is Maktaba's remote viewing through Cloudflare Stream (Epic 32).
cf
Package cf is Maktaba's client for the Cloudflare API v4, the Stream calls of Epic 32 (design §7.1): live inputs, videos and lifecycle, signing keys and token minting, storage use and the GraphQL analytics probe.
Package cf is Maktaba's client for the Cloudflare API v4, the Stream calls of Epic 32 (design §7.1): live inputs, videos and lifecycle, signing keys and token minting, storage use and the GraphQL analytics probe.
cftest
Package cftest is a fake Cloudflare API for the Epic 32 tests (32.6 to 32.10): token verify, live inputs, videos, storage use, signing keys, the GraphQL analytics probe, the customer-domain lifecycle endpoint and live outputs (simulcast, 32.13), with switches to make each one fail.
Package cftest is a fake Cloudflare API for the Epic 32 tests (32.6 to 32.10): token verify, live inputs, videos, storage use, signing keys, the GraphQL analytics probe, the customer-domain lifecycle endpoint and live outputs (simulcast, 32.13), with switches to make each one fail.
rtmptest
Package rtmptest is a fake RTMP(S) ingest for the Epic 32 end-to-end tests: enough of RTMP (handshake, chunk stream, AMF0 connect/createStream/publish) for ffmpeg's rtmp/rtmps muxer to publish to it.
Package rtmptest is a fake RTMP(S) ingest for the Epic 32 end-to-end tests: enough of RTMP (handshake, chunk stream, AMF0 connect/createStream/publish) for ffmpeg's rtmp/rtmps muxer to publish to it.
spike
Package spike is the Cloudflare Stream spike of Epic 32 story 32.6 (AC7): with a real account it creates a live input, pushes a test pattern with ffmpeg over RTMPS (or SRT), and measures and checks what the design assumes but Cloudflare does not document:
Package spike is the Cloudflare Stream spike of Epic 32 story 32.6 (AC7): with a real account it creates a live input, pushes a test pattern with ffmpeg over RTMPS (or SRT), and measures and checks what the design assumes but Cloudflare does not document:
Package updates is the home's update policy, release discovery and scheduling (Epic 35, story 35.3; design §4).
Package updates is the home's update policy, release discovery and scheduling (Epic 35, story 35.3; design §4).
dltoken
Package dltoken is the home's download token for a machine that has no delegation key yet: a worker-only machine converting to a full node on its update (Epic 35 story 35.8 AC8).
Package dltoken is the home's download token for a machine that has no delegation key yet: a worker-only machine converting to a full node on its update (Epic 35 story 35.8 AC8).
Package usage counts the API's use per app and day (Epic 44 story 44.5).
Package usage counts the API's use per app and day (Epic 44 story 44.5).
Package version exposes build-time metadata injected via -ldflags.
Package version exposes build-time metadata injected via -ldflags.
Package videotitle holds the one rule for the title a video shows when it has no metadata title: its file name without the final extension.
Package videotitle holds the one rule for the title a video shows when it has no metadata title: its file name without the final extension.

Jump to

Keyboard shortcuts

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