Protocols
The following protocols are available globally.
-
Undocumented
See moreDeclaration
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
See moreGRPCModel
which can be used to instantiate aGRPCMessage
that also offers a method that convertd the message to a model type. Implementations of this protocol also need to conform to theMessage
protocol provided by theSwiftProtobuf
framework which includes all the necessary requirements to encode aGRPCMessage
as a protocol buffer message.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
See moreSwiftProtobuf.Message
protocol which is used to encode and decode protocol buffer messages. This functionality is realitzed by provided by theGRPCMessage
protocol. This protocol requires the models to contain an empty initializer to make code generated mappings betweenGRPCModel
andGRPCMessage
instances easier.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
See moreRequest
which is used to provide shortcuts for using the associated Fluent database and the request’sEventLoop
.Declaration
Swift
public protocol GRPCRequestType
-
See moreGRPCService
is a protocol that is implemented to declare gRPC services that can contain remote procedure calls. This protocol requires services to contain aserviceName
and provide ahandleMethod
method that maps requests to call handlers which can call the procedures.Declaration
Swift
public protocol GRPCService