andreasewering/elm-grpc/1.0.2

NOTE: the latest version is 1.1.1

Renamed to anmolitor/elm-grpc. It is published under that name, and new versions come out there.

Versions published as andreasewering/elm-grpc still install under that name. 5 versions of 6 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/anmolitor/elm-grpc.

What we checked: The repo moved to github.com/anmolitor/elm-grpc. Rebuilt with git archive from commit 951517087ffe of https://github.com/anmolitor/elm-grpc (zip prefix andreasewering-elm-grpc-f761425/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 72f0f259a30745d61725949cb33afacefaa3478c.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/andreasewering/elm-grpc/zipball/1.0.2/

Grpc.Internal

Internals that are intended to be used from code generators.

Rpc representation

type Rpc req res
= Rpc
{ service : String
, package : String
, rpcName : String
, encoder : req -> Encoder
, decoder : Decoder res
}

Given the following proto file

"""
syntax = "proto3";


package helloworld;


service Greeter {
  rpc SayHello (HelloRequest) returns (HelloReply) {}
}


message HelloRequest {
  string name = 1;
}


message HelloReply {
  string message = 1;
}
"""

the corresponding Rpc instance would be

Rpc
    { service = "Greeter"
    , package = "helloworld"
    , rpcName = "SayHello"
    , encoder = helloRequestEncoder
    , decoder = helloReplyDecoder
    }

where helloRequestEncoder and helloReplyDecoder are Encoders/Decoders built with elm-protocol-buffers.