-module(multipartkit). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/multipartkit.gleam"). -export([parse/2, parse_with_limits/3, parse_stream/2, parse_stream_with_limits/3, encode/2, encode_form/1, encode_stream/2, default_limits/0, new_limits/4]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC( " Top-level facade for the multipartkit library.\n" "\n" " Re-exports the public types and the most common functions from the\n" " submodules. Less frequently used helpers (header lookup, validation,\n" " boundary extraction, content-disposition parsing, ...) live on their\n" " dedicated submodules.\n" ). -file("src/multipartkit.gleam", 47). ?DOC(" Re-export of `multipartkit/parser.parse`.\n"). -spec parse(bitstring(), binary()) -> {ok, list(multipartkit@part:part())} | {error, multipartkit@error:multipart_error()}. parse(Body, Content_type) -> multipartkit@parser:parse(Body, Content_type). -file("src/multipartkit.gleam", 55). ?DOC(" Re-export of `multipartkit/parser.parse_with_limits`.\n"). -spec parse_with_limits(bitstring(), binary(), multipartkit@limit:limits()) -> {ok, list(multipartkit@part:part())} | {error, multipartkit@error:multipart_error()}. parse_with_limits(Body, Content_type, Limits) -> multipartkit@parser:parse_with_limits(Body, Content_type, Limits). -file("src/multipartkit.gleam", 64). ?DOC(" Re-export of `multipartkit/stream.parse_stream`.\n"). -spec parse_stream(gleam@yielder:yielder(bitstring()), binary()) -> {ok, gleam@yielder:yielder({ok, multipartkit@stream:stream_part()} | {error, multipartkit@error:multipart_error()})} | {error, multipartkit@error:multipart_error()}. parse_stream(Chunks, Content_type) -> multipartkit@stream:parse_stream(Chunks, Content_type). -file("src/multipartkit.gleam", 72). ?DOC(" Re-export of `multipartkit/stream.parse_stream_with_limits`.\n"). -spec parse_stream_with_limits( gleam@yielder:yielder(bitstring()), binary(), multipartkit@limit:limits() ) -> {ok, gleam@yielder:yielder({ok, multipartkit@stream:stream_part()} | {error, multipartkit@error:multipart_error()})} | {error, multipartkit@error:multipart_error()}. parse_stream_with_limits(Chunks, Content_type, Limits) -> multipartkit@stream:parse_stream_with_limits(Chunks, Content_type, Limits). -file("src/multipartkit.gleam", 81). ?DOC(" Re-export of `multipartkit/encoder.encode`.\n"). -spec encode(binary(), list(multipartkit@part:part())) -> bitstring(). encode(Boundary, Parts) -> multipartkit@encoder:encode(Boundary, Parts). -file("src/multipartkit.gleam", 86). ?DOC(" Re-export of `multipartkit/encoder.encode_form`.\n"). -spec encode_form(multipartkit@form:form()) -> {binary(), bitstring()}. encode_form(The_form) -> multipartkit@encoder:encode_form(The_form). -file("src/multipartkit.gleam", 91). ?DOC(" Re-export of `multipartkit/encoder.encode_stream`.\n"). -spec encode_stream( binary(), gleam@yielder:yielder(multipartkit@stream:stream_part()) ) -> gleam@yielder:yielder({ok, bitstring()} | {error, multipartkit@error:multipart_error()}). encode_stream(Boundary, Parts) -> multipartkit@encoder:encode_stream(Boundary, Parts). -file("src/multipartkit.gleam", 99). ?DOC(" Re-export of `multipartkit/limit.default_limits`.\n"). -spec default_limits() -> multipartkit@limit:limits(). default_limits() -> multipartkit@limit:default_limits(). -file("src/multipartkit.gleam", 106). ?DOC( " Re-export of `multipartkit/limit.new`. Construct a validated\n" " `Limits` value; non-positive fields surface as\n" " `LimitConfigError.NonPositiveLimit`.\n" ). -spec new_limits(integer(), integer(), integer(), integer()) -> {ok, multipartkit@limit:limits()} | {error, multipartkit@limit:limit_config_error()}. new_limits(Max_body_bytes, Max_part_bytes, Max_parts, Max_header_bytes) -> multipartkit@limit:new( Max_body_bytes, Max_part_bytes, Max_parts, Max_header_bytes ).