-- 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.4.2
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.V1
newtype DeployResponse
DeployResponse :: HashMap Text Text -> DeployResponse
[agents] :: DeployResponse -> HashMap Text Text
instance Control.DeepSeq.NFData Cachix.Types.DeployResponse.V1.DeployResponse
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.DeployResponse.V1.DeployResponse
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.DeployResponse.V1.DeployResponse
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.DeployResponse.V1.DeployResponse
instance GHC.Generics.Generic Cachix.Types.DeployResponse.V1.DeployResponse
instance GHC.Show.Show Cachix.Types.DeployResponse.V1.DeployResponse
module Cachix.Types.DeployResponse.V2
data Details
Details :: UUID -> Text -> Details
[id] :: Details -> UUID
[url] :: Details -> Text
newtype DeployResponse
DeployResponse :: HashMap Text Details -> DeployResponse
[agents] :: DeployResponse -> HashMap Text Details
instance Control.DeepSeq.NFData Cachix.Types.DeployResponse.V2.Details
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.DeployResponse.V2.Details
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.DeployResponse.V2.Details
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.DeployResponse.V2.Details
instance GHC.Generics.Generic Cachix.Types.DeployResponse.V2.Details
instance GHC.Show.Show Cachix.Types.DeployResponse.V2.Details
instance Control.DeepSeq.NFData Cachix.Types.DeployResponse.V2.DeployResponse
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.DeployResponse.V2.DeployResponse
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.DeployResponse.V2.DeployResponse
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.DeployResponse.V2.DeployResponse
instance GHC.Generics.Generic Cachix.Types.DeployResponse.V2.DeployResponse
instance GHC.Show.Show Cachix.Types.DeployResponse.V2.DeployResponse
module Cachix.Types.DeployResponse
module Cachix.Types.Deployment
data Status
Pending :: Status
InProgress :: Status
Cancelled :: Status
Failed :: Status
Succeeded :: Status
data Deployment
Deployment :: UUID -> Int64 -> UTCTime -> Maybe UTCTime -> Text -> Maybe Int64 -> Status -> Deployment
[id] :: Deployment -> UUID
[index] :: Deployment -> Int64
[createdOn] :: Deployment -> UTCTime
[startedOn] :: Deployment -> Maybe UTCTime
[storePath] :: Deployment -> Text
[closureSize] :: Deployment -> Maybe Int64
[status] :: Deployment -> Status
instance Control.DeepSeq.NFData Cachix.Types.Deployment.Status
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.Deployment.Status
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.Deployment.Status
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.Deployment.Status
instance GHC.Show.Show Cachix.Types.Deployment.Status
instance GHC.Generics.Generic Cachix.Types.Deployment.Status
instance GHC.Classes.Eq Cachix.Types.Deployment.Status
instance Control.DeepSeq.NFData Cachix.Types.Deployment.Deployment
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.Deployment.Deployment
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.Deployment.Deployment
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.Deployment.Deployment
instance GHC.Generics.Generic Cachix.Types.Deployment.Deployment
instance GHC.Show.Show Cachix.Types.Deployment.Deployment
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.MultipartUpload
data CreateMultipartUploadResponse
CreateMultipartUploadResponse :: UUID -> Text -> CreateMultipartUploadResponse
[narId] :: CreateMultipartUploadResponse -> UUID
[uploadId] :: CreateMultipartUploadResponse -> Text
-- | Any hashes or headers required to create the presigned URL.
data SigningData
SigningData :: Text -> SigningData
[contentMD5] :: SigningData -> Text
newtype UploadPartResponse
UploadPartResponse :: Text -> UploadPartResponse
[uploadUrl] :: UploadPartResponse -> Text
data CompletedPart
CompletedPart :: Int -> Text -> CompletedPart
[partNumber] :: CompletedPart -> Int
-- | An opaque identifier for the uploaded part.
[eTag] :: CompletedPart -> Text
type CompletedParts = Maybe (NonEmpty CompletedPart)
data CompletedMultipartUpload
CompletedMultipartUpload :: CompletedParts -> NarInfoCreate -> CompletedMultipartUpload
-- | A list of CompletedPart, sorted by the partNumber.
[parts] :: CompletedMultipartUpload -> CompletedParts
-- | The narinfo to create after verifying the upload.
[narInfoCreate] :: CompletedMultipartUpload -> NarInfoCreate
instance Control.DeepSeq.NFData Cachix.Types.MultipartUpload.CreateMultipartUploadResponse
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.MultipartUpload.CreateMultipartUploadResponse
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.MultipartUpload.CreateMultipartUploadResponse
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.MultipartUpload.CreateMultipartUploadResponse
instance GHC.Show.Show Cachix.Types.MultipartUpload.CreateMultipartUploadResponse
instance GHC.Generics.Generic Cachix.Types.MultipartUpload.CreateMultipartUploadResponse
instance Control.DeepSeq.NFData Cachix.Types.MultipartUpload.SigningData
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.MultipartUpload.SigningData
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.MultipartUpload.SigningData
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.MultipartUpload.SigningData
instance GHC.Show.Show Cachix.Types.MultipartUpload.SigningData
instance GHC.Generics.Generic Cachix.Types.MultipartUpload.SigningData
instance Control.DeepSeq.NFData Cachix.Types.MultipartUpload.UploadPartResponse
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.MultipartUpload.UploadPartResponse
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.MultipartUpload.UploadPartResponse
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.MultipartUpload.UploadPartResponse
instance GHC.Show.Show Cachix.Types.MultipartUpload.UploadPartResponse
instance GHC.Generics.Generic Cachix.Types.MultipartUpload.UploadPartResponse
instance Control.DeepSeq.NFData Cachix.Types.MultipartUpload.CompletedPart
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.MultipartUpload.CompletedPart
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.MultipartUpload.CompletedPart
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.MultipartUpload.CompletedPart
instance GHC.Show.Show Cachix.Types.MultipartUpload.CompletedPart
instance GHC.Generics.Generic Cachix.Types.MultipartUpload.CompletedPart
instance Data.Swagger.Internal.Schema.ToSchema Cachix.Types.MultipartUpload.CompletedMultipartUpload
instance Data.Aeson.Types.FromJSON.FromJSON Cachix.Types.MultipartUpload.CompletedMultipartUpload
instance Data.Aeson.Types.ToJSON.ToJSON Cachix.Types.MultipartUpload.CompletedMultipartUpload
instance GHC.Show.Show Cachix.Types.MultipartUpload.CompletedMultipartUpload
instance GHC.Generics.Generic Cachix.Types.MultipartUpload.CompletedMultipartUpload
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
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 :> Get302 '[XNixNar] '[])))))) -> (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 :- (Summary "Upload a NAR directly to the Cachix Server" :> (Description "This is a legacy API for older Cachix clients. Prefer 'createNar' instead." :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nar" :> (QueryParam "compression" CompressionMethod :> (StreamBody NoFraming XNixNar (ConduitT () ByteStringStreaming (ResourceT IO) ()) :> Post '[JSON] NoContent))))))))) -> (route :- (Summary "Create an empty NAR and initiate a multipart upload" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (QueryParam "compression" CompressionMethod :> Post '[JSON] CreateMultipartUploadResponse))))))) -> (route :- (Summary "Retrieve a presigned URL to upload a part of a multipart NAR" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (Capture "narUuid" UUID :> (QueryParam' '[Required] "uploadId" Text :> (QueryParam' '[Required] "partNumber" Int :> (ReqBody '[JSON] SigningData :> Post '[JSON] UploadPartResponse)))))))))) -> (route :- (Summary "Complete a multipart upload" :> (Description "Verify the etags for each part and create the narinfo" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (Capture "narUuid" UUID :> ("complete" :> (QueryParam' '[Required] "uploadId" Text :> (ReqBody '[JSON] CompletedMultipartUpload :> Post '[JSON] NoContent))))))))))) -> (route :- (Summary "Abort a multipart upload" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (Capture "narUuid" UUID :> ("abort" :> (QueryParam' '[Required] "uploadId" Text :> Post '[JSON] NoContent))))))))) -> (route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> (ReqBody '[JSON] NarInfoCreate :> 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 :> Get302 '[XNixNar] '[])))))
[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)))))
[createAndUploadNar] :: BinaryCacheAPI route -> route :- (Summary "Upload a NAR directly to the Cachix Server" :> (Description "This is a legacy API for older Cachix clients. Prefer 'createNar' instead." :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("nar" :> (QueryParam "compression" CompressionMethod :> (StreamBody NoFraming XNixNar (ConduitT () ByteStringStreaming (ResourceT IO) ()) :> Post '[JSON] NoContent))))))))
[createNar] :: BinaryCacheAPI route -> route :- (Summary "Create an empty NAR and initiate a multipart upload" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (QueryParam "compression" CompressionMethod :> Post '[JSON] CreateMultipartUploadResponse))))))
[uploadNarPart] :: BinaryCacheAPI route -> route :- (Summary "Retrieve a presigned URL to upload a part of a multipart NAR" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (Capture "narUuid" UUID :> (QueryParam' '[Required] "uploadId" Text :> (QueryParam' '[Required] "partNumber" Int :> (ReqBody '[JSON] SigningData :> Post '[JSON] UploadPartResponse)))))))))
[completeNarUpload] :: BinaryCacheAPI route -> route :- (Summary "Complete a multipart upload" :> (Description "Verify the etags for each part and create the narinfo" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (Capture "narUuid" UUID :> ("complete" :> (QueryParam' '[Required] "uploadId" Text :> (ReqBody '[JSON] CompletedMultipartUpload :> Post '[JSON] NoContent))))))))))
[abortMultipartUpload] :: BinaryCacheAPI route -> route :- (Summary "Abort a multipart upload" :> (CachixAuth :> ("cache" :> (Capture "name" Text :> ("multipart-nar" :> (Capture "narUuid" UUID :> ("abort" :> (QueryParam' '[Required] "uploadId" Text :> Post '[JSON] NoContent))))))))
[createNarinfo] :: BinaryCacheAPI route -> route :- (CachixAuth :> ("cache" :> (Capture "name" Text :> (Capture "narinfohash" NarInfoHash :> (ReqBody '[JSON] NarInfoCreate :> 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.V2
type API = "api" :> "v2" :> ToServantApi DeployAPI
data DeployAPI route
DeployAPI :: (route :- Activate) -> DeployAPI route
[activate] :: DeployAPI route -> route :- Activate
type Activate = CachixAuth :> "deploy" :> "activate" :> ReqBody '[JSON] Deploy :> Post '[JSON] DeployResponse
instance GHC.Generics.Generic (Cachix.API.Deploy.V2.DeployAPI route)
module Cachix.API.Deploy.V1
type API = "api" :> "v1" :> ToServantApi DeployAPI
data DeployAPI route
DeployAPI :: (route :- Activate) -> (route :- GetDeployment) -> DeployAPI route
[activate] :: DeployAPI route -> route :- Activate
[getDeployment] :: DeployAPI route -> route :- GetDeployment
type Activate = CachixAuth :> "deploy" :> "activate" :> ReqBody '[JSON] Deploy :> Post '[JSON] DeployResponse
type GetDeployment = CachixAuth :> "deploy" :> "deployment" :> Capture "uuid" UUID :> Get '[JSON] Deployment
instance GHC.Generics.Generic (Cachix.API.Deploy.V1.DeployAPI route)