TigerBeetlex.Response (tigerbeetlex v0.16.50)

View Source

NIF Response parsing. This module is responsible for converting a response received from the TigerBeetle NIF to either an error or a list of results.

Summary

Functions

Converts a NIF message response to a list of results.

Functions

decode(response)

Converts a NIF message response to a list of results.

If the response contains an error, {:error, reason} is returned.

If successful, it returns {:ok, list}. The type of the items of the list depend on the operation.

  • create_accounts: a list of %TigerBeetlex.CreateAccountsResult{}
  • create_transfers: a list of %TigerBeetlex.CreateTransfersResult{}
  • lookup_accounts: a list of %TigerBeetlex.Account{}
  • lookup_transfers: a list of %TigerBeetlex.Transfer{}
  • get_account_transfers: a list of %TigerBeetlex.Transfer{}
  • get_account_balances: a list of %TigerBeetlex.AccountBalance{}
  • query_accounts: a list of %TigerBeetlex.Account{}
  • query_transfers: a list of %TigerBeetlex.Transfer{}