Documentation
¶
Overview ¶
Package api holds modules.json, the release of modules that api's packages come from and the digest of its index (R07): the file is embedded here, in the package at the root of the module, because a //go:embed pattern takes no "..", so that CI checks, the build of the image lays and serve reads the one file, with no copy of it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
api
command
Command api is NovaTrail's platform service, one binary with a command for each thing it is run for: serve, migrate, invite, countries, sweep, packages, check and version.
|
Command api is NovaTrail's platform service, one binary with a command for each thing it is run for: serve, migrate, invite, countries, sweep, packages, check and version. |
|
modules-check
command
Command modules-check is the check of CI of modules.json (R07, R41): just ci-modules runs it once release-verify has accepted the signature of the index.
|
Command modules-check is the check of CI of modules.json (R07, R41): just ci-modules runs it once release-verify has accepted the signature of the index. |
|
internal
|
|
|
account
Package account is api's AccountService of the contract novatrail.api.v1: the account and its invite code, and, task by task, its PIN, profiles and deletion (R04, R34, R35, R36).
|
Package account is api's AccountService of the contract novatrail.api.v1: the account and its invite code, and, task by task, its PIN, profiles and deletion (R04, R34, R35, R36). |
|
admission
Package admission is the function of admission to AI as api asks it before an attempt (R25, R45): the admission table of the release of spec that tutor reads, the facts the deployment declares in its file, and the least stage of tutor's rule of admission of models.
|
Package admission is the function of admission to AI as api asks it before an attempt (R25, R45): the admission table of the release of spec that tutor reads, the facts the deployment declares in its file, and the least stage of tutor's rule of admission of models. |
|
argon
Package argon is api's slow hash, argon2id, for what has too few values for a fast one: a PIN, and the fingerprint of a request that carries a PIN or an age (R35).
|
Package argon is api's slow hash, argon2id, for what has too few values for a fast one: a PIN, and the fingerprint of a request that carries a PIN or an age (R35). |
|
authn
Package authn is api's port to the sign-in service.
|
Package authn is api's port to the sign-in service. |
|
authn/authntest
Package authntest is a fake of authn.Port for the tests of the code that holds it: a token is whatever the test says it is, and the users are the test's own.
|
Package authntest is a fake of authn.Port for the tests of the code that holds it: a token is whatever the test says it is, and the users are the test's own. |
|
authz
Package authz is api's rights: OpenFGA, a library in api's own process, on its store in the database openfga (R04, R31).
|
Package authz is api's rights: OpenFGA, a library in api's own process, on its store in the database openfga (R04, R31). |
|
catalog
Package catalog is api's way from a module to its package, in the contract novatrail.api.v1 (R07, R17, R18, R42): PackageService, the open views of a package by its digest and which digests the image still gives; ModuleService, the catalog of a profile and the modules connected to it; and the files of the device parts, by HTTP GET, which are no method of Connect.
|
Package catalog is api's way from a module to its package, in the contract novatrail.api.v1 (R07, R17, R18, R42): PackageService, the open views of a package by its digest and which digests the image still gives; ModuleService, the catalog of a profile and the modules connected to it; and the files of the device parts, by HTTP GET, which are no method of Connect. |
|
config
Package config reads the service's configuration from the environment.
|
Package config reads the service's configuration from the environment. |
|
countries
Package countries is what api knows of a learner's country before the DPIA (R119 spec; R36): its form, and the countries no deployment may take learners from until the DPIA is done — those of the GDPR and of the UK GDPR.
|
Package countries is what api knows of a learner's country before the DPIA (R119 spec; R36): its form, and the countries no deployment may take learners from until the DPIA is done — those of the GDPR and of the UK GDPR. |
|
deletion
Package deletion is the deletion of a profile and of an account in the order of R21 (architecture 3.10): the database first, then the tuples of the rights, then the user at the sign-in service, and the account's row last.
|
Package deletion is the deletion of a profile and of an account in the order of R21 (architecture 3.10): the database first, then the tuples of the rights, then the user at the sign-in service, and the account's row last. |
|
idem
Package idem is what tells one request from another under one idempotency key (R17, R35): the key's form and the request's fingerprint.
|
Package idem is what tells one request from another under one idempotency key (R17, R35): the key's form and the request's fingerprint. |
|
invite
Package invite is the invite codes of the closed slice (R04, R34): how a code is made, how one given back is read, and the SHA-256 that is all the database keeps of it.
|
Package invite is the invite codes of the closed slice (R04, R34): how a code is made, how one given back is read, and the SHA-256 that is all the database keeps of it. |
|
learning
Package learning runs attempts of tasks (R44): their beginning, the open attempt, the submission of the options tapped and its verdict by module-kit, the techniques a solving step gives, and "Done".
|
Package learning runs attempts of tasks (R44): their beginning, the open attempt, the submission of the options tapped and its verdict by module-kit, the techniques a solving step gives, and "Done". |
|
logging
Package logging is the service's log: JSON lines on one stream, in the keys Cloud Logging reads, held to the table of events in events.go.
|
Package logging is the service's log: JSON lines on one stream, in the keys Cloud Logging reads, held to the table of events in events.go. |
|
packages
Package packages is the module packages api holds (R07, R41): the release of modules that modules.json pins and the digest of its index, the command that lays the packages of that index which are in api's window into a folder — the image's, or the first app's outside git — and the reading of that folder when serve starts.
|
Package packages is the module packages api holds (R07, R41): the release of modules that modules.json pins and the digest of its index, the command that lays the packages of that index which are in api's window into a folder — the image's, or the first app's outside git — and the reading of that folder when serve starts. |
|
packages/packagestest
Package packagestest builds, for the tests, what package packages lays and reads: the packages of the vectors of spec's format, their archives, an index of them and a release of modules that serves them, and a folder laid from them, read as serve reads it (R41).
|
Package packagestest builds, for the tests, what package packages lays and reads: the packages of the vectors of spec's format, their archives, an index of them and a release of modules that serves them, and a folder laid from them, read as serve reads it (R41). |
|
pin
Package pin is the PIN of the section for adults (R04, R35): its form, its hash and the count of wrong PINs that closes its input.
|
Package pin is the PIN of the section for adults (R04, R35): its form, its hash and the count of wrong PINs that closes its input. |
|
rpc
Package rpc is api's server of the contract novatrail.api.v1, on Connect v2 (R17, R18, R33): the methods of the contract, its codecs, and the interceptors every request goes through — its line of the log, its time limit and the checks of architecture 3.1, which run before any handler.
|
Package rpc is api's server of the contract novatrail.api.v1, on Connect v2 (R17, R18, R33): the methods of the contract, its codecs, and the interceptors every request goes through — its line of the log, its time limit and the checks of architecture 3.1, which run before any handler. |
|
server
Package server is the HTTP server of the service and its graceful stop.
|
Package server is the HTTP server of the service and its graceful stop. |
|
store
Package store is api's database: its schema, the migrations that make it, the pool requests take their connections from, and the transaction a write under an account runs in (R29).
|
Package store is api's database: its schema, the migrations that make it, the pool requests take their connections from, and the transaction a write under an account runs in (R29). |
|
store/storetest
Package storetest runs the tests of api's database on a real PostgreSQL with no Docker, as the devcontainer and CI have none: embedded-postgres starts one server for a test binary, when its first test asks for a database, migrates a template database once, and gives each test a database of its own made from it, which is a copy and takes milliseconds (R29; amendment of 2026-11-02 to R05).
|
Package storetest runs the tests of api's database on a real PostgreSQL with no Docker, as the devcontainer and CI have none: embedded-postgres starts one server for a test binary, when its first test asks for a database, migrates a template database once, and gives each test a database of its own made from it, which is a copy and takes milliseconds (R29; amendment of 2026-11-02 to R05). |
|
sweep
Package sweep is the daily job of the terms of keeping (R05, R21, R38, R43): it finishes the deletions the requests left unfinished and deletes what is kept past its term — accounts and profiles idle for 12 months, users of the sign-in service with no account for 30 days, dangling tuples, the minimal records of consents for children 5 years after the deletion, and the records of keys and OpenFGA's changelog after a day — and closes what a learner abandoned: an attempt with no action for 7 days, and a lesson run with none for 30 (R10, R13).
|
Package sweep is the daily job of the terms of keeping (R05, R21, R38, R43): it finishes the deletions the requests left unfinished and deletes what is kept past its term — accounts and profiles idle for 12 months, users of the sign-in service with no account for 30 days, dangling tuples, the minimal records of consents for children 5 years after the deletion, and the records of keys and OpenFGA's changelog after a day — and closes what a learner abandoned: an attempt with no action for 7 days, and a lesson run with none for 30 (R10, R13). |
|
version
Package version holds the build identity of the binary.
|
Package version holds the build identity of the binary. |