bankai/molecules/types

Types

pub type BoundNode {
  BoundNode(
    name: String,
    title: String,
    description: String,
    kind: types.TaskKind,
    priority: Int,
    labels: List(String),
    parent: option.Option(String),
  )
}

Constructors

  • BoundNode(
      name: String,
      title: String,
      description: String,
      kind: types.TaskKind,
      priority: Int,
      labels: List(String),
      parent: option.Option(String),
    )
pub type Edge {
  Edge(from: String, to: String, relation: types.RelationType)
}

Constructors

pub type Node {
  Node(
    name: String,
    title: String,
    description: String,
    kind: types.TaskKind,
    priority: Int,
    labels: List(String),
    parent: option.Option(String),
  )
}

Constructors

  • Node(
      name: String,
      title: String,
      description: String,
      kind: types.TaskKind,
      priority: Int,
      labels: List(String),
      parent: option.Option(String),
    )
pub type Template {
  Template(
    schema: Int,
    name: String,
    variables: List(Variable),
    nodes: List(Node),
    edges: List(Edge),
  )
}

Constructors

  • Template(
      schema: Int,
      name: String,
      variables: List(Variable),
      nodes: List(Node),
      edges: List(Edge),
    )
pub type Variable {
  Variable(
    name: String,
    required: Bool,
    default: option.Option(String),
  )
}

Constructors

  • Variable(
      name: String,
      required: Bool,
      default: option.Option(String),
    )

Values

pub fn bind(
  template: Template,
  raw_bindings: List(String),
) -> Result(#(List(#(String, String)), List(BoundNode)), String)
pub fn canonical_source(template: Template) -> String
pub fn decode_template(
  source: String,
) -> Result(Template, String)
pub fn to_json(template: Template) -> json.Json
pub fn validate(template: Template) -> Result(Template, String)
Search Document