Last active
November 2, 2018 19:09
-
-
Save joshcough/2c0cc66fc63f856f70d71928d5834961 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Monad m => FilesDb m where | |
insertFile :: DbTeamId -> DbFolderId -> Text -> m (Entity DbFile) | |
insertFolder :: DbTeamId -> DbFolderId -> Text -> m (Key DbFolder) | |
getRootFolder :: DbTeamId -> m (Maybe (Folder (Entity DbFile))) | |
getFile :: DbFileId -> m (Maybe (Entity DbFile)) | |
-- | Purposely doesn't fetch the children, because we don't want to use recursion right now. | |
getFolder :: DbFolderId -> m (Maybe (Folder (Entity DbFile))) | |
getFolderRecursive :: DbFolderId -> m (Maybe (Folder (Entity DbFile))) | |
deleteFile :: DbFileId -> m () | |
deleteFolder :: DbFolderId -> m () | |
moveFile :: DbFileId -> Folder a -> m () | |
moveFolder :: Folder a -> Folder a -> m () | |
class Monad m => S3FileServer m where | |
uploadFile :: UploadFile -> m File | |
deleteFile :: Entity DbFile -> m File | |
deleteFolder :: Folder (Entity DbFile) -> m [File] | |
withS3Paths :: Entity DbFile -> m File |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment