mu-avro-0.1.0.0: Avro serialization support for Mu microservices

Safe HaskellNone
LanguageHaskell2010

Mu.Adapter.Avro

Contents

Description

Just import the module and you can turn any value with a ToSchema and FromSchema from and to Avro values.

Orphan instances

ToSchemalessTerm (Value t) Identity Source # 
Instance details

ToSchemalessValue (Value t) Identity Source # 
Instance details

(KnownName name, HasAvroSchemaFields sch args, FromAvroFields f sch args) => FromAvro (Term f sch (DRecord name args)) Source # 
Instance details

Methods

fromAvro :: Value Type -> Result (Term f sch (DRecord name args)) #

FromAvro (FieldValue f sch t) => FromAvro (Term f sch (DSimple t :: TypeDefB Type typeName fieldName)) Source # 
Instance details

Methods

fromAvro :: Value Type0 -> Result (Term f sch (DSimple t)) #

(KnownName name, HasAvroSchemaEnum choices, FromAvroEnum choices) => FromAvro (Term f sch (DEnum name choices :: TypeDefB Type typeName fieldName)) Source # 
Instance details

Methods

fromAvro :: Value Type0 -> Result (Term f sch (DEnum name choices)) #

FromAvro (FieldValue f sch v) => FromAvro (FieldValue f sch (TMap (TPrimitive String :: FieldTypeB Type typeName) v)) Source # 
Instance details

FromAvro (FieldValue f sch v) => FromAvro (FieldValue f sch (TMap (TPrimitive Text :: FieldTypeB Type typeName) v)) Source # 
Instance details

FromAvro (FieldValue f sch t) => FromAvro (FieldValue f sch (TList t)) Source # 
Instance details

Methods

fromAvro :: Value Type -> Result (FieldValue f sch (TList t)) #

FromAvro (FieldValue f sch t) => FromAvro (FieldValue f sch (TOption t)) Source # 
Instance details

Methods

fromAvro :: Value Type -> Result (FieldValue f sch (TOption t)) #

(KnownName t, FromAvro (Term f sch (sch :/: t))) => FromAvro (FieldValue f sch (TSchematic t :: FieldTypeB Type typeName)) Source # 
Instance details

Methods

fromAvro :: Value Type0 -> Result (FieldValue f sch (TSchematic t)) #

FromAvro t => FromAvro (FieldValue f sch (TPrimitive t :: FieldTypeB Type typeName)) Source # 
Instance details

Methods

fromAvro :: Value Type0 -> Result (FieldValue f sch (TPrimitive t)) #

FromAvro (FieldValue f sch (TNull :: FieldTypeB Type typeName)) Source # 
Instance details

Methods

fromAvro :: Value Type0 -> Result (FieldValue f sch TNull) #

(HasAvroSchemaUnion (FieldValue f sch) choices, FromAvroUnion f sch choices) => FromAvro (FieldValue f sch (TUnion choices)) Source # 
Instance details

Methods

fromAvro :: Value Type -> Result (FieldValue f sch (TUnion choices)) #

(KnownName name, HasAvroSchemaFields sch args, ToAvroFields sch args) => ToAvro (Term Identity sch (DRecord name args)) Source # 
Instance details

Methods

toAvro :: Term Identity sch (DRecord name args) -> Value Type #

ToAvro (FieldValue Identity sch t) => ToAvro (Term Identity sch (DSimple t :: TypeDefB Type typeName fieldName)) Source # 
Instance details

Methods

toAvro :: Term Identity sch (DSimple t) -> Value Type0 #

(KnownName name, HasAvroSchemaEnum choices, ToAvroEnum choices) => ToAvro (Term Identity sch (DEnum name choices :: TypeDefB Type typeName fieldName)) Source # 
Instance details

Methods

toAvro :: Term Identity sch (DEnum name choices) -> Value Type0 #

ToAvro (FieldValue Identity sch v) => ToAvro (FieldValue Identity sch (TMap (TPrimitive String :: FieldTypeB Type typeName) v)) Source # 
Instance details

ToAvro (FieldValue Identity sch v) => ToAvro (FieldValue Identity sch (TMap (TPrimitive Text :: FieldTypeB Type typeName) v)) Source # 
Instance details

ToAvro (FieldValue Identity sch t) => ToAvro (FieldValue Identity sch (TList t)) Source # 
Instance details

