Directories
¶
| Path | Synopsis |
|---|---|
|
Package app is the bootstrap shared by the services: configuration, Mongo or Postgres (Spec.Backend), authentication, the Eve API, /status and /healthcheck.
|
Package app is the bootstrap shared by the services: configuration, Mongo or Postgres (Spec.Backend), authentication, the Eve API, /status and /healthcheck. |
|
behaviors
|
|
|
audit
Package audit records who created and last changed a document: _created_user and _updated_user with the username of the request token (nil when authentication is disabled).
|
Package audit records who created and last changed a document: _created_user and _updated_user with the username of the request token (nil when authentication is disabled). |
|
events
Package events records outbox events in the transaction of a resource write (D-23).
|
Package events records outbox events in the transaction of a resource write (D-23). |
|
searchsync
Package searchsync keeps an Elasticsearch index in sync with a resource, as the resource_callbacks.py of the Eve APIs do: every write indexes the stored document (without _id) and a delete removes it.
|
Package searchsync keeps an Elasticsearch index in sync with a resource, as the resource_callbacks.py of the Eve APIs do: every write indexes the stored document (without _id) and a delete removes it. |
|
ci
|
|
|
affected
command
Command affected prints the services whose binary changed between two commits, one per line, for the CI "detect services" job.
|
Command affected prints the services whose binary changed between two commits, one per line, for the CI "detect services" job. |
|
cmd
|
|
|
hyrule
command
Command hyrule is Hyrule's Platform CLI.
|
Command hyrule is Hyrule's Platform CLI. |
|
hyrule-serve
command
Command hyrule-serve registers the resources declared in a YAML file (declarative) and serves them — no domain-specific Go code at all for the common case the loader covers.
|
Command hyrule-serve registers the resources declared in a YAML file (declarative) and serves them — no domain-specific Go code at all for the common case the loader covers. |
|
Package declarative builds rest.Resource/Schema values from YAML, for the common case — a resource with no custom hooks or business logic (see rest/service.go: settings-api, tags-api, authors-api in examples/blog-apis are entirely this shape already, hand-written).
|
Package declarative builds rest.Resource/Schema values from YAML, for the common case — a resource with no custom hooks or business logic (see rest/service.go: settings-api, tags-api, authors-api in examples/blog-apis are entirely this shape already, hand-written). |
|
examples
|
|
|
blog-apis/cmd/comments-migrate
command
Command comments-migrate performs explicit comments-api schema operations.
|
Command comments-migrate performs explicit comments-api schema operations. |
|
blog-apis/e2e/check-results
command
Command check-results makes JMeter assertion failures fail the harness.
|
Command check-results makes JMeter assertion failures fail the harness. |
|
blog-apis/e2e/mint
command
Command mint signs an RS256 JWT with the e2e harness's generated legacy key, for exercising platform/auth's legacy fallback from JMeter (which has no RS256 JWT signer out of the box).
|
Command mint signs an RS256 JWT with the e2e harness's generated legacy key, for exercising platform/auth's legacy fallback from JMeter (which has no RS256 JWT signer out of the box). |
|
blog-apis/internal/commentsschema
Package commentsschema owns comments-api's versioned table schema.
|
Package commentsschema owns comments-api's versioned table schema. |
|
blog-apis/services/authors-api
command
Command authors-api is the simplest example of the blog-apis suite: a resource described entirely by its schema, with zero business-specific Go code — a candidate to become a plain YAML definition once the framework's declarative resource loader exists.
|
Command authors-api is the simplest example of the blog-apis suite: a resource described entirely by its schema, with zero business-specific Go code — a candidate to become a plain YAML definition once the framework's declarative resource loader exists. |
|
blog-apis/services/categories-api
command
Command categories-api demonstrates a hierarchical resource: a materialized path kept up to date on every write, and a custom GET /categories/tree endpoint built straight from the Store interface (no raw *mongo.Collection in sight).
|
Command categories-api demonstrates a hierarchical resource: a materialized path kept up to date on every write, and a custom GET /categories/tree endpoint built straight from the Store interface (no raw *mongo.Collection in sight). |
|
blog-apis/services/comments-api
command
Command comments-api is Fase 7's end-to-end proof for the Postgres path: a real resource (blog comments) served over real HTTP by a real binary, backed by platform/postgres+restpostgres instead of Mongo.
|
Command comments-api is Fase 7's end-to-end proof for the Postgres path: a real resource (blog comments) served over real HTTP by a real binary, backed by platform/postgres+restpostgres instead of Mongo. |
|
blog-apis/services/posts-api
command
Command posts-api is the richest example of the blog-apis suite: a resource with relations to authors-api/categories-api/tags-api, custom publish/schedule endpoints, outbox events, a Redis-backed scheduling index and Elasticsearch indexing.
|
Command posts-api is the richest example of the blog-apis suite: a resource with relations to authors-api/categories-api/tags-api, custom publish/schedule endpoints, outbox events, a Redis-backed scheduling index and Elasticsearch indexing. |
|
blog-apis/services/tags-api
command
Command tags-api is another zero-business-logic example: a resource with a Unique field and a slug lookup, nothing else.
|
Command tags-api is another zero-business-logic example: a resource with a Unique field and a slug lookup, nothing else. |
|
internal
|
|
|
domain/slug
Package slug is python-slugify's default slugify, used by the APIs and workers that turn tag names into {slug, name}.
|
Package slug is python-slugify's default slugify, used by the APIs and workers that turn tag names into {slug, name}. |
|
pgexplain
Package pgexplain supports manual local integration gates.
|
Package pgexplain supports manual local integration gates. |
|
Package outbox implements the transactional outbox (D-10, D-23): a write stores its events in the outbox collection in the same Mongo transaction, and the Relay publishes them after the commit.
|
Package outbox implements the transactional outbox (D-10, D-23): a write stores its events in the outbox collection in the same Mongo transaction, and the Relay publishes them after the commit. |
|
Package outboxpostgres is the Postgres counterpart to outbox's Mongo-backed Outbox/Relay -- the same pattern platform/postgres and restpostgres already follow relative to platform/mongodb and rest: a separate package per backend, never a type switch inside the original one.
|
Package outboxpostgres is the Postgres counterpart to outbox's Mongo-backed Outbox/Relay -- the same pattern platform/postgres and restpostgres already follow relative to platform/mongodb and rest: a separate package per backend, never a type switch inside the original one. |
|
platform
|
|
|
auth
Package auth validates requests: an Azure AD token is tried first and, when the token isn't an Azure one (no kid, unknown kid), it falls back to a static RS256 key — for a secondary issuer, service-to-service tokens, or any other static key a deployment wants to trust alongside Azure AD.
|
Package auth validates requests: an Azure AD token is tried first and, when the token isn't an Azure one (no kid, unknown kid), it falls back to a static RS256 key — for a secondary issuer, service-to-service tokens, or any other static key a deployment wants to trust alongside Azure AD. |
|
config
Package config loads the service configuration from properties-api, the Spring Cloud Config Server that serves the config-files repository.
|
Package config loads the service configuration from properties-api, the Spring Cloud Config Server that serves the config-files repository. |
|
health
Package health serves /status and /healthcheck with the bodies of the Eve APIs (endpoints/status.py and eve-healthcheck), which monitoring and the Kubernetes probes already read.
|
Package health serves /status and /healthcheck with the bodies of the Eve APIs (endpoints/status.py and eve-healthcheck), which monitoring and the Kubernetes probes already read. |
|
httppath
Package httppath contains the path operations shared by Hyrule's HTTP router and REST helpers.
|
Package httppath contains the path operations shared by Hyrule's HTTP router and REST helpers. |
|
lease
Package lease elects one active replica through a document in Mongo, as the outbox relay does: the holder renews the lease before it expires, and another replica takes it only after it expires or is released.
|
Package lease elects one active replica through a document in Mongo, as the outbox relay does: the holder renews the lease before it expires, and another replica takes it only after it expires or is released. |
|
metrics
Package metrics exposes the Prometheus metrics of an API at /metrics: the duration and the response size of every request by method, route and status, plus the Go runtime and the process.
|
Package metrics exposes the Prometheus metrics of an API at /metrics: the duration and the response size of every request by method, route and status, plus the Go runtime and the process. |
|
mongodb
Package mongodb connects to Mongo with the settings read by the Eve APIs.
|
Package mongodb connects to Mongo with the settings read by the Eve APIs. |
|
mongodb/mongotest
Package mongotest prepares the Mongo of the tests: a server started with --replSet but not initiated yet (a CI service container) is initiated as a single node replica set, and every caller waits until it has a primary.
|
Package mongotest prepares the Mongo of the tests: a server started with --replSet but not initiated yet (a CI service container) is initiated as a single node replica set, and every caller waits until it has a primary. |
|
postgres
Package postgres is the Postgres counterpart to platform/mongodb: Store here follows the same pattern platform/mongodb.Store does (its own types, not an implementation of rest.Store), but stays deliberately narrow -- an equality-only Filter over flat columns (see Filter's own doc comment below).
|
Package postgres is the Postgres counterpart to platform/mongodb: Store here follows the same pattern platform/mongodb.Store does (its own types, not an implementation of rest.Store), but stays deliberately narrow -- an equality-only Filter over flat columns (see Filter's own doc comment below). |
|
pubsub
Package pubsub connects to Google Pub/Sub with the settings read from config.Config.
|
Package pubsub connects to Google Pub/Sub with the settings read from config.Config. |
|
redis
Package redis connects to Redis with the settings read from config.Config:
|
Package redis connects to Redis with the settings read from config.Config: |
|
search
Package search writes to Elasticsearch through its REST API (PUT/POST/DELETE /{index}/_doc|_update/{id}), which is what the Python client 7.x used by the Eve APIs and workers does, so no client library is needed.
|
Package search writes to Elasticsearch through its REST API (PUT/POST/DELETE /{index}/_doc|_update/{id}), which is what the Python client 7.x used by the Eve APIs and workers does, so no client library is needed. |
|
server
Package server holds the bootstrap shared by the services: logging, the HTTP server and graceful shutdown.
|
Package server holds the bootstrap shared by the services: logging, the HTTP server and graceful shutdown. |
|
Package rest serves Mongo collections with the HTTP contract of Python Eve, so the gateways that call the Eve APIs keep working unchanged: where/sort/projection/page/max_results, the _items/_links/_meta envelope, If-Match/ETag, Eve's error envelope and Cerberus validation messages.
|
Package rest serves Mongo collections with the HTTP contract of Python Eve, so the gateways that call the Eve APIs keep working unchanged: where/sort/projection/page/max_results, the _items/_links/_meta envelope, If-Match/ETag, Eve's error envelope and Cerberus validation messages. |
|
Package restpostgres implements a rest.Resource's storage contract against Postgres: the first (and, for now, only) package that imports both rest and platform/postgres, so neither of those needs to know the other exists.
|
Package restpostgres implements a rest.Resource's storage contract against Postgres: the first (and, for now, only) package that imports both rest and platform/postgres, so neither of those needs to know the other exists. |
|
Package testkit has the helpers shared by the service tests: an isolated Mongo database, an Elasticsearch recorder, token signing and an HTTP client for handlers.
|
Package testkit has the helpers shared by the service tests: an isolated Mongo database, an Elasticsearch recorder, token signing and an HTTP client for handlers. |
Click to show internal directories.
Click to hide internal directories.