View Source Baobab.ClumpMeta (Baobab v0.30.0)

Functions for interacting with clump metadata May be useful between consumers to communicate intent

Summary

Functions

Create a block of a given type

Returns a boolean indicating whether the supplied spec is blocked on the supplied clump

Lists current blocks on the supplied clump_id

Filter out blocked clump logs from a supplied list of entry tuples ({author, log_id, seq_num})

Remove an extant block specified as per block/2

Functions

Link to this function

block(item, clump_id \\ "default")

View Source
@spec block(term(), binary()) :: [term()] | {:error, String.t()}

Create a block of a given type:

  • author: 32 byte-raw or 43-byte base62-encoded value
  • log_id: 64 bit unsigned integer
  • log_spec: {author, log_id}

Returns the current block list

Link to this function

blocked?(item, clump_id \\ "default")

View Source

Returns a boolean indicating whether the supplied spec is blocked on the supplied clump

Includes the specifications from block/2 and {author, log_id, seq_num}

Link to this function

blocks_list(clump_id \\ "default")

View Source
@spec blocks_list(binary()) :: [term()] | {:error, String.t()}

Lists current blocks on the supplied clump_id

Link to this function

filter_blocked(entries, clump_id \\ "default")

View Source
@spec filter_blocked([tuple()], binary()) :: [tuple()] | {:error, String.t()}

Filter out blocked clump logs from a supplied list of entry tuples ({author, log_id, seq_num})

Link to this function

unblock(item, clump_id \\ "default")

View Source
@spec unblock(term(), binary()) :: :ok | {:error, String.t()}

Remove an extant block specified as per block/2

Returns the current block list