Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- servantApi :: Proxy CachixServantAPI
- swaggerDoc :: Swagger
- data CachixAPI route = CachixAPI {
- logout :: route :- ("logout" :> (CachixAuth :> Post302 '[JSON] '[Header "Set-Cookie" SetCookie, Header "Set-Cookie" SetCookie]))
- login :: route :- ("login" :> Get302 '[JSON] '[])
- loginCallback :: route :- ("login" :> ("callback" :> (QueryParam "code" Text :> (QueryParam "state" Text :> Get302 '[JSON] '[Header "Set-Cookie" SetCookie, Header "Set-Cookie" SetCookie]))))
- user :: route :- (CachixAuth :> ("user" :> Get '[JSON] User))
- createToken :: route :- (CachixAuth :> ("token" :> Post '[JSON] Text))
- caches :: route :- (CachixAuth :> ("cache" :> Get '[JSON] [BinaryCacheAuthenticated]))
- cache :: route :- ("cache" :> (Capture "name" Text :> ToServantApi BinaryCacheAPI))
- install :: route :- ("install" :> ToServantApi InstallAPI)
- github :: route :- ("github" :> ToServantApi GitHubAPI)
- type CachixServantAPI = "api" :> ("v1" :> ToServantApi CachixAPI)
- type CachixAuth = Auth '[Cookie, JWT, BasicAuth] Session
- data InstallAPI route = InstallAPI {
- installGetLatest :: route :- (Summary "Redirects to a tarball containing nix expression to build the latest version of cachix cli" :> Get302 '[JSON] '[])
- installGetVersion :: route :- (Summary "Redirects to a tarball containing nix expression to build given version of cachix cli" :> (Capture "version" Text :> Get302 '[JSON] '[]))
- data GitHubAPI route = GitHubAPI {
- githubOrganizations :: route :- (CachixAuth :> ("orgs" :> Get '[JSON] [Text]))
- githubTeams :: route :- (CachixAuth :> ("orgs" :> (Capture "org" Text :> ("teams" :> Get '[JSON] [GitHubTeam]))))
- data BinaryCacheAPI route = BinaryCacheAPI {
- get :: route :- (CachixAuth :> Get '[JSON] BinaryCache)
- create :: route :- (CachixAuth :> (ReqBody '[JSON] BinaryCacheCreate :> Post '[JSON] NoContent))
- nixCacheInfo :: route :- (CachixAuth :> ("nix-cache-info" :> Get '[XNixCacheInfo, JSON] NixCacheInfo))
- narinfo :: route :- (CachixAuth :> (Capture "narinfo" NarInfoC :> Get '[XNixNarInfo, JSON] NarInfo))
- narinfoHead :: route :- (CachixAuth :> (Capture "narinfo" NarInfoC :> Head))
- narinfoBulk :: route :- (CachixAuth :> ("narinfo" :> (Summary "Given a list of store hashes, return a list of those that are missing" :> (ReqBody '[JSON] [Text] :> Post '[JSON] [Text]))))
- createNarinfo :: route :- (Capture "narinfo" NarInfoC :> (ReqBody '[JSON] NarInfoCreate :> Post '[JSON] NoContent))
- createKey :: route :- (CachixAuth :> ("key" :> (ReqBody '[JSON] SigningKeyCreate :> Post '[JSON] NoContent)))
- data BinaryCacheStreamingAPI route = BinaryCacheStreamingAPI {}
- type BinaryCachStreamingServantAPI = "api" :> ("v1" :> ("cache" :> (Capture "name" Text :> ToServantApi BinaryCacheStreamingAPI)))
- module Cachix.Api.Types
- module Cachix.Types.ContentTypes
Documentation
swaggerDoc :: Swagger Source #
CachixAPI | |
|
Instances
type CachixServantAPI = "api" :> ("v1" :> ToServantApi CachixAPI) Source #
data InstallAPI route Source #
InstallAPI | |
|
Instances
Generic (InstallAPI route) Source # | |
Defined in Cachix.Api type Rep (InstallAPI route) :: Type -> Type # from :: InstallAPI route -> Rep (InstallAPI route) x # to :: Rep (InstallAPI route) x -> InstallAPI route # | |
type Rep (InstallAPI route) Source # | |
Defined in Cachix.Api type Rep (InstallAPI route) = D1 (MetaData "InstallAPI" "Cachix.Api" "cachix-api-0.3.0-9c8xvAXvOAF661nQMPF8wB" False) (C1 (MetaCons "InstallAPI" PrefixI True) (S1 (MetaSel (Just "installGetLatest") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (route :- (Summary "Redirects to a tarball containing nix expression to build the latest version of cachix cli" :> Get302 (JSON ': ([] :: [Type])) ([] :: [Type])))) :*: S1 (MetaSel (Just "installGetVersion") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (route :- (Summary "Redirects to a tarball containing nix expression to build given version of cachix cli" :> (Capture "version" Text :> Get302 (JSON ': ([] :: [Type])) ([] :: [Type]))))))) |
GitHubAPI | |
|
Instances
Generic (GitHubAPI route) Source # | |
type Rep (GitHubAPI route) Source # | |
Defined in Cachix.Api type Rep (GitHubAPI route) = D1 (MetaData "GitHubAPI" "Cachix.Api" "cachix-api-0.3.0-9c8xvAXvOAF661nQMPF8wB" False) (C1 (MetaCons "GitHubAPI" PrefixI True) (S1 (MetaSel (Just "githubOrganizations") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (route :- (CachixAuth :> ("orgs" :> Get (JSON ': ([] :: [Type])) [Text])))) :*: S1 (MetaSel (Just "githubTeams") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (route :- (CachixAuth :> ("orgs" :> (Capture "org" Text :> ("teams" :> Get (JSON ': ([] :: [Type])) [GitHubTeam])))))))) |
data BinaryCacheAPI route Source #
BinaryCacheAPI | |
|
Instances
data BinaryCacheStreamingAPI route Source #
Streaming endpoints
Instances
type BinaryCachStreamingServantAPI = "api" :> ("v1" :> ("cache" :> (Capture "name" Text :> ToServantApi BinaryCacheStreamingAPI))) Source #
module Cachix.Api.Types
module Cachix.Types.ContentTypes