Skip to main content

Crate shaperail_core

Crate shaperail_core 

Source
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§

AuthConfig
Authentication configuration.
CacheConfig
Redis cache configuration.
CacheSpec
Cache configuration for an endpoint.
ChannelDefinition
Definition of a WebSocket channel, parsed from a .channel.yaml file.
ChannelHooks
Lifecycle hooks for a WebSocket channel.
ControllerSpec
Controller specification for synchronous in-request business logic.
DatabaseConfig
Database connection configuration (legacy single-DB).
EndpointSpec
Specification for a single endpoint in a resource.
EventSubscriber
An event subscriber routes events to targets.
EventsConfig
Events and webhooks configuration.
FieldError
A single field-level validation error.
FieldSchema
Definition of a single field in a resource schema.
GraphQLConfig
GraphQL-specific configuration (M15).
GrpcConfig
gRPC-specific configuration (M16).
InboundWebhookConfig
Inbound webhook endpoint configuration.
IndexSpec
Specification for a database index.
InterServiceClientConfig
Configuration for an auto-generated inter-service client.
LoggingConfig
Logging and observability configuration.
NamedDatabaseConfig
Named database connection (M14 multi-database). Used in databases: <name>: <config>.
ProjectConfig
Project-level configuration, parsed from shaperail.config.yaml.
RelationSpec
Specification for a relationship to another resource.
ResourceDefinition
Complete definition of a Shaperail resource, parsed from a resource YAML file.
SagaDefinition
A distributed saga definition parsed from sagas/<name>.saga.yaml.
SagaStep
A single step within a saga.
ServiceDefinition
A single service within a workspace.
ServiceRegistryEntry
Entry stored in Redis service registry. Services register on startup and update their heartbeat periodically.
SharedConfig
Shared configuration inherited by all services in a workspace.
StorageConfig
Object storage configuration.
UploadSpec
File upload configuration for an endpoint.
WebhookConfig
Global outbound webhook settings.
WorkspaceConfig
Workspace configuration parsed from shaperail.workspace.yaml.

Enums§

AuthRule
Authentication rule for an endpoint.
DatabaseEngine
Supported database engines for multi-database (M14).
EventTarget
A target for event dispatch.
FieldType
All supported field types in a Shaperail resource schema.
HttpMethod
HTTP method for an endpoint.
PaginationStyle
Pagination strategy for list endpoints.
RelationType
Type of relationship between two resources.
SagaExecutionStatus
Runtime status of a saga execution.
ServiceStatus
Service health status in the registry.
ShaperailError
Unified error type used across all Shaperail crates.
WorkerCount
Worker thread count: either automatic or a fixed number.
WsClientMessage
Client-to-server WebSocket message format.
WsServerMessage
Server-to-client WebSocket message format.

Constants§

WASM_HOOK_PREFIX
WASM plugin prefix used in controller before/after fields.

Functions§

apply_endpoint_defaults
Apply convention-based defaults to all endpoints in a resource. Fills in missing method and path based 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.