import_message_config

package
v1.121.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 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 Config

type Config struct {
	InternalDateSource InternalDateSource
	// NeverMarkSpam keeps Gmail's spam classifier from filing the message as
	// spam, whatever it makes of it.
	NeverMarkSpam bool
	// ProcessForCalendar has Gmail add the invitations the message carries to
	// the user's calendar.
	ProcessForCalendar bool
	// Deleted marks the message as permanently deleted, visible only to a
	// Workspace administrator.
	Deleted      bool
	FetchOptions []fetch_config.Option
}

func New

func New(options ...Option) *Config

type InternalDateSource

type InternalDateSource string

InternalDateSource is where Gmail takes an imported message's internal date from, which is what the mailbox sorts and dates it by.

const (
	// InternalDateSourceReceivedTime dates the message at the moment it is
	// imported. Gmail's default.
	InternalDateSourceReceivedTime InternalDateSource = "receivedTime"
	// InternalDateSourceDateHeader dates the message by its own Date header.
	InternalDateSourceDateHeader InternalDateSource = "dateHeader"
)

type Option

type Option func(*Config)

func WithDeleted

func WithDeleted(deleted bool) Option

func WithFetchOptions

func WithFetchOptions(fetchOptions ...fetch_config.Option) Option

func WithInternalDateSource

func WithInternalDateSource(source InternalDateSource) Option

func WithNeverMarkSpam

func WithNeverMarkSpam(neverMarkSpam bool) Option

func WithProcessForCalendar

func WithProcessForCalendar(processForCalendar bool) Option

Jump to

Keyboard shortcuts

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