Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
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-serve
command
Command hyrule-serve registers the resources declared in a YAML file (internal/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 (internal/declarative) and serves them β no domain-specific Go code at all for the common case the loader covers. |
|
examples
|
|
|
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/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
|
|
|
app
Package app is the bootstrap shared by the services: configuration, Mongo, authentication, the Eve API, /status and /healthcheck.
|
Package app is the bootstrap shared by the services: configuration, Mongo, 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). |
|
behaviors/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). |
|
behaviors/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. |
|
declarative
Package declarative builds evecompat.Resource/Schema values from YAML, for the common case β a resource with no custom hooks or business logic (see internal/evecompat/service.go: settings-api, tags-api, authors-api in examples/blog-apis are entirely this shape already, hand-written).
|
Package declarative builds evecompat.Resource/Schema values from YAML, for the common case β a resource with no custom hooks or business logic (see internal/evecompat/service.go: settings-api, tags-api, authors-api in examples/blog-apis are entirely this shape already, hand-written). |
|
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}. |
|
evecompat
Package evecompat 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 evecompat 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. |
|
outbox
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. |
|
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. |
|
platform/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. |
|
platform/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. |
|
platform/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. |
|
platform/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. |
|
platform/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. |
|
platform/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. |
|
platform/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. |
|
platform/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: |
|
platform/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. |
|
platform/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. |
|
testkit
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.