CrossClj

1.1.44 docs

SourceDocs



RECENT
    VARS
    ->DefaultPart
    ->DefaultPartConsumer
    ->DefaultPartial
    advance-window
    append-chunk
    assemble-into-one-byte-array
    assoc-body-parameters
    CHUNK-SIZE
    compute-index
    copy-and-match
    copy-bytes
    copy-bytes-after-dash-boundary
    copy-bytes-after-delimiter
    count-transport-padding
    dash-boundary
    default-part-coercion-matcher
    find-part
    finish-up
    get-bytes
    make-space
    make-space-until-sufficient
    map->DefaultPart
    map->DefaultPartConsumer
    map->DefaultPartial
    parse-content-disposition-header
    parse-multipart
    part-bytes
    part-content-type
    part-string
    PartConsumer
    Partial
    process-boundaries
    process-chunk
    reduce-piece
    trampoline-make-space
    xf-add-header-info
    xf-parse-content-disposition

    « Index of all namespaces of this project

    (->DefaultPart)
    Positional factory function for class yada.multipart.DefaultPart.
    
    (->DefaultPartConsumer)
    Positional factory function for class yada.multipart.DefaultPartConsumer.
    
    (->DefaultPartial initial)
    Positional factory function for class yada.multipart.DefaultPartial.
    
    Private
    (advance-window m amount)
    Private
    (append-chunk {:keys [window pos], :as m} chunk)
    Copy over the chunk's bytes into the window
    
    (assemble-into-one-byte-array coll)
    (assoc-body-parameters ctx parts-by-name schemas)
    Private
    (compute-index delim)
    Private
    (copy-and-match {:keys [index window pos]})
    Private
    (copy-bytes source from to)
    Private
    (copy-bytes-after-dash-boundary {:keys [window dash-boundary-size]} from to)
    Private
    (copy-bytes-after-delimiter {:keys [window delimiter-size]} from to)
    Private
    (count-transport-padding from to b)
    (dash-boundary boundary)
    (find-part ctx name)
    Find part by Content-Disposition name parameter
    
    Private
    (finish-up m)
    Private
    (get-bytes part)
    Private
    (make-space m)
    Private
    (make-space-until-sufficient m)
    (map->DefaultPart m__7585__auto__)
    Factory function for class yada.multipart.DefaultPart, taking a map of keywords to field values.
    
    (map->DefaultPartConsumer m__7585__auto__)
    Factory function for class yada.multipart.DefaultPartConsumer, taking a map of keywords to field values.
    
    (map->DefaultPartial m__7585__auto__)
    Factory function for class yada.multipart.DefaultPartial, taking a map of keywords to field values.
    
    (parse-content-disposition-header s)
    (parse-multipart boundary window-size max-chunk-size source)
    Asynchronously parse a multipart stream arriving in chunks from the
    given source. Returns a stream emitting pieces which can be assembled
    to form parts of a multipart stream.
    
    The parts in the multipart should be separated with boundaries, as
    required by RFC 2046. The boundary string is given as an argument.
    
    Every piece is a map which is labelled with a :type entry. Small
    pieces that form whole parts are labelled with a :type value of :part.
    
    Larger parts are broken into a sequence of pieces. The first piece is
    labelled :partial, subsequence pieces are
    labelled :partial-continuation except the last one which is
    labelled :partial-completion.
    
    If there is a preamble in the multipart, this is indicated by a piece
    labelled :preamble. Similar to the handling of large parts, a large
    preamble is broken into pieces
    labelled :partial-preamble, :preamble-continuation
    and :preamble-completion. Consumers should be aware of this in order
    to properly discard a preamble that spans multiple chunks.
    
    If the multipart content is properly terminated with a correct
    end-marker, the stream is terminated with a piece labelled with :end
    which also contains the epilogue, if any. Typically the epilogue is
    discarded.
    
    The window-size argument indicates the size of the buffer that will be
    used to analyze incoming chunks. It should ideally be a multiple of
    the maximum expected chunk size, specifically it should be at least
    the size of the maximum expected chunk size (request buffer size) plus
    twice the length of the delimiter (the delimiter is derived from the
    boundary argument).
    
    (part-bytes part)
    Return a copy of the bytes, as a byte-array, of a part.
    
    (part-content-type part)
    Return the content type, if specified, of the part
    
    (part-string part)
    Return the string body of a part
    
    protocol
    (consume-part _ state part)
    Return state with part attached
    
    (start-partial _ piece)
    Return a partial
    
    protocol
    (complete _ state piece)
    Return state, with completed partial
    
    (continue _ piece)
    Return thyself
    
    Private
    (process-chunk {:keys [pos window], :as m} chunk)
    (reduce-piece {:keys [state consumer partial], :as acc} piece)
    Reducing function for assembling pieces into parts. Seed the reduce
    with a map that contains an entry for :consumer with a value
    satisfying PartConsumer.
    Private
    (trampoline-make-space m)
    (xf-add-header-info)
    (xf-parse-content-disposition)