bdcs-api-0.1.0: BDCS API Server

Safe HaskellNone
LanguageHaskell2010

BDCS.API.Workspace

Description

Workspace functions - The workspace is a temporary storage location for Recipes.

The workspace files are stored under the .gitworkspace/<branch> directory using the recipe's toml filename as created by recipeTomlFilename.

Recipes written to the workspace are not committed to git, and are overwritten on the next call to workspaceWrite

Synopsis

Documentation

workspaceRead :: Repository -> Text -> Text -> IO (Maybe Recipe) Source #

Read a Recipe from the branch's workspace

repo
Open git repository
branch
Branch name
recipe_name
The name, not the filename, of the recipe to read

Can throw WorkspaceError

workspaceWrite :: Repository -> Text -> Recipe -> IO () Source #

Write a Recipe to the branch's workspace

repo
Open git repository
branch
Branch name
recipe
The Recipe to write to the workspace

workspaceDelete :: Repository -> Text -> Text -> IO () Source #

Delete the recipe from the branch's workspace

repo
Open git repository
branch
Branch name
recipe_name
The name, not the filename, of the recipe to read

Can throw a WorkspaceError

workspaceDir :: Repository -> Text -> IO FilePath Source #

Create the branch's workspace path

repo
Open git repository
branch
Branch name

data WorkspaceError Source #

Workspace Errors

Constructors

RepoLocationError

There was a problem getting the path to the repository

ParseRecipeError String

There was an error parsing the recipe, details will be included