aicra/internal/multipart/types.go

28 lines
506 B
Go
Raw Normal View History

package multipart
import (
"bufio"
)
2018-07-08 23:34:21 +00:00
// Reader represents a multipart reader
type Reader struct {
// reader used for http.Request.Body reading
reader *bufio.Reader
// boundary used to separate multipart components
boundary string
// result will be inside this field
2018-07-08 23:34:21 +00:00
Components map[string]*Component
}
2018-07-08 23:34:21 +00:00
// Component represents a multipart component
type Component struct {
// whether this component is a file
// if not, it is a simple variable data
File bool
// actual data
Data []string
}