Skip to main content

Crate snip_sync

Crate snip_sync 

Source

Re-exports§

pub use db::Database;
pub use metrics::Metrics;
pub use premade::PremadeManager;
pub use rate_limiter::RateLimiter;

Modules§

bootstrap
cert
cli
db
editor
metrics
orchestration
Server shutdown orchestration.
paths
premade
process
Process helpers used by stop/restart and the croncheck maintenance lock.
rate_limiter
server_lock
Kernel-backed singleton lock for the snip-sync server.
startup
Cross-platform startup registration for the foreground snip-sync server.

Structs§

AppState
Config
ConfigFile
CorsConfig
DatabaseConfig
LimitsConfig
MetricsConfig
PremadeConfig
RateLimitConfig
ServerConfig
SnipSyncService

Enums§

ConfigLoadError

Constants§

DEFAULT_DB_MAX_CONNECTIONS
DEFAULT_GRPC_MAX_MESSAGE_SIZE
DEFAULT_MAX_API_KEY_LENGTH
DEFAULT_MAX_COMMAND_LENGTH
DEFAULT_MAX_DESCRIPTION_LENGTH
DEFAULT_MAX_DEVICE_ID_LENGTH
DEFAULT_MAX_ID_LENGTH
DEFAULT_MAX_SYNC_SNIPPETS
DEFAULT_MAX_TAGS
DEFAULT_MAX_TAG_LENGTH
DEFAULT_RATE_LIMIT_PER_MINUTE
DEFAULT_REQUEST_TIMEOUT_SECS
MAX_REQUEST_LIMIT
Hard upper bound for any single request’s page size. Endpoints choose their own default page size when the client omits one (sync → 1000, get_snippets → 100, list_libraries → 50); all are clamped here.

Functions§

extract_api_key
Extract the API key from a gRPC request’s authorization metadata. Falls back to the body api_key field for backward compatibility.
parse_bool_env
Parse an optional boolean environment variable.
parse_env
Parse an optional environment variable, returning the typed value if present and valid.