Crate pallet_schemas
source ·Expand description
§Schemas Pallet
The Schemas pallet provides functionality for handling schemas.
- Configuration:
Config
- Extrinsics:
Call
- Runtime API:
SchemasRuntimeApi
- Custom RPC API:
SchemasApiServer
- Event Enum:
Event
- Error Enum:
Error
§Overview
This pallet provides an on chain repository for schemas, thereby allowing participants of the network to flexibly interact and exchange messages with each other without facing the challenge of sharing, managing and validating messages as well as schemas between them.
NOTE: In this pallet we define the payload structure that is used in Messages Pallet.
The Schema pallet provides functions for:
- Registering a new schema.
- Setting maximum schema model size by governance.
- Retrieving latest registered schema id.
- Retrieving schemas by their id.
§Terminology
- Schema: The structure that defines how a Message is stored and structured.
- Schema Model: Serialization/Deserialization details of the schema
- Schema Model Type: The type of the following Serialization/Deserialization. It can be Avro, Parquet or …
§Implementations
SchemaValidator
: Functions for accessing and validating Schemas. This implementation is what is used in the runtime.SchemaProvider
: Allows another pallet to resolve schema information.
§Genesis config
The Schemas pallet depends on the GenesisConfig
.
Re-exports§
Modules§
- migration module
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet. - Autogenerated weights for pallet_schemas
Structs§
- A structure defining a Schema information (excluding the payload)
- A structure defining name of a schema
- A structure defining name of a schema
Constants§
- The maximum size of a schema descriptor
- The minimum size of a schema descriptor
- maximum number of versions for a certain schema name -1 is to avoid overflow when converting the (index + 1) to
SchemaVersion
inSchemaVersionId
- The maximum size of a namespace in schema
- The minimum size of a namespace in schema
- The maximum size of schema name including all parts
- Current storage version of the schemas pallet.
- separator character
Type Aliases§
- schema descriptor type
- A schema name following following structure NAMESPACE.DESCRIPTOR
- schema namespace type