sv_message

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatFull     = "full"
	FormatMetadata = "metadata"
	FormatMinimal  = "minimal"
	FormatRaw      = "raw"
)

Variables

View Source
var (
	MProgress = app_msg.Apply(&MsgProgress{}).(*MsgProgress)
)

Functions

This section is empty.

Types

type Message

type Message interface {
	Resolve(id string, opts ...ResolveOpt) (message *mo_message.Message, err error)
	List(q ...QueryOpt) (messages []*mo_message.Message, err error)
	Update(id string, opts ...UpdateOpt) (message *mo_message.Message, err error)
	Send(send to_message.Message) (sent *mo_message.Message, err error)
}

func New

func New(ctx goog_context.Context, userId string) Message

type MsgProgress

type MsgProgress struct {
	ProgressRetrieve app_msg.Message
}

type QueryOpt

type QueryOpt func(o QueryOpts) QueryOpts

func IncludeSpamTrash

func IncludeSpamTrash(enabled bool) QueryOpt

func LabelIds

func LabelIds(labels []string) QueryOpt

func MaxResults

func MaxResults(v int) QueryOpt

func Query

func Query(q string) QueryOpt

type QueryOpts

type QueryOpts struct {
	NextPageToken    string   `url:"pageToken,omitempty"`
	IncludeSpamTrash bool     `url:"includeSpamTrash,omitempty"`
	LabelIds         []string `url:"labelIds,omitempty"`
	MaxResults       int      `url:"maxResults,omitempty"`
	Query            string   `url:"q,omitempty"`
}

func (QueryOpts) Apply

func (z QueryOpts) Apply(opts ...QueryOpt) QueryOpts

type ResolveOpt

type ResolveOpt func(o ResolveOpts) ResolveOpts

func ResolveFormat

func ResolveFormat(format string) ResolveOpt

type ResolveOpts

type ResolveOpts struct {
	Format string
}

func (ResolveOpts) Apply

func (z ResolveOpts) Apply(opts ...ResolveOpt) ResolveOpts

type UpdateOpt

type UpdateOpt func(o UpdateOpts) UpdateOpts

func AddLabelIds

func AddLabelIds(labels []string) UpdateOpt

func RemoveLabelIds

func RemoveLabelIds(label []string) UpdateOpt

type UpdateOpts

type UpdateOpts struct {
	Ids            []string `json:"ids,omitempty"`
	AddLabelIds    []string `json:"addLabelIds,omitempty"`
	RemoveLabelIds []string `json:"removeLabelIds,omitempty"`
}

func (UpdateOpts) Apply

func (z UpdateOpts) Apply(opts ...UpdateOpt) UpdateOpts

Jump to

Keyboard shortcuts

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