This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
2023-01-26 19:42:07 +00:00
|
|
|
package tomo
|
|
|
|
|
|
|
|
import "io"
|
|
|
|
|
2023-01-30 05:54:06 +00:00
|
|
|
// Data represents arbitrary polymorphic data that can be used for data transfer
|
|
|
|
// between applications.
|
|
|
|
type Data map[Mime] io.ReadCloser
|
2023-01-26 19:42:07 +00:00
|
|
|
|
|
|
|
// Mime represents a MIME type.
|
|
|
|
type Mime struct {
|
|
|
|
// Type is the first half of the MIME type, and Subtype is the second
|
|
|
|
// half. The separating slash is not included in either. For example,
|
|
|
|
// text/html becomes:
|
|
|
|
// Mime { Type: "text", Subtype: "html" }
|
|
|
|
Type, Subtype string
|
|
|
|
}
|
2023-01-30 05:54:06 +00:00
|
|
|
|
|
|
|
var MimePlain = Mime { "text", "plain" }
|
|
|
|
|
|
|
|
var MimeFile = Mime { "text", "uri-list" }
|