Documentation ¶
Index ¶
- type MultipartStream
- func (ms *MultipartStream) Boundary() string
- func (ms *MultipartStream) ContentType() string
- func (ms *MultipartStream) Done()
- func (ms *MultipartStream) FormField(fieldName string, r io.Reader)
- func (ms *MultipartStream) FormFile(fieldName, filename string, r io.Reader) error
- func (ms *MultipartStream) Read(buf []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultipartStream ¶ added in v0.1.1
type MultipartStream struct {
// contains filtered or unexported fields
}
func NewMultipartStream ¶
func NewMultipartStream() *MultipartStream
NewMultipartStream creates a new instance os *MultipartStream object.
func (*MultipartStream) Boundary ¶ added in v0.1.1
func (ms *MultipartStream) Boundary() string
Boundary returns MultipartStream multipart/form-data boundary value.
func (*MultipartStream) ContentType ¶ added in v0.1.1
func (ms *MultipartStream) ContentType() string
ContentType returns an HTTP Content-Type header value according to multipart/form-data with the generated boundary by NewMultipartStream.
func (*MultipartStream) Done ¶ added in v0.1.1
func (ms *MultipartStream) Done()
Done inserts trailling boundary signaling the end of the multipart/form-data body request.
func (*MultipartStream) FormField ¶ added in v0.1.1
func (ms *MultipartStream) FormField(fieldName string, r io.Reader)
FormField adds a new form field to current multipart/form-data body. It panics if `r` is nil.
func (*MultipartStream) FormFile ¶ added in v0.1.1
func (ms *MultipartStream) FormFile(fieldName, filename string, r io.Reader) error
FormFile adds a new form file field in current multipart/form-data body. It panics if `r` is nil. The returned error, if there is one, will be related with mime type parsing failures.