View Source PhxJsonRpc.Router.MetaData (Phoenix JSON RPC v0.3.4)

MetaData struct for the paths, defined in rpc router.

Contains information about called controllers, actions and schema references for the given rpc method.

Link to this section Summary

Types

t()

Type represents structure for the rpc metadata.

Functions

Creates the new metadata from the given params.

Link to this section Types

@type t() :: %PhxJsonRpc.Router.MetaData{
  action: nil | atom(),
  controller: nil | module(),
  schema_ref: nil | binary()
}

Type represents structure for the rpc metadata.

Link to this section Functions

@spec new(Keyword.t()) :: t()

Creates the new metadata from the given params.

examples

Examples

iex> PhxJsonRpc.Router.MetaData.new(controller: RpcController, action: :hello, schema_ref: "#/components/schema/hello")
%PhxJsonRpc.Router.MetaData{
  controller: RpcController,
  action: :hello,
  schema_ref: "#/components/schema/hello"
}