cachix-api 0.1.0.0 → 0.1.0.1
raw patch · 4 files changed
+34/−21 lines, 4 filesdep −servant-genericdep ~servantPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: servant-generic
Dependency ranges changed: servant
API changes (from Hackage documentation)
- Cachix.Api.Types: data BinaryCacheCreate
- Cachix.Api.Types: data BinaryCacheError
+ Cachix.Api.Types: newtype BinaryCacheCreate
+ Cachix.Api.Types: newtype BinaryCacheError
- Cachix.Api: CachixAPI :: route :- "logout" :> CachixAuth :> Post302 '[JSON] '[Header "Set-Cookie" SetCookie, Header "Set-Cookie" SetCookie] -> route :- "login" :> Get302 '[JSON] '[] -> route :- "login" :> "callback" :> QueryParam "code" Text :> QueryParam "state" Text :> Get302 '[JSON] '[Header "Set-Cookie" SetCookie, Header "Set-Cookie" SetCookie] -> route :- CachixAuth :> "user" :> Get '[JSON] User -> route :- CachixAuth :> "token" :> Post '[JSON] Text -> route :- CachixAuth :> "cache" :> Get '[JSON] [BinaryCache] -> route :- "cache" :> Capture "name" Text :> ToServant (BinaryCacheAPI AsApi) -> CachixAPI route
+ Cachix.Api: CachixAPI :: route :- "logout" :> CachixAuth :> Post302 '[JSON] '[Header "Set-Cookie" SetCookie, Header "Set-Cookie" SetCookie] -> route :- "login" :> Get302 '[JSON] '[] -> route :- "login" :> "callback" :> QueryParam "code" Text :> QueryParam "state" Text :> Get302 '[JSON] '[Header "Set-Cookie" SetCookie, Header "Set-Cookie" SetCookie] -> route :- CachixAuth :> "user" :> Get '[JSON] User -> route :- CachixAuth :> "token" :> Post '[JSON] Text -> route :- CachixAuth :> "cache" :> Get '[JSON] [BinaryCache] -> route :- "cache" :> Capture "name" Text :> ToServantApi BinaryCacheAPI -> CachixAPI route
- Cachix.Api: [cache] :: CachixAPI route -> route :- "cache" :> Capture "name" Text :> ToServant (BinaryCacheAPI AsApi)
+ Cachix.Api: [cache] :: CachixAPI route -> route :- "cache" :> Capture "name" Text :> ToServantApi BinaryCacheAPI
- Cachix.Api: type CachixServantAPI = "api" :> "v1" :> ToServant (CachixAPI AsApi)
+ Cachix.Api: type CachixServantAPI = "api" :> "v1" :> ToServantApi CachixAPI
Files
- ChangeLog.md +18/−2
- cachix-api.cabal +11/−14
- src/Cachix/Api.hs +3/−3
- src/Cachix/Api/Types.hs +2/−2
ChangeLog.md view
@@ -1,3 +1,19 @@-# Changelog for cachix-api+# Changelog -## Unreleased changes+All notable changes to this project will be documented in this file.++The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)+and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).++## [Unreleased]++## [0.1.0.1] - 2018-07-06++### Changed++- #95 Upgrade to servant-0.14.1 @domenkozar++## [0.1.0.0] - 2018-07-01++### Added+- Initial release @domenkozar
cachix-api.cabal view
@@ -1,14 +1,14 @@--- This file has been generated from package.yaml by hpack version 0.21.2.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack ----- hash: e8db970407465738fc6d366b754b2cf51d5a5e123461ea5b89db16236ecbd3ee+-- hash: 622e58e514481a3a8c55a6b379423676d4d2157334db4c29b45ef8c0954e3bb0 name: cachix-api-version: 0.1.0.0-description: Please see the README on Github at <https://github.com/cachix/cachix-api#readme>-homepage: https://github.com/githubuser/cachix-api#readme-bug-reports: https://github.com/githubuser/cachix-api/issues+version: 0.1.0.1+synopsis: Servant HTTP API specification for https://cachix.org+homepage: https://github.com/cachix/cachix#readme+bug-reports: https://github.com/cachix/cachix/issues author: Domen Kožar maintainer: domen@enlambda.com copyright: 2018 Domen Kožar@@ -16,14 +16,13 @@ license-file: LICENSE build-type: Simple cabal-version: >= 1.10- extra-source-files: ChangeLog.md README.md source-repository head type: git- location: https://github.com/githubuser/cachix-api+ location: https://github.com/cachix/cachix library exposed-modules:@@ -54,11 +53,10 @@ , http-media , lens , memory- , servant+ , servant >=0.14.1 , servant-auth , servant-auth-server , servant-auth-swagger- , servant-generic , servant-streaming , servant-swagger , servant-swagger-ui-core@@ -91,11 +89,10 @@ , http-media , lens , memory- , servant+ , servant >=0.14.1 , servant-auth , servant-auth-server , servant-auth-swagger- , servant-generic , servant-streaming , servant-swagger , servant-swagger-ui-core@@ -132,11 +129,10 @@ , lens , memory , protolude- , servant+ , servant >=0.14.1 , servant-auth , servant-auth-server , servant-auth-swagger- , servant-generic , servant-streaming , servant-swagger , servant-swagger-ui-core@@ -145,3 +141,4 @@ , text , transformers default-language: Haskell2010+ build-tool-depends: hspec-discover:hspec-discover
src/Cachix/Api.hs view
@@ -22,7 +22,7 @@ import Network.AWS (AWS) import Servant.API import Servant.Auth-import Servant.Generic+import Servant.API.Generic import Servant.Streaming import Servant.Swagger import Servant.Swagger.UI.Core (SwaggerSchemaUI)@@ -103,10 +103,10 @@ , cache :: route :- "cache" :> Capture "name" Text :>- ToServant (BinaryCacheAPI AsApi)+ ToServantApi BinaryCacheAPI } deriving Generic -type CachixServantAPI = "api" :> "v1" :> ToServant (CachixAPI AsApi)+type CachixServantAPI = "api" :> "v1" :> ToServantApi CachixAPI servantApi :: Proxy CachixServantAPI servantApi = Proxy
src/Cachix/Api/Types.hs view
@@ -65,7 +65,7 @@ , publicSigningKeys :: [Text] } deriving (Show, Generic, FromJSON, ToJSON) -data BinaryCacheCreate = BinaryCacheCreate+newtype BinaryCacheCreate = BinaryCacheCreate { publicSigningKey :: Text } deriving (Show, Generic, FromJSON, ToJSON) @@ -94,7 +94,7 @@ toUrlPiece (NarInfoC n) = n <> ".narinfo" -data BinaryCacheError = BinaryCacheError+newtype BinaryCacheError = BinaryCacheError { error :: Text } deriving (Generic, FromJSON, ToJSON)