types

package
v0.16.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 1 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL