Factor out storeFile, unstoreFile, and verifyFile into a MTL
style class. This class can provide its own Id type, and never
returns FilePaths directly, which should allow a memory-only
variant for testing purposes later.
Control of storage ids now belongs to MonadFileStore. It was not
really the place of the data layer (which is currently a set of
SQL queries) to suddenly do one arbitrary file IO operation.
Add a manpage for ca-store. Additionally, modify the 'file verify'
command to behave exactly as the manpage mentions. This commit
required me to break a cycle caused by having CAStore.Type.Text
imported by CAStore.Type.
ca-store now takes a --completion argument to output completions
to standard output. These are to be used for completion scripts,
in future commits.
Before the 1.0.0 release we need to either:
1) Work out how to get bash et al to accept these completions
without mangling them
2) Get optparse-applicative to handle the command parsing entirely
and forgo the Moore machine approach
All errors, warnings, and messages are now listed in a sum type
in 'CAStore.Type.Text'. The added structure should help with
writing better error messages. Also, if and when we get to
localising ca-store, implementation will be trivial.
ca-store is planned to work as follows:
1) A monad (currently IO) will generate the configuration, read the command
line, parse the config files, and create the environment the program
should run in.
2) This environment will be passed to the main monad (currently Program)
to do the work.
Currently everything will be directly coded with little to no abstraction.
Once ca-store is up and running, we will begin regaining purity by pulling
major features into small testable units.