Expand description
§shaperail-core
Shared foundation types for the Shaperail framework.
This crate defines the core data structures that all other Shaperail crates consume: resource definitions, field types, endpoint specs, error handling, and project configuration.
Structs§
- Auth
Config - Authentication configuration.
- Cache
Config - Redis cache configuration.
- Cache
Spec - Cache configuration for an endpoint.
- Channel
Definition - Definition of a WebSocket channel, parsed from a
.channel.yamlfile. - Channel
Hooks - Lifecycle hooks for a WebSocket channel.
- Controller
Spec - Controller specification for synchronous in-request business logic.
- Database
Config - Database connection configuration (legacy single-DB).
- Endpoint
Spec - Specification for a single endpoint in a resource.
- Event
Subscriber - An event subscriber routes events to targets.
- Events
Config - Events and webhooks configuration.
- Field
Error - A single field-level validation error.
- Field
Schema - Definition of a single field in a resource schema.
- GraphQL
Config - GraphQL-specific configuration (M15).
- Grpc
Config - gRPC-specific configuration (M16).
- Inbound
Webhook Config - Inbound webhook endpoint configuration.
- Index
Spec - Specification for a database index.
- Inter
Service Client Config - Configuration for an auto-generated inter-service client.
- Logging
Config - Logging and observability configuration.
- Named
Database Config - Named database connection (M14 multi-database). Used in
databases: <name>: <config>. - Project
Config - Project-level configuration, parsed from
shaperail.config.yaml. - Relation
Spec - Specification for a relationship to another resource.
- Resource
Definition - Complete definition of a Shaperail resource, parsed from a resource YAML file.
- Saga
Definition - A distributed saga definition parsed from
sagas/<name>.saga.yaml. - Saga
Step - A single step within a saga.
- Service
Definition - A single service within a workspace.
- Service
Registry Entry - Entry stored in Redis service registry. Services register on startup and update their heartbeat periodically.
- Shared
Config - Shared configuration inherited by all services in a workspace.
- Storage
Config - Object storage configuration.
- Upload
Spec - File upload configuration for an endpoint.
- Webhook
Config - Global outbound webhook settings.
- Workspace
Config - Workspace configuration parsed from
shaperail.workspace.yaml.
Enums§
- Auth
Rule - Authentication rule for an endpoint.
- Database
Engine - Supported database engines for multi-database (M14).
- Event
Target - A target for event dispatch.
- Field
Type - All supported field types in a Shaperail resource schema.
- Http
Method - HTTP method for an endpoint.
- Pagination
Style - Pagination strategy for list endpoints.
- Relation
Type - Type of relationship between two resources.
- Saga
Execution Status - Runtime status of a saga execution.
- Service
Status - Service health status in the registry.
- Shaperail
Error - Unified error type used across all Shaperail crates.
- Worker
Count - Worker thread count: either automatic or a fixed number.
- WsClient
Message - Client-to-server WebSocket message format.
- WsServer
Message - Server-to-client WebSocket message format.
Constants§
- WASM_
HOOK_ PREFIX - WASM plugin prefix used in controller
before/afterfields.
Functions§
- apply_
endpoint_ defaults - Apply convention-based defaults to all endpoints in a resource.
Fills in missing
methodandpathbased on the endpoint name. - endpoint_
convention - Known endpoint conventions. When the endpoint action name matches one of these, the method and path are inferred automatically.