Protocols
The following protocols are available globally.
-
Undocumented
See moreDeclaration
Swift
public protocol AnyCallHandler -
GRPCMessageis a protocol that is implemented by gRPC protocol buffer message structures that are generated by the code generator.Every implementation is associated with a
See moreGRPCModelwhich can be used to instantiate aGRPCMessagethat also offers a method that convertd the message to a model type. Implementations of this protocol also need to conform to theMessageprotocol provided by theSwiftProtobufframework which includes all the necessary requirements to encode aGRPCMessageas a protocol buffer message.Declaration
Swift
public protocol GRPCMessage : Message -
GRPCModelis a protocol that is implemented by models in the existing code to declare them ad gRPC messages.It provides NO conformance to the
See moreSwiftProtobuf.Messageprotocol which is used to encode and decode protocol buffer messages. This functionality is realitzed by provided by theGRPCMessageprotocol. This protocol requires the models to contain an empty initializer to make code generated mappings betweenGRPCModelandGRPCMessageinstances easier.Declaration
Swift
public protocol GRPCModel -
GRPCRequestTypeis 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
See moreRequestwhich is used to provide shortcuts for using the associated Fluent database and the request’sEventLoop.Declaration
Swift
public protocol GRPCRequestType -
See moreGRPCServiceis a protocol that is implemented to declare gRPC services that can contain remote procedure calls. This protocol requires services to contain aserviceNameand provide ahandleMethodmethod that maps requests to call handlers which can call the procedures.Declaration
Swift
public protocol GRPCService
View on GitHub
Protocols Reference