WebRpcProtocol

automorph.protocol.WebRpcProtocol
See theWebRpcProtocol companion object

Web-RPC protocol implementation.

Provides the following Web-RPC functions for service discovery:

  • api.discover - API schema in OpenAPI format

Type parameters

Codec

message codec plugin type

Context

RPC message context type

Node

message node type

Value parameters

decodeRequest

converts a message format node to Web-RPC request

decodeResponse

converts a message format node to Web-RPC response

encodeOpenApi

converts an OpenAPI schema to message format node

encodeRequest

converts a Web-RPC request to message format node

encodeResponse

converts a Web-RPC response to message format node

encodeString

converts a string to message format node

mapError

maps a Web-RPC error to a corresponding exception

mapException

maps an exception to a corresponding Web-RPC error

mapOpenApi

transforms generated OpenAPI schema

messageCodec

message codec plugin

pathPrefix

API path prefix

Attributes

Constructor

Creates a Web-RPC 2.0 protocol implementation.

See also
Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait RpcProtocol[Node, Codec, Context]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Metadata = Unit

Web-RPC message metadata.

Web-RPC message metadata.

Attributes

Inherited from:
WebRpcCore (hidden)

Value members

Inherited methods

override def apiSchemas: Seq[ApiSchema[Node]]

Attributes

Definition Classes
Inherited from:
WebRpcCore (hidden)

Creates a copy of this protocol with specified message contex type.

Creates a copy of this protocol with specified message contex type.

Type parameters

NewContext

RPC message context type

Attributes

Returns

JSON-RPC protocol

Inherited from:
WebRpcCore (hidden)

Attributes

Definition Classes
Inherited from:
WebRpcCore (hidden)

Attributes

Definition Classes
Inherited from:
WebRpcCore (hidden)
def mapError(errorToException: (String, Option[Int]) => Throwable): WebRpcProtocol[Node, Codec, Context]

Creates a copy of this protocol with specified Web-RPC error to exception mapping.

Creates a copy of this protocol with specified Web-RPC error to exception mapping.

Value parameters

errorToException

maps a Web-RPC error to a corresponding exception

Attributes

Returns

Web-RPC protocol

Inherited from:
WebRpcCore (hidden)

Creates a copy of this protocol with specified exception to Web-RPC error mapping.

Creates a copy of this protocol with specified exception to Web-RPC error mapping.

Value parameters

exceptionToError

maps an exception classs to a corresponding Web-RPC error type

Attributes

Returns

Web-RPC protocol

Inherited from:
WebRpcCore (hidden)
def mapOpenApi(mapOpenApi: OpenApi => OpenApi): WebRpcProtocol[Node, Codec, Context]

Creates a copy of this protocol with given OpenAPI description transformation.

Creates a copy of this protocol with given OpenAPI description transformation.

Value parameters

mapOpenApi

transforms generated OpenAPI schema

Attributes

Returns

Web-RPC protocol

Inherited from:
WebRpcCore (hidden)

Attributes

Definition Classes
Inherited from:
WebRpcCore (hidden)

Attributes

Definition Classes
Inherited from:
WebRpcCore (hidden)

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Inherited fields

val name: String

Attributes

Inherited from:
WebRpcCore (hidden)