Astarte.Flow.Blocks.DETSStorage (astarte_flow v0.1.0)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Delete a block from the dets table

Fetch a block given its realm and its name

Insert a block into the dets table

List the blocks for a specific realm

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

delete_block(realm, name)

@spec delete_block(realm :: String.t(), name :: String.t()) ::
  :ok | {:error, reason :: term()}

Delete a block from the dets table

Link to this function

fetch_block(realm, name)

@spec fetch_block(realm :: String.t(), name :: String.t()) ::
  {:ok, Astarte.Flow.Blocks.Block.t()} | {:error, reason :: term()}

Fetch a block given its realm and its name

Link to this function

insert_block(realm, block)

@spec insert_block(realm :: String.t(), block :: Astarte.Flow.Blocks.Block.t()) ::
  :ok | {:error, reason :: term()}

Insert a block into the dets table

Link to this function

list_blocks(realm)

@spec list_blocks(realm :: String.t()) :: [Astarte.Flow.Blocks.Block.t()]

List the blocks for a specific realm

Link to this function

start_link(args)