| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hercules.API.State
Synopsis
- newtype RawBytes = RawBytes {}
- type ContentLength = Header "Content-Length" Integer
- type ContentDisposition = Header "Content-Disposition" Text
- data StateAPI auth f = StateAPI {
- putProjectStateData :: f :- (Summary "Upload a state file" :> ("projects" :> (Capture' '[Required, Strict] "projectId" (Id Project) :> ("state" :> (Capture' '[Required, Strict] "stateName" Text :> ("data" :> (StreamBody NoFraming OctetStream (SourceIO RawBytes) :> (auth :> Put '[JSON] NoContent))))))))
- getProjectStates :: f :- (Summary "List all state files" :> ("projects" :> (Capture' '[Required, Strict] "projectId" (Id Project) :> ("states" :> (auth :> Get '[JSON] ProjectState)))))
- getProjectStateData :: f :- (Summary "Download a state file" :> ("projects" :> (Capture' '[Required, Strict] "projectId" (Id Project) :> ("state" :> (Capture' '[Required, Strict] "stateName" Text :> ("data" :> (auth :> StreamGet NoFraming OctetStream (Headers '[ContentLength, ContentDisposition] (SourceIO RawBytes)))))))))
Documentation
A newtype wrapper for servant-swagger
Constructors
| RawBytes | |
Fields | |
Instances
| ToSchema RawBytes Source # | |
Defined in Hercules.API.State Methods declareNamedSchema :: Proxy RawBytes -> Declare (Definitions Schema) NamedSchema # | |
| MimeRender OctetStream RawBytes Source # | |
Defined in Hercules.API.State Methods mimeRender :: Proxy OctetStream -> RawBytes -> ByteString # | |
| MimeUnrender OctetStream RawBytes Source # | |
Defined in Hercules.API.State Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String RawBytes # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String RawBytes # | |
type ContentLength = Header "Content-Length" Integer Source #
type ContentDisposition = Header "Content-Disposition" Text Source #
Constructors
| StateAPI | |
Fields
| |