Protocols

The following protocols are available globally.

  • Undocumented

    See more

    Declaration

    Swift

    public protocol AnyCallHandler
  • GRPCMessage is a protocol that is implemented by gRPC protocol buffer message structures that are generated by the code generator.

    Every implementation is associated with a GRPCModel which can be used to instantiate a GRPCMessage that also offers a method that convertd the message to a model type. Implementations of this protocol also need to conform to the Message protocol provided by the SwiftProtobuf framework which includes all the necessary requirements to encode a GRPCMessage as a protocol buffer message.

    See more

    Declaration

    Swift

    public protocol GRPCMessage : Message
  • GRPCModel is a protocol that is implemented by models in the existing code to declare them ad gRPC messages.

    It provides NO conformance to the SwiftProtobuf.Message protocol which is used to encode and decode protocol buffer messages. This functionality is realitzed by provided by the GRPCMessageprotocol. This protocol requires the models to contain an empty initializer to make code generated mappings between GRPCModel and GRPCMessage instances easier.

    See more

    Declaration

    Swift

    public protocol GRPCModel
  • GRPCRequestType is a protocol that is implemented by all gRPC request classes and requires attributes used by common default implementations.

    Currently the only required attribute is a reference to the used Vapor Request which is used to provide shortcuts for using the associated Fluent database and the request’s EventLoop.

    See more

    Declaration

    Swift

    public protocol GRPCRequestType
  • GRPCService is a protocol that is implemented to declare gRPC services that can contain remote procedure calls. This protocol requires services to contain a serviceName and provide a handleMethodmethod that maps requests to call handlers which can call the procedures.

    See more

    Declaration

    Swift

    public protocol GRPCService