Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
// contains filtered or unexported fields
}
Attachment is a wrapper for io.Reader, with the difference that there is the size attribute. If positive value (including 0) is set, then ordinary plain-text response will be rendered. Otherwise, chunked transfer encoding is used.
func NewAttachment ¶
func NewAttachment(content io.Reader, size int) Attachment
NewAttachment returns a new Attachment instance
func (Attachment) Close ¶
func (a Attachment) Close()
func (Attachment) Content ¶
func (a Attachment) Content() io.Reader
func (Attachment) Size ¶
func (a Attachment) Size() int
Click to show internal directories.
Click to hide internal directories.