gitson-0.2.0: A document store library for Git + JSON.

Safe HaskellNone

Gitson

Description

Gitson is a simple document store library for Git + JSON.

Synopsis

Documentation

createRepo :: FilePath -> IO ()Source

Creates a git repository under a given path.

type TransactionWriter = WriterT [IO ()] IO ()Source

A transaction monad.

saveEntry :: ToJSON a => FilePath -> FilePath -> a -> TransactionWriterSource

Adds a write action to a transaction.

transaction :: FilePath -> TransactionWriter -> IO ()Source

Executes a blocking transaction on a repository, committing the results to git.

readEntry :: FromJSON a => FilePath -> FilePath -> IO (Maybe a)Source

Reads an entry from a collection by key.

listEntryKeys :: FilePath -> IO [FilePath]Source

Lists entry keys in a collection.

listEntries :: FromJSON a => FilePath -> IO [a]Source

Lists entries in a collection.

listCollections :: IO [FilePath]Source

Lists collections in the current repository.