FlowRunner.Spec.Resource (flow_runner v6.15.1)

Copy Markdown

Resource stores a piece of content in various languages and modes. Usually associated with a block.

Summary

Functions

Cast the received fields to their internal representation

Load the map or list of maps into Elixir.FlowRunner.Spec.Resource structs.

Validate a Elixir.FlowRunner.Spec.Resource struct using Vex.validate

Types

t()

@type t() :: %FlowRunner.Spec.Resource{
  uuid: String.t(),
  values: [FlowRunner.Spec.ResourceValue.t()]
}

Functions

cast!(module, map)

@spec cast!(module(), map()) :: map()

Cast the received fields to their internal representation

load!(blocks_module, list)

@spec load!(module(), map()) :: t()
@spec load!(module(), [map()]) :: [t()]

Load the map or list of maps into Elixir.FlowRunner.Spec.Resource structs.

matching_resource(resource, language, mode, flow)

@spec matching_resource(
  t(),
  language :: String.t(),
  mode :: String.t(),
  FlowRunner.Spec.Flow.t()
) ::
  {:ok, FlowRunner.Spec.ResourceValue.t()} | {:error, String.t()}

valid?(self)

validate!(blocks_module, impl)

@spec validate!(blocks_module :: module(), t()) :: t()

Validate a Elixir.FlowRunner.Spec.Resource struct using Vex.validate