-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Servant HTTP API specification for https://cachix.org
--
-- Servant HTTP API specification for https://cachix.org
@package cachix-api
@version 1.1
module Cachix.API.Error
escalate :: (Exception exc, MonadThrow m) => Either exc a -> m a
-- | Examples: > escalate . maybeToEither err404
--
-- | Note that exceptions gets handled by warp and logged (user sees just
-- "Internal server")
escalateAs :: (Exception exc, MonadThrow m) => (l -> exc) -> Either l a -> m a
module Cachix.API.Signing
fingerprint :: Text -> Text -> Integer -> [Text] -> ByteString
passthroughSizeSink :: MonadIO m => IORef Integer -> ConduitT ByteString ByteString m ()
passthroughHashSinkB16 :: MonadIO m => IORef ByteString -> ConduitT ByteString ByteString m ()
passthroughHashSink :: MonadIO m => IORef ByteString -> ConduitT ByteString ByteString m ()
module Cachix.API.WebSocketSubprotocol
data Message cmd
Message :: Text -> cmd -> Maybe UUID -> UUID -> Message cmd
[$sel:method:Message] :: Message cmd -> Text
[$sel:command:Message] :: Message cmd -> cmd
[$sel:agent:Message] :: Message cmd -> Maybe UUID
[$sel:id:Message] :: Message cmd -> UUID
data Cache
Cache :: Text -> Text -> Bool -> Cache
[$sel:cacheName:Cache] :: Cache -> Text
[$sel:publicKey:Cache] :: Cache -> Text
[$sel:isPublic:Cache] :: Cache -> Bool
data AgentInformation
AgentInformation :: Maybe Cache -> UUID -> AgentInformation
[$sel:cache:AgentInformation] :: AgentInformation -> Maybe Cache
[$sel:id:AgentInformation] :: AgentInformation -> UUID
data DeploymentDetails
DeploymentDetails :: Text -> UUID -> Int64 -> Maybe Text -> DeploymentDetails
[$sel:storePath:DeploymentDetails] :: DeploymentDetails -> Text
[$sel:id:DeploymentDetails] :: DeploymentDetails -> UUID
[$sel:index:DeploymentDetails] :: DeploymentDetails -> Int64
[$sel:rollbackScript:DeploymentDetails] :: DeploymentDetails -> Maybe Text
data BackendCommand
Deployment :: DeploymentDetails -> BackendCommand
AgentRegistered :: AgentInformation -> BackendCommand
data AgentCommand
DeploymentStarted :: UUID -> UTCTime -> Maybe Int64 -> AgentCommand
[$sel:id:DeploymentStarted] :: AgentCommand -> UUID
[$sel:time:DeploymentStarted] :: AgentCommand -> UTCTime
[$sel:closureSize:DeploymentStarted] :: AgentCommand -> Maybe Int64
DeploymentFinished :: UUID -> UTCTime -> Bool -> AgentCommand
[$sel:id:DeploymentStarted] :: AgentCommand -> UUID
[$sel:time:DeploymentStarted] :: AgentCommand -> UTCTime
[$sel:hasSucceeded:DeploymentStarted] :: AgentCommand -> Bool
parseMessage :: FromJSON cmd => ByteString -> Either Text (Message cmd)
sendMessage :: ToJSON cmd => Connection -> Message cmd -> IO ()
-- | Receive and process messages in parallel.
--
-- Note: This will not rethrow the CloseRequest exception!
--
-- TODO: use Async.replicateConcurrently
receiveDataConcurrently :: Connection -> (ByteString -> IO ()) -> IO ()
data Log
Log :: Text -> UTCTime -> Log
[$sel:line:Log] :: Log -> Text
[$sel:time:Log] :: Log -> UTCTime
instance Data.Aeson.Types.ToJSON.ToJSON cmd => Data.Aeson.Types.ToJSON.ToJSON (Cachix.API.WebSocketSubprotocol.Message cmd)
instance Data.Aeson.Types.FromJSON.FromJSON cmd => Data.Aeson.Types.FromJSON.FromJSON (Cachix.API.WebSocketSubprotocol.Message cmd)
instance GHC.Generics.Generic (Cachix.API.WebSocketSubprotocol.Message cmd)
instance GHC.Classes.Eq cmd => GHC.Classes.Eq (Cachix.API.WebSocketSubprotocol.Message cmd)
instance GHC.Show.Show cmd => GHC.Show.Show (Cachix.API.WebSocketSubprotocol.Message cmd)
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.API.WebSocketSubprotocol.Cache
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.API.WebSocketSubprotocol.Cache
instance GHC.Generics.Generic Cachix.API.WebSocketSubprotocol.Cache
instance GHC.Classes.Eq Cachix.API.WebSocketSubprotocol.Cache
instance GHC.Show.Show Cachix.API.WebSocketSubprotocol.Cache
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.API.WebSocketSubprotocol.AgentInformation
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.API.WebSocketSubprotocol.AgentInformation
instance GHC.Generics.Generic Cachix.API.WebSocketSubprotocol.AgentInformation
instance GHC.Classes.Eq Cachix.API.WebSocketSubprotocol.AgentInformation
instance GHC.Show.Show Cachix.API.WebSocketSubprotocol.AgentInformation
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.API.WebSocketSubprotocol.DeploymentDetails
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.API.WebSocketSubprotocol.DeploymentDetails
instance GHC.Generics.Generic Cachix.API.WebSocketSubprotocol.DeploymentDetails
instance GHC.Classes.Eq Cachix.API.WebSocketSubprotocol.DeploymentDetails
instance GHC.Show.Show Cachix.API.WebSocketSubprotocol.DeploymentDetails
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.API.WebSocketSubprotocol.BackendCommand
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.API.WebSocketSubprotocol.BackendCommand
instance GHC.Generics.Generic Cachix.API.WebSocketSubprotocol.BackendCommand
instance GHC.Classes.Eq Cachix.API.WebSocketSubprotocol.BackendCommand
instance GHC.Show.Show Cachix.API.WebSocketSubprotocol.BackendCommand
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.API.WebSocketSubprotocol.AgentCommand
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.API.WebSocketSubprotocol.AgentCommand
instance GHC.Generics.Generic Cachix.API.WebSocketSubprotocol.AgentCommand
instance GHC.Classes.Eq Cachix.API.WebSocketSubprotocol.AgentCommand
instance GHC.Show.Show Cachix.API.WebSocketSubprotocol.AgentCommand
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.API.WebSocketSubprotocol.Log
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.API.WebSocketSubprotocol.Log
instance GHC.Show.Show Cachix.API.WebSocketSubprotocol.Log
instance GHC.Generics.Generic Cachix.API.WebSocketSubprotocol.Log
module Cachix.Types.ByteStringStreaming
newtype ByteStringStreaming
ByteStringStreaming :: ByteString -> ByteStringStreaming
newtype LazyByteStringStreaming
LazyByteStringStreaming :: ByteString -> LazyByteStringStreaming
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.ByteStringStreaming.LazyByteStringStreaming
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.ByteStringStreaming.ByteStringStreaming
module Cachix.Types.Deploy
data Deploy
Deploy :: HashMap Text Text -> Maybe (HashMap Text Text) -> Deploy
[agents] :: Deploy -> HashMap Text Text
[rollbackScript] :: Deploy -> Maybe (HashMap Text Text)
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.Deploy.Deploy
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.Deploy.Deploy
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.Deploy.Deploy
instance GHC.Generics.Generic Cachix.Types.Deploy.Deploy
instance GHC.Classes.Eq Cachix.Types.Deploy.Deploy
instance GHC.Show.Show Cachix.Types.Deploy.Deploy
module Cachix.Types.DeployResponse
newtype DeployResponse
DeployResponse :: HashMap Text Text -> DeployResponse
[agents] :: DeployResponse -> HashMap Text Text
instance Control.DeepSeq.NFData Cachix.Types.DeployResponse.DeployResponse
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.DeployResponse.DeployResponse
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.DeployResponse.DeployResponse
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.DeployResponse.DeployResponse
instance GHC.Generics.Generic Cachix.Types.DeployResponse.DeployResponse
instance GHC.Show.Show Cachix.Types.DeployResponse.DeployResponse
module Cachix.Types.NarFileName
-- | hash.nar.extension file
data NarFileName
NarFileName :: Text -> Text -> NarFileName
[contentHash] :: NarFileName -> Text
[extension] :: NarFileName -> Text
instance GHC.Generics.Generic Cachix.Types.NarFileName.NarFileName
instance Web.Internal.HttpApiData.FromHttpApiData Cachix.Types.NarFileName.NarFileName
instance Web.Internal.HttpApiData.ToHttpApiData Cachix.Types.NarFileName.NarFileName
instance Data.Swagger.Internal.ParamSchema.ToParamSchema Cachix.Types.NarFileName.NarFileName
module Cachix.Types.NarInfo
type CachixNarInfo = NarInfo Text Text Text
data NarInfo fp txt hash
NarInfo :: fp -> txt -> txt -> hash -> Integer -> hash -> Integer -> Set fp -> Maybe txt -> Maybe txt -> Maybe txt -> Maybe txt -> NarInfo fp txt hash
-- | Absolute path of the derivation in nix store.
[storePath] :: NarInfo fp txt hash -> fp
-- | Relative url (to current domain) to download nar file.
[url] :: NarInfo fp txt hash -> txt
-- | Name of the compression algorithm, eg. xz.
[compression] :: NarInfo fp txt hash -> txt
-- | Hash of the compressed nar file. NOTE: to compute use "nix-hash --type
-- sha256 --flat" (srk) this isn't fixed to sha256 but a prefix indicates
-- the type e.g.: sha256:1a6lzf... default is sha256 thought
[fileHash] :: NarInfo fp txt hash -> hash
-- | File size of compressed nar file. NOTE: du -b
[fileSize] :: NarInfo fp txt hash -> Integer
-- | Hash of the decompressed nar file. NOTE: to compute use "nix-hash
-- --type sha256 --flat --base32" (srk) this isn't fixed to sha256 but a
-- prefix indicates the type e.g.: sha256:1a6lzf... default is sha256
-- thought
[narHash] :: NarInfo fp txt hash -> hash
-- | File size of decompressed nar file. NOTE: du -b
[narSize] :: NarInfo fp txt hash -> Integer
-- | Immediate dependencies of the storePath. NOTE: nix-store -q
-- --references
[references] :: NarInfo fp txt hash -> Set fp
-- | Relative store path (to nix store root) of the deriver. NOTE:
-- nix-store -q --deriver
[deriver] :: NarInfo fp txt hash -> Maybe txt
-- | System
[system] :: NarInfo fp txt hash -> Maybe txt
-- | Signature of fields: storePath, narHash, narSize, refs.
[sig] :: NarInfo fp txt hash -> Maybe txt
-- | Content-addressed Store path is computed from a cryptographic hash of
-- the contents of the path, plus some other bits of data like the "name"
-- part of the path.
[ca] :: NarInfo fp txt hash -> Maybe txt
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.NarInfo.CachixNarInfo
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.NarInfo.CachixNarInfo
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.NarInfo.CachixNarInfo
instance Control.DeepSeq.NFData Cachix.Types.NarInfo.CachixNarInfo
module Cachix.Types.NarInfoCreate
-- | Client create type
data NarInfoCreate
NarInfoCreate :: Text -> Text -> Text -> Integer -> Text -> Integer -> [Text] -> Text -> Maybe Text -> NarInfoCreate
-- | $storePrefix / $storeHash - $storeSuffix
[cStoreHash] :: NarInfoCreate -> Text
-- | $storePrefix / $storeHash - $storeSuffix
[cStoreSuffix] :: NarInfoCreate -> Text
[cNarHash] :: NarInfoCreate -> Text
[cNarSize] :: NarInfoCreate -> Integer
[cFileHash] :: NarInfoCreate -> Text
[cFileSize] :: NarInfoCreate -> Integer
[cReferences] :: NarInfoCreate -> [Text]
[cDeriver] :: NarInfoCreate -> Text
[cSig] :: NarInfoCreate -> Maybe Text
data NarInfoInvalid
isNarInfoCreateValid :: NarInfoCreate -> Either NarInfoInvalid ()
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.NarInfoCreate.NarInfoCreate
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.NarInfoCreate.NarInfoCreate
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.NarInfoCreate.NarInfoCreate
instance GHC.Show.Show Cachix.Types.NarInfoCreate.NarInfoCreate
instance GHC.Generics.Generic Cachix.Types.NarInfoCreate.NarInfoCreate
instance GHC.Exception.Type.Exception Cachix.Types.NarInfoCreate.NarInfoInvalid
instance GHC.Show.Show Cachix.Types.NarInfoCreate.NarInfoInvalid
module Cachix.Types.NarInfoHash
-- | Store path hash
newtype NarInfoHash
NarInfoHash :: Text -> NarInfoHash
[unnarinfohash] :: NarInfoHash -> Text
instance Data.Swagger.Internal.ParamSchema.ToParamSchema Cachix.Types.NarInfoHash.NarInfoHash
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.NarInfoHash.NarInfoHash
instance GHC.Generics.Generic Cachix.Types.NarInfoHash.NarInfoHash
instance Web.Internal.HttpApiData.FromHttpApiData Cachix.Types.NarInfoHash.NarInfoHash
instance Web.Internal.HttpApiData.ToHttpApiData Cachix.Types.NarInfoHash.NarInfoHash
module Cachix.Types.NixCacheInfo
data NixCacheInfo
NixCacheInfo :: Text -> Integer -> Integer -> NixCacheInfo
[storeDir] :: NixCacheInfo -> Text
[wantMassQuery] :: NixCacheInfo -> Integer
[priority] :: NixCacheInfo -> Integer
instance Control.DeepSeq.NFData Cachix.Types.NixCacheInfo.NixCacheInfo
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.NixCacheInfo.NixCacheInfo
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.NixCacheInfo.NixCacheInfo
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.NixCacheInfo.NixCacheInfo
instance GHC.Show.Show Cachix.Types.NixCacheInfo.NixCacheInfo
instance GHC.Generics.Generic Cachix.Types.NixCacheInfo.NixCacheInfo
module Cachix.Types.ContentTypes
data XNixNar
data XNixNarInfo
data XNixCacheInfo
instance Servant.API.ContentTypes.Accept Cachix.Types.ContentTypes.XNixCacheInfo
instance Servant.API.ContentTypes.MimeUnrender Cachix.Types.ContentTypes.XNixCacheInfo Cachix.Types.NixCacheInfo.NixCacheInfo
instance Servant.API.ContentTypes.Accept Cachix.Types.ContentTypes.XNixNarInfo
instance Servant.API.ContentTypes.MimeUnrender Cachix.Types.ContentTypes.XNixNarInfo Cachix.Types.NarInfo.CachixNarInfo
instance Servant.API.ContentTypes.Accept Cachix.Types.ContentTypes.XNixNar
instance Servant.API.ContentTypes.MimeRender Cachix.Types.ContentTypes.XNixNar Cachix.Types.ByteStringStreaming.ByteStringStreaming
instance Servant.API.ContentTypes.MimeUnrender Cachix.Types.ContentTypes.XNixNar Cachix.Types.ByteStringStreaming.ByteStringStreaming
instance Servant.API.ContentTypes.MimeUnrender Cachix.Types.ContentTypes.XNixNar Cachix.Types.ByteStringStreaming.LazyByteStringStreaming
instance Servant.API.ContentTypes.MimeRender Cachix.Types.ContentTypes.XNixNar Cachix.Types.ByteStringStreaming.LazyByteStringStreaming
instance Servant.API.ContentTypes.MimeRender Servant.API.ContentTypes.PlainText Cachix.Types.ByteStringStreaming.ByteStringStreaming
instance Servant.API.ContentTypes.MimeUnrender Servant.API.ContentTypes.PlainText Cachix.Types.ByteStringStreaming.ByteStringStreaming
module Cachix.Types.Permission
data Permission
Read :: Permission
Write :: Permission
Admin :: Permission
instance GHC.Classes.Ord Cachix.Types.Permission.Permission
instance GHC.Classes.Eq Cachix.Types.Permission.Permission
instance Control.DeepSeq.NFData Cachix.Types.Permission.Permission
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.Permission.Permission
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.Permission.Permission
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.Permission.Permission
instance GHC.Show.Show Cachix.Types.Permission.Permission
instance GHC.Generics.Generic Cachix.Types.Permission.Permission
module Cachix.Types.BinaryCache
data BinaryCache
BinaryCache :: Text -> Text -> Bool -> [Text] -> Text -> Permission -> CompressionMethod -> BinaryCache
[name] :: BinaryCache -> Text
[uri] :: BinaryCache -> Text
[isPublic] :: BinaryCache -> Bool
[publicSigningKeys] :: BinaryCache -> [Text]
[githubUsername] :: BinaryCache -> Text
[permission] :: BinaryCache -> Permission
[preferredCompressionMethod] :: BinaryCache -> CompressionMethod
data CompressionMethod
XZ :: CompressionMethod
ZSTD :: CompressionMethod
instance Control.DeepSeq.NFData Cachix.Types.BinaryCache.CompressionMethod
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.BinaryCache.CompressionMethod
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.BinaryCache.CompressionMethod
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.BinaryCache.CompressionMethod
instance GHC.Generics.Generic Cachix.Types.BinaryCache.CompressionMethod
instance GHC.Read.Read Cachix.Types.BinaryCache.CompressionMethod
instance GHC.Show.Show Cachix.Types.BinaryCache.CompressionMethod
instance Control.DeepSeq.NFData Cachix.Types.BinaryCache.BinaryCache
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.BinaryCache.BinaryCache
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.BinaryCache.BinaryCache
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.BinaryCache.BinaryCache
instance GHC.Generics.Generic Cachix.Types.BinaryCache.BinaryCache
instance GHC.Show.Show Cachix.Types.BinaryCache.BinaryCache
instance Web.Internal.HttpApiData.FromHttpApiData Cachix.Types.BinaryCache.CompressionMethod
instance Web.Internal.HttpApiData.ToHttpApiData Cachix.Types.BinaryCache.CompressionMethod
instance Data.Swagger.Internal.ParamSchema.ToParamSchema Cachix.Types.BinaryCache.CompressionMethod
-- | Servant specific additions that could be upstreamed
module Cachix.Types.Servant
type Get302 (cts :: [Type]) (hs :: [Type]) = Verb 'GET 302 cts (Headers (Header "Location" Text : hs) NoContent)
type Post302 (cts :: [Type]) (hs :: [Type]) = Verb 'POST 302 cts (Headers (Header "Location" Text : hs) NoContent)
type Head = Verb 'HEAD 200 '[JSON] NoContent
-- | Auth representations
module Cachix.Types.Session
data Session
JWTSession :: ClaimsSet -> Session
instance GHC.Classes.Eq Cachix.Types.Session.Session
instance Servant.Auth.JWT.ToJWT Cachix.Types.Session.Session
instance Servant.Auth.JWT.FromJWT Cachix.Types.Session.Session
module Cachix.Types.SigningKeyCreate
-- | Conveys that a signing secret key was created, by sharing the public
-- key.
newtype SigningKeyCreate
SigningKeyCreate :: Text -> SigningKeyCreate
[publicKey] :: SigningKeyCreate -> Text
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.SigningKeyCreate.SigningKeyCreate
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.SigningKeyCreate.SigningKeyCreate
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.SigningKeyCreate.SigningKeyCreate
instance GHC.Generics.Generic Cachix.Types.SigningKeyCreate.SigningKeyCreate
instance GHC.Show.Show Cachix.Types.SigningKeyCreate.SigningKeyCreate
module Cachix.API
api :: Proxy API
data BinaryCacheAPI route
BinaryCacheAPI :: (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nix-cache-info" :> Get '[XNixCacheInfo, JSON] NixCacheInfo))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> Get '[XNixNarInfo, JSON] (Headers '[Header "Cache-Control" Text] CachixNarInfo)))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> Head))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nar" :> (Capture "nar" NarFileName :> StreamGet NoFraming XNixNar (ConduitT () ByteStringStreaming (ResourceT IO) ()))))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> Get '[JSON] BinaryCache)))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("narinfo" :> (Summary "Given a list of store hashes, return a list of those that are missing" :> (ReqBody '[JSON] [Text] :> Post '[JSON] [Text]))))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("narurl" :> (Capture "nar" NarFileName :> Get '[JSON] Text)))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> (ReqBody '[JSON] NarInfoCreate :> Post '[JSON] NoContent)))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nar" :> (QueryParam "compression" CompressionMethod :> (StreamBody NoFraming XNixNar (ConduitT () ByteStringStreaming (ResourceT IO) ()) :> Post '[JSON] NoContent))))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("serve" :> (Capture "storehash" Text :> (CaptureAll "filepath" Text :> (Summary "Serve a file from a given store path" :> Get '[XNixNar] (Headers '[Header "X-Content-Type-Options" Text, Header "Cache-Control" Text] LazyByteStringStreaming))))))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("key" :> (ReqBody '[JSON] SigningKeyCreate :> Post '[JSON] NoContent)))))) -> BinaryCacheAPI route
[nixCacheInfo] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nix-cache-info" :> Get '[XNixCacheInfo, JSON] NixCacheInfo))))
[narinfo] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> Get '[XNixNarInfo, JSON] (Headers '[Header "Cache-Control" Text] CachixNarInfo)))))
[narinfoHead] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> Head))))
[nar] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nar" :> (Capture "nar" NarFileName :> StreamGet NoFraming XNixNar (ConduitT () ByteStringStreaming (ResourceT IO) ()))))))
[getCache] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> Get '[JSON] BinaryCache)))
[narinfoBulk] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("narinfo" :> (Summary "Given a list of store hashes, return a list of those that are missing" :> (ReqBody '[JSON] [Text] :> Post '[JSON] [Text]))))))
[narURL] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("narurl" :> (Capture "nar" NarFileName :> Get '[JSON] Text)))))
[createNarinfo] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> (ReqBody '[JSON] NarInfoCreate :> Post '[JSON] NoContent)))))
[createNar] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nar" :> (QueryParam "compression" CompressionMethod :> (StreamBody NoFraming XNixNar (ConduitT () ByteStringStreaming (ResourceT IO) ()) :> Post '[JSON] NoContent))))))
[serveNarContent] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("serve" :> (Capture "storehash" Text :> (CaptureAll "filepath" Text :> (Summary "Serve a file from a given store path" :> Get '[XNixNar] (Headers '[Header "X-Content-Type-Options" Text, Header "Cache-Control" Text] LazyByteStringStreaming))))))))
[createKey] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> ("key" :> (ReqBody '[JSON] SigningKeyCreate :> Post '[JSON] NoContent)))))
type API = "api" :> "v1" :> ToServantApi BinaryCacheAPI
type CachixAuth = Auth '[Cookie, JWT, BasicAuth] Session
instance GHC.Generics.Generic (Cachix.API.BinaryCacheAPI route)
module Cachix.API.Deploy
data DeployAPI route
DeployAPI :: (route :- (CachixAuth :> ("deploy" :> ("activate" :> (ReqBody '[JSON] Deploy :> Post '[JSON] DeployResponse))))) -> DeployAPI route
[activate] :: DeployAPI route -> route :- (CachixAuth :> ("deploy" :> ("activate" :> (ReqBody '[JSON] Deploy :> Post '[JSON] DeployResponse))))
type API = "api" :> "v1" :> ToServantApi DeployAPI
api :: Proxy API
instance GHC.Generics.Generic (Cachix.API.Deploy.DeployAPI route)