attachment

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DispositionInline     = "inline"
	DispositionAttachment = "attachment"
)

Variables

This section is empty.

Functions

func MakeHeader

func MakeHeader(contentType, contentID, fileName, encoding, disposition string) textproto.MIMEHeader

MakeHeader creates a MIME header for email attachments or inline content.

Types

type Attachment

type Attachment struct {
	Name        string               `json:"name"`
	Size        int                  `json:"size"`
	Content     []byte               `json:"content"`
	ContentID   string               `json:"content_id"`
	ContentType string               `json:"content_type"`
	Disposition string               `json:"disposition"`
	UUID        string               `json:"uuid"`
	URL         string               `json:"url"`
	Header      textproto.MIMEHeader `json:"-"`
}

Attachment represents a file or blob attachment that can be sent or received on a message.

type Attachments

type Attachments []Attachment

func (*Attachments) Scan

func (a *Attachments) Scan(value interface{}) error

Jump to

Keyboard shortcuts

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