longhuanlin/multipart-stream/pipeline does not have a README file
pub(all) suberror UploadError {
InvalidPolicy(reason~ : String)
Protocol(error~ : MultipartError)
Mixed(error~ : MixedError)
SinkFailed(operation~ : String)
PartTooLarge(part_index~ : Int, limit~ : Int64, observed~ : Int64)
TotalPayloadTooLarge(limit~ : Int64, observed~ : Int64)
PartCountExceeded(kind~ : UploadPartKind, limit~ : Int, observed~ : Int)
UnexpectedEvent(reason~ : String)
Aborted(reason~ : String)
} derive(Eq, Debug)pub struct MeasuredSink {
delegate : UploadSink
begin_calls : Int
data_calls : Int64
end_calls : Int
commit_calls : Int
abort_calls : Int
payload_bytes : Int64
max_chunk_bytes : Int
}pub struct UploadAudit {
active : ActiveDigest?
digests : Array[PartDigest]
payload_bytes : Int64
combined_state : Int64
}pub(all) struct UploadPart {
meta : PartMeta
kind : UploadPartKind
depth : Int
parent_part_index : Int?
} derive(Eq, Debug)pub struct UploadPipeline {
parser : MultipartParser
mixed : MixedStream?
policy : UploadPolicy
sink : UploadSink
active : UploadPart?
active_bytes : Int64
payload_bytes : Int64
fields_started : Int
files_started : Int
fields_completed : Int
files_completed : Int
completed : Bool
aborted : Bool
}fn UploadPipeline::new(boundary : String, sink : UploadSink, policy? : UploadPolicy) -> UploadPipeline raise UploadErrorpub(all) struct UploadProgress {
wire_bytes : Int64
payload_bytes : Int64
fields_completed : Int
files_completed : Int
active_part : UploadPart?
} derive(Eq, Debug)pub struct UploadSink {
on_begin : (UploadPart) -> Result[Unit, UploadError]
on_data : (UploadPart, Bytes) -> Result[Unit, UploadError]
on_end : (UploadPart) -> Result[Unit, UploadError]
on_commit : (UploadReceipt) -> Result[Unit, UploadError]
on_abort : (UploadError) -> Unit
}fn UploadSink::new(on_begin : (UploadPart) -> Result[Unit, UploadError], on_data : (UploadPart, Bytes) -> Result[Unit, UploadError], on_end : (UploadPart) -> Result[Unit, UploadError], on_commit : (UploadReceipt) -> Result[Unit, UploadError], on_abort : (UploadError) -> Unit) -> UploadSinkfn crc32_finish(state : Int64) -> Int64fn crc32_update(state : Int64, bytes : Bytes) -> Int64Install
Download zipStreaming multipart/form-data parser and writer for MoonBit.