internal/

directory
v0.1.3 Latest Latest
Warning

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

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

Directories

Path Synopsis
app
Package app - the engine's program: the server and its commands (install, migrate, theme…), run by Main.
Package app - the engine's program: the server and its commands (install, migrate, theme…), run by Main.
demoset
Package demoset - the demo sets of "app install -demo-set <name>": a whole demo site as data, sets/<name>/<lang>.yaml - its theme, users, vocabularies, fields, content types, Views, blocks, menus and content (nodes with their field values, comments, view counts), in one language.
Package demoset - the demo sets of "app install -demo-set <name>": a whole demo site as data, sets/<name>/<lang>.yaml - its theme, users, vocabularies, fields, content types, Views, blocks, menus and content (nodes with their field values, comments, view counts), in one language.
starter
Package starter - what a new site starts with (app install), as data: starter.yaml describes the site's look, image styles, fields, content types, Views and menus; Apply creates them.
Package starter - what a new site starts with (app install), as data: starter.yaml describes the site's look, image styles, fields, content types, Views and menus; Apply creates them.
Package buildinfo - what the running binary is: the engine's release, the commit and time it was built from (recorded by the Go toolchain from git, debug.ReadBuildInfo), the Go version; for a site's own binary (its main calls kosatka.Main) - the engine as its dependency and the site's module.
Package buildinfo - what the running binary is: the engine's release, the commit and time it was built from (recorded by the Go toolchain from git, debug.ReadBuildInfo), the Go version; for a site's own binary (its main calls kosatka.Main) - the engine as its dependency and the site's module.
domain
assets
Package assets - the versioned URLs of the minified static files: the engine's (/static/css, /static/js), a theme's (/static/themes/<theme>, the first theme of its chain with the file) and a module's (/static/modules/<module>).
Package assets - the versioned URLs of the minified static files: the engine's (/static/css, /static/js), a theme's (/static/themes/<theme>, the first theme of its chain with the file) and a module's (/static/modules/<module>).
audit
Package audit - the actions done on the site that an action log keeps (who deleted content, changed a role's permissions, signed in): the core and the modules Record them, a listener (the action log module, OnAction) stores them.
Package audit - the actions done on the site that an action log keeps (who deleted content, changed a role's permissions, signed in): the core and the modules Record them, a listener (the action log module, OnAction) stores them.
fallback
Package fallback - logging an error that the code handles itself by falling back to something (a default value, an empty list) instead of returning it.
Package fallback - logging an error that the code handles itself by falling back to something (a default value, an empty list) instead of returning it.
imageurl
Package imageurl builds the web paths of public files (public:// URIs) and of their image-style derivatives.
Package imageurl builds the web paths of public files (public:// URIs) and of their image-style derivatives.
themes
Package themes - the themes: their manifests (theme.yaml, InfoFile; a subtheme's merged with its base's, LoadInfoFor), the list the Appearance page shows (Available, Invalid), their settings (SettingsService), the blocks a theme comes with (PlaceBlocks), the catalog of themes kept in their own repositories (Catalog) and themes/themes.lock (ReadLock).
Package themes - the themes: their manifests (theme.yaml, InfoFile; a subtheme's merged with its base's, LoadInfoFor), the list the Appearance page shows (Available, Invalid), their settings (SettingsService), the blocks a theme comes with (PlaceBlocks), the catalog of themes kept in their own repositories (Catalog) and themes/themes.lock (ReadLock).
twofactor
Package twofactor - two-factor sign-in: time-based codes of an authenticator app (TOTP, RFC 6238: HMAC-SHA1, 6 digits, 30 seconds), one-time recovery codes, and the service turning it on and off and checking a code at sign-in.
Package twofactor - two-factor sign-in: time-based codes of an authenticator app (TOTP, RFC 6238: HMAC-SHA1, 6 digits, 30 seconds), one-time recovery codes, and the service turning it on and off and checking a code at sign-in.
views
Package views - Views: lists of content or comments configured in the admin (filters, sorts, fields; displays: a page, a block, an attachment, a term's page, a profile tab), published as snapshots and run against the database.
Package views - Views: lists of content or comments configured in the admin (filters, sorts, fields; displays: a page, a block, an attachment, a term's page, a profile tab), published as snapshots and run against the database.
Package i18nextract finds the interface strings of the code so the catalogs can be checked for missing translations (cmd/i18n-extract and the completeness test): t, tc, plural and tjs in templates; Kosatka.t, Kosatka.tc and Kosatka.formatPlural in JavaScript (static files and inline scripts); i18n.T, i18n.TC, i18n.Plural, i18n.N, i18n.NC and i18n.Errorf in Go.
Package i18nextract finds the interface strings of the code so the catalogs can be checked for missing translations (cmd/i18n-extract and the completeness test): t, tc, plural and tjs in templates; Kosatka.t, Kosatka.tc and Kosatka.formatPlural in JavaScript (static files and inline scripts); i18n.T, i18n.TC, i18n.Plural, i18n.N, i18n.NC and i18n.Errorf in Go.
Package i18npack builds a translations catalog - the index.json the sites download languages by (service.TranslationsCatalog) and a catalog file per language next to it - from a translations repository:
Package i18npack builds a translations catalog - the index.json the sites download languages by (service.TranslationsCatalog) and a catalog file per language next to it - from a translations repository:
Package i18ntest holds a small Russian catalog for the engine's tests (pkg/i18n's format): the strings tests check in a language other than English - month names, number separators, plural forms, a few labels.
Package i18ntest holds a small Russian catalog for the engine's tests (pkg/i18n's format): the strings tests check in a language other than English - month names, number separators, plural forms, a few labels.
infrastructure
demo
Package demo - the demo content of "app install -demo" beyond the core's (internal/app): the steps the modules register (Register, like migrations.RegisterInstall) and what every demo step shares - its texts by language, the sea pictures, image files, nodes, comments, block placements and menu links.
Package demo - the demo content of "app install -demo" beyond the core's (internal/app): the steps the modules register (Register, like migrations.RegisterInstall) and what every demo step shares - its texts by language, the sea pictures, image files, nodes, comments, block placements and menu links.
ent
ent/database/viewquery
Package viewquery runs Views on the ent schema (entity.ViewQuery): a display's filters, sorts and pager over nodes or comments, its glossary bar and the "similar content" ranking.
Package viewquery runs Views on the ent schema (entity.ViewQuery): a display's filters, sorts and pager over nodes or comments, its glossary bar and the "similar content" ranking.
filestorage
Package filestorage - the storages a site's files can be kept in besides its directories (files.storage, files.private_storage): drivers that packages outside the engine register (modulekit.AddFileStorage), like database/sql's drivers.
Package filestorage - the storages a site's files can be kept in besides its directories (files.storage, files.private_storage): drivers that packages outside the engine register (modulekit.AddFileStorage), like database/sql's drivers.
migrations
Package migrations versions the database schema, generated: the ent schemas describe the tables, and for every change scripts/migrations_gen.sh writes a migration file per database (MySQL, PostgreSQL) into files/<dialect>/<set>/ (embedded in the binary) - or, for a module with its own ent schema (RegisterSchema), into that module's migration files.
Package migrations versions the database schema, generated: the ent schemas describe the tables, and for every change scripts/migrations_gen.sh writes a migration file per database (MySQL, PostgreSQL) into files/<dialect>/<set>/ (embedded in the binary) - or, for a module with its own ent schema (RegisterSchema), into that module's migration files.
oauth
Package oauth - the site's OAuth providers (internal/lib/oauth) built from the config and the admin settings, with the engine's callback route.
Package oauth - the site's OAuth providers (internal/lib/oauth) built from the config and the admin settings, with the engine's callback route.
sqldialect
Package sqldialect keeps hand-written SQL portable between MySQL and PostgreSQL: the few constructs that differ (placeholders, upsert, the id of an inserted row, random order, today's date) go through these helpers instead of being written for one database.
Package sqldialect keeps hand-written SQL portable between MySQL and PostgreSQL: the few constructs that differ (placeholders, upsert, the id of an inserted row, random order, today's date) go through these helpers instead of being written for one database.
lib
dateformat
Package dateformat formats dates by PHP date()-style patterns (entity.DateFormat).
Package dateformat formats dates by PHP date()-style patterns (entity.DateFormat).
debounce
Package debounce coalesces bursts of calls into one.
Package debounce coalesces bursts of calls into one.
htmlimages
Package htmlimages rewrites <img> tags in HTML content into resized-preview links (with PhotoSwipe captions), using an imagestyle.ResizeService.
Package htmlimages rewrites <img> tags in HTML content into resized-preview links (with PhotoSwipe captions), using an imagestyle.ResizeService.
mailsender
Package mailsender sends transactional email via SMTP.
Package mailsender sends transactional email via SMTP.
numberformat
Package numberformat shows numbers by a language's separators: the decimal one and the one between thousands, each a translation of its own (message contexts ContextDecimal, ContextThousands: "." and "," in English).
Package numberformat shows numbers by a language's separators: the decimal one and the one between thousands, each a translation of its own (message contexts ContextDecimal, ContextThousands: "." and "," in English).
oauth
Package oauth - OAuth 2.0 sign-in with Google, VK ID and Yandex: the authorization URL, the code exchange and the user's profile normalized to Profile.
Package oauth - OAuth 2.0 sign-in with Google, VK ID and Yandex: the authorization URL, the code exchange and the user's profile normalized to Profile.
photoswipe
Package photoswipe builds markup for the PhotoSwipe gallery viewer.
Package photoswipe builds markup for the PhotoSwipe gallery viewer.
searchtext
Package searchtext turns text into the words a search index keeps and a query into the words it looks for: folded (lowercase, "ё" as "е") and stemmed in a language (Snowball), so "cats" finds "cat".
Package searchtext turns text into the words a search index keeps and a query into the words it looks for: folded (lowercase, "ё" as "е") and stemmed in a language (Snowball), so "cats" finds "cat".
secretbox
Package secretbox seals the secrets a site keeps in its database (the keys and passwords of outside services, the two-factor secrets) with a key from its environment, so a dump of the database doesn't give them away: AES-256-GCM, the key derived from the given one with HKDF-SHA256.
Package secretbox seals the secrets a site keeps in its database (the keys and passwords of outside services, the two-factor secrets) with a key from its environment, so a dump of the database doesn't give them away: AES-256-GCM, the key derived from the given one with HKDF-SHA256.
slogquiet
Package slogquiet keeps errors that aren't the server's fault out of the ERROR level: a request the client cancelled or a connection it closed (context canceled, broken pipe, connection reset) is logged at DEBUG.
Package slogquiet keeps errors that aren't the server's fault out of the ERROR level: a request the client cancelled or a connection it closed (context canceled, broken pipe, connection reset) is logged at DEBUG.
textdiff
Package textdiff compares two texts for a side-by-side view: by paragraphs, then by words inside the paragraphs that changed.
Package textdiff compares two texts for a side-by-side view: by paragraphs, then by words inside the paragraphs that changed.
Package migrationsgen writes the next schema migration of every set whose ent tables changed, for MySQL and PostgreSQL (scripts/ migrations_gen.sh starts the databases it needs).
Package migrationsgen writes the next schema migration of every set whose ent tables changed, for MySQL and PostgreSQL (scripts/ migrations_gen.sh starts the databases it needs).
Package modules lists what the modules (internal/modules/<name>) give the core at startup: their Wire and their files - one entry per module here, besides its manifest in manifests.All() (TestEveryModuleListed checks both lists agree); a module from outside the engine gives the same with modulekit.Register, and its interface catalogs too (the engine's modules are translated by the downloaded languages).
Package modules lists what the modules (internal/modules/<name>) give the core at startup: their Wire and their files - one entry per module here, besides its manifest in manifests.All() (TestEveryModuleListed checks both lists agree); a module from outside the engine gives the same with modulekit.Register, and its interface catalogs too (the engine's modules are translated by the downloaded languages).
action_log/ent
Package ent - the action log module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the action log module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
action_log/ent/schema
Package schema - the action log module's own ent schema: the recorded actions and the module's settings.
Package schema - the action log module's own ent schema: the recorded actions and the module's settings.
action_log/manifest
Package manifest declares the action log module (its registry entry): who did what on the site - content deleted, a role's permissions changed, settings saved, sign-ins.
Package manifest declares the action log module (its registry entry): who did what on the site - content deleted, a role's permissions changed, settings saved, sign-ins.
complaints
Package complaints - the complaints module: signed-in visitors report a content item or a comment (a reason, a note), moderators decide in the queue (Content → Complaints); enough complaints of different visitors hide the item until they do.
Package complaints - the complaints module: signed-in visitors report a content item or a comment (a reason, a note), moderators decide in the queue (Content → Complaints); enough complaints of different visitors hide the item until they do.
complaints/ent
Package ent - the complaints module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the complaints module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
complaints/ent/schema
Package schema - the complaints module's own ent schema: its tables, apart from the core's (internal/infrastructure/ent/schema).
Package schema - the complaints module's own ent schema: its tables, apart from the core's (internal/infrastructure/ent/schema).
complaints/manifest
Package manifest declares the complaints module (its registry entry).
Package manifest declares the complaints module (its registry entry).
error_reports/ent
Package ent - the error reports module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the error reports module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
error_reports/ent/schema
Package schema - the error reports module's own ent schema: its tables, apart from the core's (internal/infrastructure/ent/schema).
Package schema - the error reports module's own ent schema: its tables, apart from the core's (internal/infrastructure/ent/schema).
error_reports/manifest
Package manifest declares the error reports module (its registry entry).
Package manifest declares the error reports module (its registry entry).
feeds/ent
Package ent - the feeds module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the feeds module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
feeds/ent/schema
Package schema - the feeds module's own ent schema: its tables, apart from the core's.
Package schema - the feeds module's own ent schema: its tables, apart from the core's.
feeds/manifest
Package manifest declares the feeds module (its registry entry).
Package manifest declares the feeds module (its registry entry).
forms/ent
Package ent - the forms module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the forms module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
forms/ent/schema
Package schema - the forms module's ent schema, apart from the core's.
Package schema - the forms module's ent schema, apart from the core's.
forms/manifest
Package manifest declares the forms module (its registry entry): a "form" content type whose items have their own elements and collect submissions.
Package manifest declares the forms module (its registry entry): a "form" content type whose items have their own elements and collect submissions.
galleries/ent
Package ent - the galleries module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the galleries module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
galleries/ent/schema
Package schema - the galleries module's own ent schema: its tables, apart from the core's.
Package schema - the galleries module's own ent schema: its tables, apart from the core's.
galleries/manifest
Package manifest declares the galleries module (its registry entry).
Package manifest declares the galleries module (its registry entry).
languages/ent
Package ent - the languages module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the languages module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
languages/ent/schema
Package schema - the languages module's own ent schema: which content items translate which, and the module's settings.
Package schema - the languages module's own ent schema: which content items translate which, and the module's settings.
languages/manifest
Package manifest declares the languages module (its registry entry): the site's languages besides its default one, each at its own address prefix (/en/…), the language switcher and the pages' addresses in the other languages for search engines.
Package manifest declares the languages module (its registry entry): the site's languages besides its default one, each at its own address prefix (/en/…), the language switcher and the pages' addresses in the other languages for search engines.
manifests
Package manifests registers every module of the engine (its manifest: entity.Module and install steps), then those from outside it (modulekit.Register) - the one list of the modules the binary carries.
Package manifests registers every module of the engine (its manifest: entity.Module and install steps), then those from outside it (modulekit.Register) - the one list of the modules the binary carries.
not_found_log/ent
Package ent - the 404 log module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the 404 log module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
not_found_log/ent/schema
Package schema - the 404 log module's own ent schema: the paths asked for and not found, and the module's settings.
Package schema - the 404 log module's own ent schema: the paths asked for and not found, and the module's settings.
not_found_log/manifest
Package manifest declares the 404 log module (its registry entry): the paths visitors asked for and the site didn't find, with a redirect made from any of them in a click.
Package manifest declares the 404 log module (its registry entry): the paths visitors asked for and the site didn't find, with a redirect made from any of them in a click.
polls/ent
Package ent - the polls module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the polls module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
polls/ent/schema
Package schema - the polls module's own ent schema: its tables, apart from the core's.
Package schema - the polls module's own ent schema: its tables, apart from the core's.
polls/manifest
Package manifest declares the polls module (its registry entry).
Package manifest declares the polls module (its registry entry).
private_messages
Package privatemessages - the private messages module: conversations (threads) between users, their members and messages; the profile's messages tab, the thread and new message pages, the e-mail of a new message, the unread count in the user menu.
Package privatemessages - the private messages module: conversations (threads) between users, their members and messages; the profile's messages tab, the thread and new message pages, the e-mail of a new message, the unread count in the user menu.
private_messages/ent
Package ent - the private messages module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the private messages module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
private_messages/ent/schema
Package schema - the private messages module's own ent schema: its tables (pm_threads, pm_thread_members, pm_messages), apart from the core's.
Package schema - the private messages module's own ent schema: its tables (pm_threads, pm_thread_members, pm_messages), apart from the core's.
private_messages/manifest
Package manifest declares the private messages module (its registry entry): conversations between users, the messages tab of the profile.
Package manifest declares the private messages module (its registry entry): conversations between users, the messages tab of the profile.
ratings
Package ratings - star ratings of content: a voter's vote for a content item, its average and count on the item's page (the node_rating block) and in Views (the module's sorts, filters and field).
Package ratings - star ratings of content: a voter's vote for a content item, its average and count on the item's page (the node_rating block) and in Views (the module's sorts, filters and field).
ratings/ent
Package ent - the ratings module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the ratings module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
ratings/manifest
Package manifest declares the ratings module (its registry entry).
Package manifest declares the ratings module (its registry entry).
subscriptions
Package subscriptions - the subscriptions module: users follow a content item's comments or a term's new content; what happens there becomes their notifications, on the site (the profile's Notifications tab, the user menu) and by e-mail (at once, a daily digest or never).
Package subscriptions - the subscriptions module: users follow a content item's comments or a term's new content; what happens there becomes their notifications, on the site (the profile's Notifications tab, the user menu) and by e-mail (at once, a daily digest or never).
subscriptions/ent
Package ent - the subscriptions module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the subscriptions module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
subscriptions/ent/schema
Package schema - the subscriptions module's own ent schema: its tables, apart from the core's.
Package schema - the subscriptions module's own ent schema: its tables, apart from the core's.
subscriptions/manifest
Package manifest declares the subscriptions module (its registry entry): subscriptions to content's comments and to terms, the notifications of them on the site and by e-mail.
Package manifest declares the subscriptions module (its registry entry): subscriptions to content's comments and to terms, the notifications of them on the site and by e-mail.
video_embed/ent
Package ent - the video embed module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
Package ent - the video embed module's own ent schema (schema/), its generated client (generated/, go generate) and migration files (migrations/<dialect>/, scripts/migrations_gen.sh writes them), apart from the core's: the module's set of migrations (Schema).
video_embed/ent/schema
Package schema - the video embed module's own ent schema: what the video services say about the videos linked in texts, and the module's settings.
Package schema - the video embed module's own ent schema: what the video services say about the videos linked in texts, and the module's settings.
video_embed/manifest
Package manifest declares the video embed module (its registry entry): a link to a video on its own line in a text shows as the video's player.
Package manifest declares the video embed module (its registry entry): a link to a video on its own line in a text shows as the video's player.
Package themeinstall installs, updates and removes the themes kept in their own git repositories (app theme …, internal/app/theme.go): a theme's repository is its directory (theme.yaml at its root), its releases are its tags (v1.2.0).
Package themeinstall installs, updates and removes the themes kept in their own git repositories (app theme …, internal/app/theme.go): a theme's repository is its directory (theme.yaml at its root), its releases are its tags (v1.2.0).

Jump to

Keyboard shortcuts

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