bdcs-0.1.0: Tools for managing a content store of software packages

Copyright(c) 2016-2017 Red Hat Inc.
LicenseLGPL
Maintainerhttps://github.com/weldr
Stabilityalpha
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

BDCS.CS

Description

Conduit-based interface between BDCS and its underlying content store.

Synopsis

Documentation

data Object Source #

An object in the content store is either a regular file or something else (directory, symlink, etc.) described by the Files metadata.

Constructors

SpecialObject

Some non-file object that should be accompanied by a Files record so its metadata can be tracked

FileObject ByteString

A file object with its contents

filesToObjectsC :: (MonadError String m, MonadIO m) => ContentStore -> Conduit Files m (Files, Object) Source #

Read Files records from a Conduit, find the object in the content store, and return the matching Object if found. An error is thrown if the object does not exist, or if there is any other error interacting with the content store. In addition, the Files object is also returned as part of the result tuple so its metadata can be used by downstream consumers.

objectToTarEntry :: (MonadError String m, MonadIO m) => Conduit (Files, Object) m Entry Source #

Read tuples from a Conduit and convert each into a Entry suitable for streaming into an archive. Metadata such as permissions and ownerships will be set correctly. Symlinks and other special non-file things will be handled correctly. This function is suitable as a downstream consumer of filesToObjectsC.