mu-avro-0.4.0.4: Avro serialization support for Mu microservices
Safe HaskellNone
LanguageHaskell2010

Mu.Adapter.Avro

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 Source # 
Instance details

ToSchemalessValue Value Source # 
Instance details

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

Methods

fromAvro :: Value -> Either String (Term sch ('DRecord name args)) #

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

Methods

fromAvro :: Value -> Either String (Term sch ('DSimple t)) #

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

Methods

fromAvro :: Value -> Either String (Term sch ('DEnum name choices)) #

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

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

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

Methods

fromAvro :: Value -> Either String (FieldValue sch ('TList t)) #

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

Methods

fromAvro :: Value -> Either String (FieldValue sch ('TOption t)) #

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

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

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

FromAvroUnion sch choices => FromAvro (FieldValue sch ('TUnion choices)) Source # 
Instance details

Methods

fromAvro :: Value -> Either String (FieldValue sch ('TUnion choices)) #

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

Methods

toAvro :: Schema -> Term sch ('DRecord name args) -> Builder #

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

Methods

toAvro :: Schema -> Term sch ('DSimple t) -> Builder #

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

Methods

toAvro :: Schema -> Term sch ('DEnum name choices) -> Builder #

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

Methods

toAvro :: Schema -> FieldValue sch ('TMap ('TPrimitive String) v) -> Builder #

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

Methods

toAvro :: Schema -> FieldValue sch ('TMap ('TPrimitive Text) v) -> Builder #

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

Methods

toAvro :: Schema -> FieldValue sch ('TList t) -> Builder #

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

Methods

toAvro :: Schema -> FieldValue sch ('TOption t) -> Builder #

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

Methods

toAvro :: Schema -> FieldValue sch ('TSchematic t) -> Builder #

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

Methods

toAvro :: Schema -> FieldValue sch ('TPrimitive t) -> Builder #

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

Methods

toAvro :: Schema -> FieldValue sch 'TNull -> Builder #

ToAvroUnion sch choices => ToAvro (FieldValue sch ('TUnion choices)) Source # 
Instance details

Methods

toAvro :: Schema -> FieldValue sch ('TUnion choices) -> Builder #

(TypeError ('Text "you should never use HasAvroSchema directly on Term, use WithSchema") :: Constraint) => HasAvroSchema (Term sch t) Source # 
Instance details

Methods

schema :: Tagged (Term sch t) Schema #

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

Methods

schema :: Tagged (FieldValue sch t) Schema #

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

Methods

fromAvro :: Value -> Either String (WithSchema sch sty t) #

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

Methods

toAvro :: Schema -> WithSchema sch sty t -> Builder #

HasAvroSchema' (Term sch (sch :/: sty)) => HasAvroSchema (WithSchema sch sty t) Source # 
Instance details

Methods

schema :: Tagged (WithSchema sch sty t) Schema #