Methods

toAvro :: FieldValue Identity sch (TList t) -> Value Type #

ToAvro (FieldValue Identity sch t) => ToAvro (FieldValue Identity sch (TOption t)) Source # 
Instance details

(KnownName t, ToAvro (Term Identity sch (sch :/: t))) => ToAvro (FieldValue Identity sch (TSchematic t :: FieldTypeB Type typeName)) Source # 
Instance details

ToAvro t => ToAvro (FieldValue Identity sch (TPrimitive t :: FieldTypeB Type typeName)) Source # 
Instance details

ToAvro (FieldValue Identity sch (TNull :: FieldTypeB Type typeName)) Source # 
Instance details

(HasAvroSchemaUnion (FieldValue Identity sch) choices, ToAvroUnion sch choices) => ToAvro (FieldValue Identity sch (TUnion choices)) Source # 
Instance details

Methods

toAvro :: FieldValue Identity sch (TUnion choices) -> Value Type #

HasAvroSchema (FieldValue f sch t) => HasAvroSchema (Term f sch (DSimple t :: TypeDefB Type typeName fieldName)) Source # 
Instance details

Methods

schema :: Tagged (Term f sch (DSimple t)) Type0 #

(KnownName name, HasAvroSchemaFields sch args) => HasAvroSchema (Term f sch (DRecord name args)) Source # 
Instance details

Methods

schema :: Tagged (Term f sch (DRecord name args)) Type #

(KnownName name, HasAvroSchemaEnum choices) => HasAvroSchema (Term f sch (DEnum name choices :: TypeDefB Type typeName fieldName)) Source # 
Instance details

Methods

schema :: Tagged (Term f sch (DEnum name choices)) Type0 #

HasAvroSchema (FieldValue f sch v) => HasAvroSchema (FieldValue f sch (TMap (TPrimitive String :: FieldTypeB Type typeName) v)) Source # 
Instance details

HasAvroSchema (FieldValue f sch v) => HasAvroSchema (FieldValue f sch (TMap (TPrimitive Text :: FieldTypeB Type typeName) v)) Source # 
Instance details

Methods

schema :: Tagged (FieldValue f sch (TMap (TPrimitive Text) v)) Type0 #

HasAvroSchema (FieldValue f sch t) => HasAvroSchema (FieldValue f sch (TList t)) Source # 
Instance details

Methods

schema :: Tagged (FieldValue f sch (TList t)) Type #

HasAvroSchema (FieldValue f sch t) => HasAvroSchema (FieldValue f sch (TOption t)) Source # 
Instance details

Methods

schema :: Tagged (FieldValue f sch (TOption t)) Type #

KnownName t => HasAvroSchema (FieldValue f sch (TSchematic t :: FieldTypeB Type typeName)) Source # 
Instance details

Methods

schema :: Tagged (FieldValue f sch (TSchematic t)) Type0 #

HasAvroSchema t => HasAvroSchema (FieldValue f sch (TPrimitive t :: FieldTypeB Type typeName)) Source # 
Instance details

Methods

schema :: Tagged (FieldValue f sch (TPrimitive t)) Type0 #

HasAvroSchema (FieldValue f sch (TNull :: FieldTypeB Type typeName)) Source # 
Instance details

Methods

schema :: Tagged (FieldValue f sch TNull) Type0 #

HasAvroSchemaUnion (FieldValue f sch) choices => HasAvroSchema (FieldValue f sch (TUnion choices)) Source # 
Instance details

Methods

schema :: Tagged (FieldValue f sch (TUnion choices)) Type #

(FromSchema f sch sty t, HasAvroSchemas sch sch, FromAvro (Term f sch (sch :/: sty))) => FromAvro (WithSchema f sch sty t) Source # 
Instance details

Methods

fromAvro :: Value Type -> Result (WithSchema f sch sty t) #

(ToSchema Identity sch sty t, HasAvroSchemas sch sch, ToAvro (Term Identity sch (sch :/: sty))) => ToAvro (WithSchema Identity sch sty t) Source # 
Instance details

Methods

toAvro :: WithSchema Identity sch sty t -> Value Type #

HasAvroSchemas sch sch => HasAvroSchema (WithSchema f sch sty t) Source # 
Instance details

Methods

schema :: Tagged (WithSchema f sch sty t) Type #