Safe Haskell | None |
---|
Gitson is a simple document store library for Git + JSON.
- createRepo :: FilePath -> IO ()
- type TransactionWriter = WriterT [IO ()] IO ()
- saveEntry :: ToJSON a => FilePath -> FilePath -> a -> TransactionWriter
- transaction :: FilePath -> TransactionWriter -> IO ()
- readEntry :: FromJSON a => FilePath -> FilePath -> IO (Maybe a)
- listEntries :: FilePath -> IO (Maybe [FilePath])
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.