envelope

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 9 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 {
	ID        int64 `bun:"id,pk,autoincrement"`
	MessageID int64
	Name      string
	Mime      string
	Extension string
}

func (*Attachment) FileName

func (a *Attachment) FileName() string

func (*Attachment) IsImage

func (a *Attachment) IsImage() bool

type AttachmentFilter

type AttachmentFilter struct {
	Ascending bool
}

type AttachmentListResult

type AttachmentListResult struct {
	Attachments []*Attachment
	PageResult  pagination.PageResult
}

type CreateMessage added in v0.11.2

type CreateMessage struct {
	Date    time.Time
	Subject string
	From    string
	To      []string
	Text    string
	HTML    string
}

type DataAttachment

type DataAttachment struct {
	Attachment *Attachment
	Data       []byte
}

func NewDataAttachment

func NewDataAttachment(name string, data []byte) DataAttachment

type Envelope

type Envelope struct {
	Message     *Message
	Attachments []*Attachment
}

type Message

type Message struct {
	ID        int64 `bun:"id,pk,autoincrement"`
	CreatedAt time.Time
	Date      time.Time
	Subject   string
	From      string   `bun:"from_"`
	To        []string `bun:"to_"`
	Text      string
	HTML      string
}

func NewMessage

func NewMessage(r CreateMessage) *Message

func (Message) IsTo

func (e Message) IsTo(to string) bool

type MessageFilter

type MessageFilter struct {
	Ascending     bool
	Search        string
	SearchSubject bool
	SearchText    bool
}

type MessageListResult

type MessageListResult struct {
	Messages   []*Message
	PageResult pagination.PageResult
}

Jump to

Keyboard shortcuts

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