mu-protobuf-0.2.0.0: Protocol Buffers serialization and gRPC schema import for Mu microservices
Safe HaskellNone
LanguageHaskell2010

Mu.Adapter.ProtoBuf.Via

Description

In order to interoperate with the proto3-wire library, we sometimes need an instance of Proto3WireEncoder. By using the wrappers in this module, such instances can be obtained automatically if the type can be turned into a Schema.

Synopsis

Documentation

newtype ViaToProtoBufTypeRef (ref :: TypeRef) t Source #

Specifies that a type is turned into a Protocol Buffers message by using the schema as intermediate representation.

newtype ViaFromProtoBufTypeRef (ref :: TypeRef) t Source #

Specifies that a type can be parsed from a Protocol Buffers message by using the schema as intermediate representation.

class FromProtoBufTypeRef (ref :: TypeRef) t where Source #

Types which can be parsed from a Protocol Buffers message.

Instances

Instances details
(FromProtoBufRegistry r t, IsProtoSchema Maybe (MappingRight r last) sty, FromSchema Maybe (MappingRight r last) sty t) => FromProtoBufTypeRef ('ViaRegistry r t last) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

fromProtoBufTypeRef :: Proxy ('ViaRegistry r t last) -> Parser RawMessage t Source #

(IsProtoSchema Maybe sch sty, FromSchema Maybe sch sty t) => FromProtoBufTypeRef ('ViaSchema sch sty) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

fromProtoBufTypeRef :: Proxy ('ViaSchema sch sty) -> Parser RawMessage t Source #

class ToProtoBufTypeRef (ref :: TypeRef) t where Source #

Types which can be turned into a Protocol Buffers message.

Instances

Instances details
(FromProtoBufRegistry r t, IsProtoSchema Maybe (MappingRight r last) sty, ToSchema Maybe (MappingRight r last) sty t) => ToProtoBufTypeRef ('ViaRegistry r t last) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

toProtoBufTypeRef :: Proxy ('ViaRegistry r t last) -> t -> MessageBuilder Source #

(IsProtoSchema Maybe sch sty, ToSchema Maybe sch sty t) => ToProtoBufTypeRef ('ViaSchema sch sty) t Source # 
Instance details

Defined in Mu.Adapter.ProtoBuf.Via

Methods

toProtoBufTypeRef :: Proxy ('ViaSchema sch sty) -> t -> MessageBuilder Source #

Orphan instances