Documentation
¶
Overview ¶
Package apikit is the HTTP API framework shared by OpenMRP's APIs. Each subpackage is imported on its own; this package holds no code.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package apierror defines the error every API response and service call reports.
|
Package apierror defines the error every API response and service call reports. |
|
Package blobstore keeps large JSON documents in object storage so the database row that owns one holds only its key.
|
Package blobstore keeps large JSON documents in object storage so the database row that owns one holds only its key. |
|
Package cache is a read-through cache for data that is expensive to load and tolerates bounded staleness: the per-request auth lookups and the heavy analytics aggregates.
|
Package cache is a read-through cache for data that is expensive to load and tolerates bounded staleness: the per-request auth lookups and the heavy analytics aggregates. |
|
cloud
|
|
|
sqs
Package sqs is a thin wrapper over the AWS SQS SDK for the consumers that poll a queue.
|
Package sqs is a thin wrapper over the AWS SQS SDK for the consumers that poll a queue. |
|
cmd
|
|
|
txaudit
command
Command txaudit fails when a database transaction callback has an effect a rollback would not undo, which the transaction manager's deadlock retry would repeat.
|
Command txaudit fails when a database transaction callback has an effect a rollback would not undo, which the transaction manager's deadlock retry would repeat. |
|
Package conformance checks an app's endpoints against the forge.1 API conventions.
|
Package conformance checks an app's endpoints against the forge.1 API conventions. |
|
backfill
Package backfill runs one-off data migrations that touch too many rows to run on the deploy path.
|
Package backfill runs one-off data migrations that touch too many rows to run on the deploy path. |
|
Package idempotency lets a client safely retry a write: the first request with an Idempotency-Key runs, and a retry with the same key gets the first response back instead of running again.
|
Package idempotency lets a client safely retry a write: the first request with an Idempotency-Key runs, and a retry with the same key gets the first response back instead of running again. |
|
Package include is the canonical registry for API resources.
|
Package include is the canonical registry for API resources. |
|
Package lease provides a distributed single-holder lease primitive backed by a SQL table.
|
Package lease provides a distributed single-holder lease primitive backed by a SQL table. |
|
Package logging builds canonical log lines: one structured slog record per request, carrying everything needed to find and explain it later (who called, what it was, how long it took, how it ended).
|
Package logging builds canonical log lines: one structured slog record per request, carrying everything needed to find and explain it later (who called, what it was, how long it took, how it ended). |
|
Package metadata is the client-owned string map a resource can carry: the API stores it and returns it unchanged, and never reads it.
|
Package metadata is the client-owned string map a resource can carry: the API stores it and returns it unchanged, and never reads it. |
|
Package middleware holds the HTTP middleware every API shares.
|
Package middleware holds the HTTP middleware every API shares. |
|
Package object holds the shapes every resource API shares: the object type a resource reports in its "object" field, and the standard responses built on it.
|
Package object holds the shapes every resource API shares: the object type a resource reports in its "object" field, and the standard responses built on it. |
|
Package openapi generates an OpenAPI 3 spec, Stainless SDK configs and an agent-tool catalog from an app's endpoint groups.
|
Package openapi generates an OpenAPI 3 spec, Stainless SDK configs and an agent-tool catalog from an app's endpoint groups. |
|
Package querytag carries SQLCommenter tags (https://google.github.io/sqlcommenter/spec/) on a context, so the SQL a request or job runs says which service, RPC, route, consumer or job it came from.
|
Package querytag carries SQLCommenter tags (https://google.github.io/sqlcommenter/spec/) on a context, so the SQL a request or job runs says which service, RPC, route, consumer or job it came from. |
|
Package ratelimit decides whether a caller may make another request.
|
Package ratelimit decides whether a caller may make another request. |
|
Package retry provides configurable retry logic with exponential backoff and jitter.
|
Package retry provides configurable retry logic with exponential backoff and jitter. |
|
Package safeconv provides safe integer conversion functions that clamp values at the target type's boundaries instead of silently overflowing.
|
Package safeconv provides safe integer conversion functions that clamp values at the target type's boundaries instead of silently overflowing. |
|
Package sensitive keeps response fields from callers who may not see them.
|
Package sensitive keeps response fields from callers who may not see them. |
|
Package timeutil provides helpers for parsing timestamp strings used throughout the platform's data layer.
|
Package timeutil provides helpers for parsing timestamp strings used throughout the platform's data layer. |
|
Package tracing provides OpenTelemetry tracing and metrics initialization and helpers for API services.
|
Package tracing provides OpenTelemetry tracing and metrics initialization and helpers for API services. |
|
Package txaudit checks that database transaction callbacks are safe to run more than once.
|
Package txaudit checks that database transaction callbacks are safe to run more than once. |
|
Package validate provides request-level input validation.
|
Package validate provides request-level input validation. |
|
Package version models dated API versions and the transformers that let one server answer every supported version.
|
Package version models dated API versions and the transformers that let one server answer every supported version. |
Click to show internal directories.
Click to hide internal directories.