Skip to content

An Elixir application for interfacing with a Rubicon host.

Notifications You must be signed in to change notification settings

verypossible-labs/rubicon_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RubiconAPI

This project is part of Very labs.

RubiconAPI is an application that lets you create firmware to interface with a Rubicon host.

Usage

RubiconAPI executes a list of steps when connecting with a Rubicon host. Steps are defined in a module in your application, For example:

defmodule ExampleApp do
  use RubiconAPI

  step "Run tests" do
    case ExUnitRelease.run() do
      {:ok, %{failures: 0}} -> :ok
      {_, result} -> {:error, result}
    end
  end

  step "Ask a question" do
    if prompt_yn?("Is the flux capacitor fluxing?") do
      :ok
    else
      {:error, "Flux capacitor is not fluxing"}
    end
  end
end

Steps are run in order from top to bottom. They are expected to return :ok, {:error, reason :: any}

If a step returns {:error, reason :: any}, execution of subsequent steps is halted, and the test exits with the status as failed. If all the tests return :ok, the test finished with a status of passed.

The following functions are API calls to the rubicon host and are available to use in any defined step.

prompt_yn: Prompt a message and wait for a reply. The reply will be :yes/:no prompt: Prompt a message. promp_clear: Clear the prompt. step_status: Render a step status message to the top right message. ssl_signer: Receive the cert and key for signing the HSM. firmware_path: Receive the final firmware and save it to a local path.

About

An Elixir application for interfacing with a Rubicon host.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages