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

internal/

directory
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT

Directories

Path Synopsis
Package acl implements per-user / per-file&folder access control for filex.
Package acl implements per-user / per-file&folder access control for filex.
Package antivirus wraps ClamAV behind a small Scan API ("Koru" v0.4).
Package antivirus wraps ClamAV behind a small Scan API ("Koru" v0.4).
api
Package api — demo_guard.go
Package api — demo_guard.go
handlers
Package handlers — account_rules.go
Package handlers — account_rules.go
Package archivecli runs operator-provided archive tools behind a small, fixed interface.
Package archivecli runs operator-provided archive tools behind a small, fixed interface.
Package auth — audit_middleware.go
Package auth — audit_middleware.go
drivers/apitoken
Package apitoken implements bearer-token authentication for non-interactive callers: AI agents, the work.example.com FilexClient, and the embedded MCP server.
Package apitoken implements bearer-token authentication for non-interactive callers: AI agents, the work.example.com FilexClient, and the embedded MCP server.
drivers/ldap
Package ldap implements simple-bind LDAP/Active Directory authentication.
Package ldap implements simple-bind LDAP/Active Directory authentication.
drivers/local
Package local implements username + password authentication backed by the users table.
Package local implements username + password authentication backed by the users table.
drivers/multioidc
Package multioidc dispatches OIDC flows to per-tenant IdP realms (docs/MULTI-TENANCY.md §5,§7).
Package multioidc dispatches OIDC flows to per-tenant IdP realms (docs/MULTI-TENANCY.md §5,§7).
drivers/oidc
Package oidc implements OpenID Connect authentication.
Package oidc implements OpenID Connect authentication.
drivers/proxyheader
Package proxyheader implements authentication via headers injected by a trusted upstream reverse proxy (nginx, Caddy, oauth2-proxy, Cloudflare Access, Authelia, …).
Package proxyheader implements authentication via headers injected by a trusted upstream reverse proxy (nginx, Caddy, oauth2-proxy, Cloudflare Access, Authelia, …).
Package authsetup builds the instance's sign-in providers and keeps the live set of them — the ONE place a provider is constructed, whether the environment/config file or the Admin → Identity providers page asked for it.
Package authsetup builds the instance's sign-in providers and keeps the live set of them — the ONE place a provider is constructed, whether the environment/config file or the Admin → Identity providers page asked for it.
Package basepath serves filex under a path prefix — a "sub-path deployment", `https://example.com/filex/` behind a reverse proxy — and answers, for the code that builds browser-facing URLs, "what is this install's base?".
Package basepath serves filex under a path prefix — a "sub-path deployment", `https://example.com/filex/` behind a reverse proxy — and answers, for the code that builds browser-facing URLs, "what is this install's base?".
Package capability probes runtime feature availability — both binary tools (ffmpeg, gs, libreoffice, vips) and external HTTP services (OnlyOffice, Drawio).
Package capability probes runtime feature availability — both binary tools (ffmpeg, gs, libreoffice, vips) and external HTTP services (OnlyOffice, Drawio).
Package cliclient implements the HTTP client behind `filex client` — the subcommand family that talks to a REMOTE filex server over its public REST API.
Package cliclient implements the HTTP client behind `filex client` — the subcommand family that talks to a REMOTE filex server over its public REST API.
Package cloud is the self-serve cloud/SaaS PREPARATION skeleton (v0.7 "Kimlik" E3 — docs/CLOUD.md).
Package cloud is the self-serve cloud/SaaS PREPARATION skeleton (v0.7 "Kimlik" E3 — docs/CLOUD.md).
Package comments implements flat, chronological comment threads on file/folder nodes (v0.6 "Çalışma" (Work) wave, migration 00020).
Package comments implements flat, chronological comment threads on file/folder nodes (v0.6 "Çalışma" (Work) wave, migration 00020).
Package config loads filex configuration from a YAML file with environment variable overrides (FILEX_*).
Package config loads filex configuration from a YAML file with environment variable overrides (FILEX_*).
Package confine implements per-request root confinement for the /api/files surface.
Package confine implements per-request root confinement for the /api/files surface.
Package dav exposes filex storages as a WebDAV server under /dav.
Package dav exposes filex storages as a WebDAV server under /dav.
Package davlock is the WebDAV lock system, and it exists because the one filex shipped with was a lie.
Package davlock is the WebDAV lock system, and it exists because the one filex shipped with was a lie.
db
Package db defines a Driver interface that wraps a *sql.DB and exposes the typed Store interface used by the rest of the codebase.
Package db defines a Driver interface that wraps a *sql.DB and exposes the typed Store interface used by the rest of the codebase.
drivers/mysql
Package mysql is the MySQL/MariaDB DB driver.
Package mysql is the MySQL/MariaDB DB driver.
drivers/postgres
Package postgres is the PostgreSQL DB driver.
Package postgres is the PostgreSQL DB driver.
drivers/sqlite
Package sqlite is the SQLite DB driver.
Package sqlite is the SQLite DB driver.
Package dbsetting — bool.go
Package dbsetting — bool.go
Package diskfree probes the free space on the filesystem holding a directory.
Package diskfree probes the free space on the filesystem holding a directory.
Package e2e carries the server-side AWARENESS of client-side (E2E) encrypted folders — nothing more.
Package e2e carries the server-side AWARENESS of client-side (E2E) encrypted folders — nothing more.
Package enginebin answers one question for the whole server: which of the heavy conversion programs — ffmpeg, ImageMagick, LibreOffice, Ghostscript, poppler, rsvg — are installed here, and which binary each one is.
Package enginebin answers one question for the whole server: which of the heavy conversion programs — ffmpeg, ImageMagick, LibreOffice, Ghostscript, poppler, rsvg — are installed here, and which binary each one is.
Package external is the one place the runtime asks "how is OnlyOffice / drawio / the converter configured right now?".
Package external is the one place the runtime asks "how is OnlyOffice / drawio / the converter configured right now?".
Package filebody answers the one question every surface that serves file bytes has had to ask since uploads became staged: where are this file's bytes RIGHT NOW?
Package filebody answers the one question every surface that serves file bytes has had to ask since uploads became staged: where are this file's bytes RIGHT NOW?
Package filecache keeps a local copy of a big file that lives on a slow backend, so that the request which pays for the transfer is honest about it ("preparing… 40 %") and every request after it is served at local-disk speed.
Package filecache keeps a local copy of a big file that lives on a slow backend, so that the request which pays for the transfer is honest about it ("preparing… 40 %") and every request after it is served at local-disk speed.
Package filesync keeps a local folder and a remote filex folder in step.
Package filesync keeps a local folder and a remote filex folder in step.
Package ftpsrv serves FTPS: filex, reached by the equipment that only ever learned one protocol.
Package ftpsrv serves FTPS: filex, reached by the equipment that only ever learned one protocol.
Package httpx holds the small HTTP details that have to be identical everywhere filex writes a response.
Package httpx holds the small HTTP details that have to be identical everywhere filex writes a response.
Package identity owns the rules for account login names, and the single door that turns a typed identifier into a user.
Package identity owns the rules for account login names, and the single door that turns a typed identifier into a user.
Package identitystore guarantees that every account has a login name.
Package identitystore guarantees that every account has a login name.
Package mailer sends transactional email (share/invite notices) over an operator-configured SMTP server.
Package mailer sends transactional email (share/invite notices) over an operator-configured SMTP server.
Package metrics is filex's Prometheus surface.
Package metrics is filex's Prometheus surface.
Package mountfs is the filesystem behind `filex mount` — a remote filex server, seen as a folder on the machine that runs the command.
Package mountfs is the filesystem behind `filex mount` — a remote filex server, seen as a folder on the machine that runs the command.
Package namefold is the one rule for when two spellings of a name are the same text: what a search compares, and the part of a tag's identity that is about letters rather than whitespace.
Package namefold is the one rule for when two spellings of a name are the same text: what a search compares, and the part of a tag's identity that is about letters rather than whitespace.
Package netguard is the one answer to "may filex dial this address?".
Package netguard is the one answer to "may filex dial this address?".
Package newdoc answers one question: what are the BYTES of a brand-new, empty document of type X?
Package newdoc answers one question: what are the BYTES of a brand-new, empty document of type X?
Package nfssrv serves NFSv3: filex, mounted as a network drive by anything on the LAN that speaks the NAS protocol.
Package nfssrv serves NFSv3: filex, mounted as a network drive by anything on the LAN that speaks the NAS protocol.
Package notify is filex' notification subsystem.
Package notify is filex' notification subsystem.
Package observability wires optional Sentry-wire error reporting (e.g.
Package observability wires optional Sentry-wire error reporting (e.g.
Package onlyoffice integrates a self-hosted OnlyOffice Document Server with filex storage backends.
Package onlyoffice integrates a self-hosted OnlyOffice Document Server with filex storage backends.
Package ops manages the async queue of long-running file operations (copy/move/delete) so the HTTP request can return promptly while the actual byte movement happens in a worker goroutine.
Package ops manages the async queue of long-running file operations (copy/move/delete) so the HTTP request can return promptly while the actual byte movement happens in a worker goroutine.
Package pathkey derives the storage-scoped cache key (a node's path_hash) that addresses rows in the nodes table.
Package pathkey derives the storage-scoped cache key (a node's path_hash) that addresses rows in the nodes table.
Package plugin lets a storage driver live OUTSIDE the filex binary.
Package plugin lets a storage driver live OUTSIDE the filex binary.
gen command
Command gen writes driver_shapes.go: one concrete type per capability combination a plugin can declare.
Command gen writes driver_shapes.go: one concrete type per capability combination a plugin can declare.
testplugin
Package testplugin runs a real filex storage plugin — the HTTP/JSON protocol of internal/plugin, served over httptest — so any package that consumes a storage.Driver can be exercised against a PLUGIN-backed storage without spawning a second process.
Package testplugin runs a real filex storage plugin — the HTTP/JSON protocol of internal/plugin, served over httptest — so any package that consumes a storage.Driver can be exercised against a PLUGIN-backed storage without spawning a second process.
Package protocolauth is the single door through which every non-HTTP protocol gets its caller.
Package protocolauth is the single door through which every non-HTTP protocol gets its caller.
Package protocolsync keeps the DB node cache, the search index, the thumbnails and the write hooks in step with what a protocol server just did to the bytes.
Package protocolsync keeps the DB node cache, the search index, the thumbnails and the write hooks in step with what a protocol server just did to the bytes.
Package queue is filex' driver-based persistent operation queue.
Package queue is filex' driver-based persistent operation queue.
drivers/postgres
Package postgres is the production HA queue driver.
Package postgres is the production HA queue driver.
drivers/redis
Package redis is the Redis-backed queue driver.
Package redis is the Redis-backed queue driver.
drivers/sqlite
Package sqlite is the default queue driver, sharing the filex DB file with the metadata store.
Package sqlite is the default queue driver, sharing the filex DB file with the metadata store.
Package quota tracks per-user storage usage and enforces the users.quota_bytes ceiling at upload time.
Package quota tracks per-user storage usage and enforces the users.quota_bytes ceiling at upload time.
Package quotastore is the single place where per-user storage usage is accounted.
Package quotastore is the single place where per-user storage usage is accounted.
Package realtime implements the WebSocket hub behind filex's live collaboration surface: per-folder "rooms" that broadcast (1) file-change events so every viewer's listing updates without a manual refresh and (2) presence so viewers can see who else is in the same folder and which file each is focused on.
Package realtime implements the WebSocket hub behind filex's live collaboration surface: per-folder "rooms" that broadcast (1) file-change events so every viewer's listing updates without a manual refresh and (2) presence so viewers can see who else is in the same folder and which file each is focused on.
Package regfile opens files that are REGULAR files, and nothing else.
Package regfile opens files that are REGULAR files, and nothing else.
Package replica is the orchestration layer that ties the storage ReplicatedDriver to the DB (failure rows, rules, settings) and to the notify subsystem (webhook + bell events).
Package replica is the orchestration layer that ties the storage ReplicatedDriver to the DB (failure rows, rules, settings) and to the notify subsystem (webhook + bell events).
Package s3api serves the S3 wire protocol on top of filex storages.
Package s3api serves the S3 wire protocol on top of filex storages.
Package scanrule is the ONE answer to "does the scan walk this path of this storage?" (issue #44).
Package scanrule is the ONE answer to "does the scan walk this path of this storage?" (issue #44).
Package search wraps the embedded Bleve index used for fast filename (and optionally content) lookup across all storages.
Package search wraps the embedded Bleve index used for fast filename (and optionally content) lookup across all storages.
extract
Package extract turns file bytes into plain text for the search index's `content` field ("Bul" wave, v0.2).
Package extract turns file bytes into plain text for the search index's `content` field ("Bul" wave, v0.2).
Package secretbox encrypts the secrets filex must be able to READ BACK.
Package secretbox encrypts the secrets filex must be able to READ BACK.
Package server contains the HTTP server lifecycle, the first-run detector that bootstraps an admin user, and the boot banner.
Package server contains the HTTP server lifecycle, the first-run detector that bootstraps an admin user, and the boot banner.
Package sftpsrv serves SFTP: filex, seen by every client that already knows how to talk to a file server over SSH.
Package sftpsrv serves SFTP: filex, seen by every client that already knows how to talk to a file server over SSH.
Package share manages public download tokens with optional PIN protection, expiry, and download caps.
Package share manages public download tokens with optional PIN protection, expiry, and download caps.
Package sharezip caches the ZIP archive produced when a shared FOLDER is downloaded ("download all").
Package sharezip caches the ZIP archive produced when a shared FOLDER is downloaded ("download all").
Package srvtext is the catalogue of every sentence the SERVER writes to a person: e-mails, the no-JavaScript pages behind a share or drop link, the Apps install review's permission descriptions, the NOT.txt beside a drop.
Package srvtext is the catalogue of every sentence the SERVER writes to a person: e-mails, the no-JavaScript pages behind a share or drop link, the Apps install review's permission descriptions, the NOT.txt beside a drop.
Package staging is filex's own upload staging area: the bytes of an upload land here first, on local disk, and are transferred to the storage driver afterwards by a background op.
Package staging is filex's own upload staging area: the bytes of an upload land here first, on local disk, and are transferred to the storage driver afterwards by a background op.
Package storage provides the abstract Storage Driver interface used to front any byte-stream backend (local FS, S3, SFTP, WebDAV, …).
Package storage provides the abstract Storage Driver interface used to front any byte-stream backend (local FS, S3, SFTP, WebDAV, …).
drivers/ftp
Package ftp is a Storage Driver fronting a plain FTP (or FTPS) server.
Package ftp is a Storage Driver fronting a plain FTP (or FTPS) server.
drivers/local
Package local is a Storage Driver fronting an on-disk directory.
Package local is a Storage Driver fronting an on-disk directory.
drivers/s3
Package s3 is a Storage Driver fronting any S3-compatible object store.
Package s3 is a Storage Driver fronting any S3-compatible object store.
drivers/sftp
Package sftp is a Storage Driver fronting an SSH/SFTP server.
Package sftp is a Storage Driver fronting an SSH/SFTP server.
drivers/smb
Package smb is a Storage Driver fronting an SMB2/3 share — a NAS, a Windows file server, a Samba box.
Package smb is a Storage Driver fronting an SMB2/3 share — a NAS, a Windows file server, a Samba box.
drivers/webdav
Package webdav is a Storage Driver fronting a WebDAV server.
Package webdav is a Storage Driver fronting a WebDAV server.
stall
Package stall bounds how long a storage driver waits for a backend that does not answer, without ever cutting a transfer that keeps moving.
Package stall bounds how long a storage driver waits for a backend that does not answer, without ever cutting a transfer that keeps moving.
Package storageref resolves the first path segment of a file-protocol address to a storage.
Package storageref resolves the first path segment of a file-protocol address to a storage.
Package sync implements the storage-to-DB sync worker.
Package sync implements the storage-to-DB sync worker.
Package syspath is the ONE definition of the directories filex keeps for itself inside a storage, and of how a path is judged against them.
Package syspath is the ONE definition of the directories filex keeps for itself inside a storage, and of how a path is judged against them.
Package tagname decides what a tag is CALLED and when two tags are the SAME.
Package tagname decides what a tag is CALLED and when two tags are the SAME.
Package tenant carries the resolved tenant (provider) scope through a request.
Package tenant carries the resolved tenant (provider) scope through a request.
Package tenantstore wraps a db.Store so storage listings are confined to the request's tenant scope (see docs/MULTI-TENANCY.md).
Package tenantstore wraps a db.Store so storage listings are confined to the request's tenant scope (see docs/MULTI-TENANCY.md).
Package tenanturl answers one question for the whole server: which origin should an absolute URL that filex hands out be built on?
Package tenanturl answers one question for the whole server: which origin should an absolute URL that filex hands out be built on?
Package testutil provides shared helpers for unit + integration tests across the filex codebase.
Package testutil provides shared helpers for unit + integration tests across the filex codebase.
archivetest
Package archivetest builds hostile archives for tests.
Package archivetest builds hostile archives for tests.
dbtest
Package dbtest provides minimal DB+model test helpers without depending on auth/capability/share — so it is safe to import from the test files of those packages without creating an import cycle.
Package dbtest provides minimal DB+model test helpers without depending on auth/capability/share — so it is safe to import from the test files of those packages without creating an import cycle.
fakeidp
Package fakeidp is a minimal OpenID Connect provider for tests: discovery, a JWKS, an authorization endpoint that signs the current identity in at once, a token endpoint that answers with an RS256-signed id_token for that identity, and an end-session endpoint (RP-initiated logout) that records who asked.
Package fakeidp is a minimal OpenID Connect provider for tests: discovery, a JWKS, an authorization endpoint that signs the current identity in at once, a token endpoint that answers with an RS256-signed id_token for that identity, and an end-session endpoint (RP-initiated logout) that records who asked.
wasmfixture
Package wasmfixture guards the tests that load the echo app fixture (internal/wasmplugin/testdata/echo/echo.wasm): the module is built, and it was built from the sources beside it.
Package wasmfixture guards the tests that load the echo app fixture (internal/wasmplugin/testdata/echo/echo.wasm): the module is built, and it was built from the sources beside it.
Package throughput is the process-wide answer to one question: "how fast is this storage right now?"
Package throughput is the process-wide answer to one question: "how fast is this storage right now?"
Package thumb generates and serves thumbnail images for nodes.
Package thumb generates and serves thumbnail images for nodes.
Package trash implements retention-based purging of soft-deleted nodes.
Package trash implements retention-based purging of soft-deleted nodes.
Package update implements filex's release awareness: it learns which versions exist, decides what may be applied automatically, and (on installs that own their binary) applies them.
Package update implements filex's release awareness: it learns which versions exist, decides what may be applied automatically, and (on installs that own their binary) applies them.
Package usage answers a question filex could not answer at all: what does the storage behind it cost?
Package usage answers a question filex could not answer at all: what does the storage behind it cost?
Package version exposes build-time version metadata.
Package version exposes build-time version metadata.
Package versioning persists historical snapshots of node contents inside the same storage backend, under a `.versions/<node_id>/<version_n>` prefix.
Package versioning persists historical snapshots of node contents inside the same storage backend, under a `.versions/<node_id>/<version_n>` prefix.
Package wasmplugin runs filex "app plugins": WebAssembly modules executed inside the filex process by wazero (through the Extism host SDK), with no access to the host's filesystem, network, environment or database — only to the host functions filex exposes, each gated by a permission the administrator granted at install.
Package wasmplugin runs filex "app plugins": WebAssembly modules executed inside the filex process by wazero (through the Extism host SDK), with no access to the host's filesystem, network, environment or database — only to the host functions filex exposes, each gated by a permission the administrator granted at install.
Package writegate is the one question every person-facing write asks before it touches a storage: may this path be changed?
Package writegate is the one question every person-facing write asks before it touches a storage: may this path be changed?
Package writehook is the single post-write side-effect gate for every file-producing/mutating surface (manager, AI/MCP, ShareX, DAV, async ops worker).
Package writehook is the single post-write side-effect gate for every file-producing/mutating surface (manager, AI/MCP, ShareX, DAV, async ops worker).
Package zipstream is the one place filex turns a set of files into a ZIP that is written out as it is built.
Package zipstream is the one place filex turns a set of files into a ZIP that is written out as it is built.

Jump to

Keyboard shortcuts

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