Copyright | Copyright (C) 2009 John MacFarlane |
---|---|
License | BSD 3 |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | GHC 6.10 required |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Data.FileStore.Types
Description
Type definitions for Data.FileStore.
Synopsis
- type RevisionId = String
- data Resource
- data Author = Author {}
- data Change
- type Description = String
- data Revision = Revision {}
- class Contents a where
- fromByteString :: ByteString -> a
- toByteString :: a -> ByteString
- data TimeRange = TimeRange {}
- data MergeInfo = MergeInfo {}
- data FileStoreError
- data SearchMatch = SearchMatch {}
- data SearchQuery = SearchQuery {}
- defaultSearchQuery :: SearchQuery
- data UTCTime
- data FileStore = FileStore {
- initialize :: IO ()
- save :: forall a. Contents a => FilePath -> Author -> Description -> a -> IO ()
- retrieve :: forall a. Contents a => FilePath -> Maybe RevisionId -> IO a
- delete :: FilePath -> Author -> Description -> IO ()
- rename :: FilePath -> FilePath -> Author -> Description -> IO ()
- history :: [FilePath] -> TimeRange -> Maybe Int -> IO [Revision]
- latest :: FilePath -> IO RevisionId
- revision :: RevisionId -> IO Revision
- index :: IO [FilePath]
- directory :: FilePath -> IO [Resource]
- idsMatch :: RevisionId -> RevisionId -> Bool
- search :: SearchQuery -> IO [SearchMatch]
Documentation
type RevisionId = String Source #
Constructors
FSFile FilePath | |
FSDirectory FilePath |
Instances
Read Resource Source # | |
Show Resource Source # | |
Eq Resource Source # | |
Ord Resource Source # | |
Defined in Data.FileStore.Types |
Constructors
Author | |
Fields
|
type Description = String Source #
Constructors
Revision | |
Fields
|
class Contents a where Source #
Instances
Contents ByteString Source # | |
Defined in Data.FileStore.Types Methods fromByteString :: ByteString -> ByteString Source # toByteString :: ByteString -> ByteString Source # | |
Contents String Source # | |
Defined in Data.FileStore.Types |
Constructors
TimeRange | |
Constructors
MergeInfo | |
Fields
|
data FileStoreError Source #
Constructors
RepositoryExists | Tried to initialize a repo that exists |
ResourceExists | Tried to create a resource that exists |
NotFound | Requested resource was not found |
IllegalResourceName | The specified resource name is illegal |
Unchanged | The resource was not modified, because the contents were unchanged |
UnsupportedOperation | |
NoMaxCount | The darcs version used does not support --max-count |
UnknownError String |
Instances
Exception FileStoreError Source # | |
Defined in Data.FileStore.Types Methods toException :: FileStoreError -> SomeException Source # fromException :: SomeException -> Maybe FileStoreError Source # | |
Read FileStoreError Source # | |
Defined in Data.FileStore.Types | |
Show FileStoreError Source # | |
Defined in Data.FileStore.Types | |
Eq FileStoreError Source # | |
Defined in Data.FileStore.Types Methods (==) :: FileStoreError -> FileStoreError -> Bool Source # (/=) :: FileStoreError -> FileStoreError -> Bool Source # |
data SearchMatch Source #
Constructors
SearchMatch | |
Fields |
Instances
Read SearchMatch Source # | |
Defined in Data.FileStore.Types | |
Show SearchMatch Source # | |
Defined in Data.FileStore.Types | |
Eq SearchMatch Source # | |
Defined in Data.FileStore.Types Methods (==) :: SearchMatch -> SearchMatch -> Bool Source # (/=) :: SearchMatch -> SearchMatch -> Bool Source # |
data SearchQuery Source #
Constructors
SearchQuery | |
Fields
|
Instances
Read SearchQuery Source # | |
Defined in Data.FileStore.Types | |
Show SearchQuery Source # | |
Defined in Data.FileStore.Types | |
Eq SearchQuery Source # | |
Defined in Data.FileStore.Types Methods (==) :: SearchQuery -> SearchQuery -> Bool Source # (/=) :: SearchQuery -> SearchQuery -> Bool Source # |
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
Instances
Data UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime Source # toConstr :: UTCTime -> Constr Source # dataTypeOf :: UTCTime -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) Source # gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r Source # gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime Source # | |
NFData UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
Eq UTCTime | |
Ord UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime |
A versioning filestore, which can be implemented using the file system, a database, or revision-control software.
Constructors
FileStore | |
Fields
|