multipart

package module
v0.0.0-...-c79d50d Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Part

type Part struct {
	Header textproto.MIMEHeader
	Body   []byte
}

Part defines a `body part`, which refers to an entity inside of a multipart entity. See https://tools.ietf.org/html/rfc2045#section-2.5

type Related struct {
	// Required Parameters
	Type     string
	Boundary string

	// Optional Parameters
	Start     string
	StartInfo string

	// Multipart
	RootPart      Part
	ChildrenParts []Part

	Data interface{}
}

Related defines a message of MIME type `multipart/related`. See https://tools.ietf.org/html/rfc2387

func (Related) ContentType

func (r Related) ContentType() string

ContentType returns the format media-type of multipart entity r

func (Related) Render

func (r Related) Render(w http.ResponseWriter) error

Render implements the callback method of Related type for gin data render

func (Related) WriteContentType

func (r Related) WriteContentType(w http.ResponseWriter)

WriteContentType implements the callback method of Related type for gin data render

Jump to

Keyboard shortcuts

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