internal/

directory
v0.31.0-rc.2 Latest Latest
Warning

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

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

README

internal

Private plumbing with no memos vocabulary. A package belongs here only if it could be published tomorrow as a standalone module without changes: it imports nothing from store, core, server, provider, markdown, filter, or proto/gen. The depguard rules in .golangci.yaml enforce that.

Package Purpose
clientip/ trusted-proxy aware client IP resolution middleware
email/ SMTP client, config, and message types
identifier/ grammar of UIDs and usernames shared by parser, store, and API
linkmeta/ HTML metadata, oEmbed, and image fetching for link previews
motionphoto/ Live Photo and Motion Photo container parsing
profile/ process configuration parsed from flags and environment
random/ UUIDs and random strings from a secure source
ratelimit/ sliding-window rate limiter
testutil/ test fixtures and the fake S3 server (the one package allowed to import proto/gen)
version/ build version and version comparison
webhook/ signed webhook delivery with SSRF protection

Do not add util, common, base, or helpers packages. Name a package for the one thing it does, or put the code next to its only caller.

Directories

Path Synopsis
Package clientip resolves the client address of a request from the connection peer and, only when that peer is a trusted proxy, from the forwarding headers it set.
Package clientip resolves the client address of a request from the connection peer and, only when that peer is a trusted proxy, from the forwarding headers it set.
Package email provides SMTP email sending functionality for self-hosted Memos instances.
Package email provides SMTP email sending functionality for self-hosted Memos instances.
Package random generates identifiers and secrets from a cryptographically secure source.
Package random generates identifiers and secrets from a cryptographically secure source.
Package ratelimit bounds how often a caller may do something.
Package ratelimit bounds how often a caller may do something.
fakes3
Package fakes3 provides an in-process S3-compatible service for tests.
Package fakes3 provides an in-process S3-compatible service for tests.

Jump to

Keyboard shortcuts

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