Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsMultipartRequest ¶
IsMultipartRequest returns true if the Content-Type header suggests a multipart-encoded body. This is a utility method: ParseMultipartBody should only be called if this method returns true. Along with the boolean, this method returns the boundary string.
func ParseMultipartBody ¶
ParseMultipartBody takes a single HTTP request body that has been identified as being multipart and parses it according to what mkcert expects. In this case, the expectation is that there will be at least one part that contains a JSON-serialized list of labels, as with the normal upload, as well as zero-or-more PEM files, each containing one-or-more x509 certificates.
This function returns the slice of labels in the first element, the slice of parsed PEM certificates in the second, and an error in the third. If an error is encountered no data is read.
Types ¶
This section is empty.