Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- api :: Proxy (API auth)
- servantApi :: Proxy (HerculesServantAPI auth)
- servantClientApi :: Proxy (ClientServantAPI auth)
- swagger :: Swagger
- useApi :: forall subapi api mode. (GenericServant api mode, GenericServant subapi mode) => (api mode -> ToServant subapi mode) -> api mode -> subapi mode
- enterApiE :: forall k subapi api mode (a :: k). (GenericServant (api a) mode, GenericServant (subapi a) mode) => api a mode -> (api a mode -> ToServant (subapi a) mode) -> subapi a mode
- type API auth = HerculesServantAPI auth :<|> ("api" :> SwaggerSchemaUI "v1" "swagger.json")
- type ClientAuth = Auth '[JWT, Cookie] ()
- data HerculesAPI auth f = HerculesAPI {
- accounts :: f :- ToServantApi (AccountsAPI auth)
- repos :: f :- ToServantApi (ReposAPI auth)
- projects :: f :- ToServantApi (ProjectsAPI auth)
- agents :: f :- ToServantApi (AgentsAPI auth)
- build :: f :- ToServantApi (BuildAPI auth)
- effects :: f :- ToServantApi (EffectsAPI auth)
- health :: f :- ToServantApi (HealthAPI auth)
- organizations :: f :- ToServantApi (OrganizationsAPI auth)
- state :: f :- ToServantApi (StateAPI auth)
- data ClientAPI auth f = ClientAPI {
- clientAccounts :: f :- ToServantApi (AccountsAPI auth)
- clientRepos :: f :- ToServantApi (ReposAPI auth)
- clientProjects :: f :- ToServantApi (ProjectsAPI auth)
- clientAgents :: f :- ToServantApi (AgentsAPI auth)
- clientBuild :: f :- ToServantApi (BuildAPI auth)
- clientEffects :: f :- ToServantApi (EffectsAPI auth)
- clientOrganizations :: f :- ToServantApi (OrganizationsAPI auth)
- clientState :: f :- ToServantApi (StateAPI auth)
- type HerculesServantAPI auth = AddAPIVersion (ToServantApi (HerculesAPI auth))
- type AddAPIVersion api = "api" :> ("v1" :> api)
- data Id (a :: k)
- data Name (a :: k)
- data Result e a
- data NoContent = NoContent
- noContent :: Functor m => m NoContent -> m ()
Documentation
servantApi :: Proxy (HerculesServantAPI auth) Source #
servantClientApi :: Proxy (ClientServantAPI auth) Source #
useApi :: forall subapi api mode. (GenericServant api mode, GenericServant subapi mode) => (api mode -> ToServant subapi mode) -> api mode -> subapi mode #
Postcomposes fromServant
to an accessor,
preserving the mode parameter, because otherwise the mode parameter
can not be inferred.
Ideally, this functionality would be built into a new combinator.
enterApiE :: forall k subapi api mode (a :: k). (GenericServant (api a) mode, GenericServant (subapi a) mode) => api a mode -> (api a mode -> ToServant (subapi a) mode) -> subapi a mode #
@flip useApiE
type API auth = HerculesServantAPI auth :<|> ("api" :> SwaggerSchemaUI "v1" "swagger.json") Source #
data HerculesAPI auth f Source #
HerculesAPI | |
|
Instances
data ClientAPI auth f Source #
ClientAPI | |
|
Instances
type HerculesServantAPI auth = AddAPIVersion (ToServantApi (HerculesAPI auth)) Source #
type AddAPIVersion api = "api" :> ("v1" :> api) Source #
Instances
A slug. Display names are simply Text
.
Instances
Eq (Name a) | |
Ord (Name a) | |
Show (Name a) | |
Generic (Name a) | |
Hashable (Name a) | |
Defined in Hercules.API.Name | |
ToJSON (Name a) | |
Defined in Hercules.API.Name | |
FromJSON (Name a) | |
NFData (Name a) | |
Defined in Hercules.API.Name | |
ToSchema (Name a) | |
Defined in Hercules.API.Name declareNamedSchema :: Proxy (Name a) -> Declare (Definitions Schema) NamedSchema # | |
ToHttpApiData (Name a) | |
Defined in Hercules.API.Name toUrlPiece :: Name a -> Text # toEncodedUrlPiece :: Name a -> Builder # toHeader :: Name a -> ByteString # toQueryParam :: Name a -> Text # | |
FromHttpApiData (Name a) | |
Defined in Hercules.API.Name parseUrlPiece :: Text -> Either Text (Name a) # parseHeader :: ByteString -> Either Text (Name a) # | |
ToParamSchema (Name a) | |
Defined in Hercules.API.Name toParamSchema :: forall (t :: SwaggerKind Type). Proxy (Name a) -> ParamSchema t # | |
type Rep (Name a) | |
Defined in Hercules.API.Name |
Instances
Reexports
A type for responses without content-body.