Safe Haskell | None |
---|---|
Language | Haskell2010 |
- schemaRegistry :: MonadIO m => String -> m SchemaRegistry
- loadSchema :: MonadIO m => SchemaRegistry -> SchemaId -> m (Either SchemaRegistryError Schema)
- sendSchema :: MonadIO m => SchemaRegistry -> Subject -> Schema -> m (Either SchemaRegistryError SchemaId)
- newtype SchemaId = SchemaId {
- unSchemaId :: Int32
- newtype Subject = Subject {}
- data SchemaRegistry
- data SchemaRegistryError
- type Schema = Type
Documentation
schemaRegistry :: MonadIO m => String -> m SchemaRegistry Source #
loadSchema :: MonadIO m => SchemaRegistry -> SchemaId -> m (Either SchemaRegistryError Schema) Source #
sendSchema :: MonadIO m => SchemaRegistry -> Subject -> Schema -> m (Either SchemaRegistryError SchemaId) Source #
data SchemaRegistry Source #
data SchemaRegistryError Source #
An Avro schema is either * A "JSON object in the form `{"type":"typeName" ...` * A "JSON string, naming a defined type" (basic type wo free variablesnames) * A "JSON array, representing a union"
N.B. It is possible to create a Haskell value (of Schema type) that is
not a valid Avro schema by violating one of the above or one of the
conditions called out in validateSchema
.