mailer

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mailer is a generated protocol buffer package.

It is generated from these files:

mailer.proto

It has these top-level messages:

User
Mail
SendMailRequest
SendMailResponse
ConsumeQueueRequest
ConsumeQueueResponse

Package mailer is a generated protocol buffer package.

It is generated from these files:

mailer.proto

It has these top-level messages:

User
Mail
SendMailRequest
SendMailResponse
ConsumeQueueRequest
ConsumeQueueResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMailerServiceHandler

func RegisterMailerServiceHandler(s server.Server, hdlr MailerServiceHandler, opts ...server.HandlerOption)

Types

type ConsumeQueueRequest

type ConsumeQueueRequest struct {
	MaxEmails int64 `protobuf:"varint,1,opt,name=MaxEmails" json:"MaxEmails,omitempty"`
}

func (*ConsumeQueueRequest) Descriptor

func (*ConsumeQueueRequest) Descriptor() ([]byte, []int)

func (*ConsumeQueueRequest) GetMaxEmails

func (m *ConsumeQueueRequest) GetMaxEmails() int64

func (*ConsumeQueueRequest) ProtoMessage

func (*ConsumeQueueRequest) ProtoMessage()

func (*ConsumeQueueRequest) Reset

func (m *ConsumeQueueRequest) Reset()

func (*ConsumeQueueRequest) String

func (m *ConsumeQueueRequest) String() string

func (*ConsumeQueueRequest) Validate

func (this *ConsumeQueueRequest) Validate() error

type ConsumeQueueResponse

type ConsumeQueueResponse struct {
	Message    string `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
	EmailsSent int64  `protobuf:"varint,2,opt,name=EmailsSent" json:"EmailsSent,omitempty"`
}

func (*ConsumeQueueResponse) Descriptor

func (*ConsumeQueueResponse) Descriptor() ([]byte, []int)

func (*ConsumeQueueResponse) GetEmailsSent

func (m *ConsumeQueueResponse) GetEmailsSent() int64

func (*ConsumeQueueResponse) GetMessage

func (m *ConsumeQueueResponse) GetMessage() string

func (*ConsumeQueueResponse) ProtoMessage

func (*ConsumeQueueResponse) ProtoMessage()

func (*ConsumeQueueResponse) Reset

func (m *ConsumeQueueResponse) Reset()

func (*ConsumeQueueResponse) String

func (m *ConsumeQueueResponse) String() string

func (*ConsumeQueueResponse) Validate

func (this *ConsumeQueueResponse) Validate() error

type Mail

type Mail struct {
	// User object used to compute the From header
	From *User `protobuf:"bytes,1,opt,name=From" json:"From,omitempty"`
	// List of target users to send the mail to
	To []*User `protobuf:"bytes,3,rep,name=To" json:"To,omitempty"`
	// List of target users to put in CC
	Cc []*User `protobuf:"bytes,4,rep,name=Cc" json:"Cc,omitempty"`
	// Date of sending
	DateSent int64 `protobuf:"varint,5,opt,name=DateSent" json:"DateSent,omitempty"`
	// String used as subject for the email
	Subject string `protobuf:"bytes,6,opt,name=Subject" json:"Subject,omitempty"`
	// Plain-text content used for the body, if not set will be generated from the ContentHtml
	ContentPlain string `protobuf:"bytes,7,opt,name=ContentPlain" json:"ContentPlain,omitempty"`
	// HTML content used for the body
	ContentHtml string `protobuf:"bytes,8,opt,name=ContentHtml" json:"ContentHtml,omitempty"`
	// Markdown content used for the body
	ContentMarkdown string `protobuf:"bytes,9,opt,name=ContentMarkdown" json:"ContentMarkdown,omitempty"`
	// List of attachments
	Attachments []string `protobuf:"bytes,10,rep,name=Attachments" json:"Attachments,omitempty"`
	// Not used, could be used to create conversations
	ThreadUuid string `protobuf:"bytes,11,opt,name=ThreadUuid" json:"ThreadUuid,omitempty"`
	// Not used, could be used to create conversations
	ThreadIndex string `protobuf:"bytes,12,opt,name=ThreadIndex" json:"ThreadIndex,omitempty"`
	// Mail Template Id refers to predefined templates
	TemplateId string `protobuf:"bytes,13,opt,name=TemplateId" json:"TemplateId,omitempty"`
	// Key/values to pass to the template
	TemplateData map[string]string `` /* 145-byte string literal not displayed */
	// Number of retries after failed attempts (used internally)
	Retries int32 `protobuf:"varint,15,opt,name=Retries" json:"Retries,omitempty"`
	// Errors stacked on failed attempts
	SendErrors []string `protobuf:"bytes,16,rep,name=sendErrors" json:"sendErrors,omitempty"`
	// User object used to compute the Sender header
	Sender *User `protobuf:"bytes,17,opt,name=Sender" json:"Sender,omitempty"`
}

func (*Mail) Descriptor

func (*Mail) Descriptor() ([]byte, []int)

func (*Mail) GetAttachments

func (m *Mail) GetAttachments() []string

func (*Mail) GetCc

func (m *Mail) GetCc() []*User

func (*Mail) GetContentHtml

func (m *Mail) GetContentHtml() string

func (*Mail) GetContentMarkdown

func (m *Mail) GetContentMarkdown() string

func (*Mail) GetContentPlain

func (m *Mail) GetContentPlain() string

func (*Mail) GetDateSent

func (m *Mail) GetDateSent() int64

func (*Mail) GetFrom

func (m *Mail) GetFrom() *User

func (*Mail) GetRetries

func (m *Mail) GetRetries() int32

func (*Mail) GetSendErrors

func (m *Mail) GetSendErrors() []string

func (*Mail) GetSender added in v1.5.0

func (m *Mail) GetSender() *User

func (*Mail) GetSubject

func (m *Mail) GetSubject() string

func (*Mail) GetTemplateData

func (m *Mail) GetTemplateData() map[string]string

func (*Mail) GetTemplateId

func (m *Mail) GetTemplateId() string

func (*Mail) GetThreadIndex

func (m *Mail) GetThreadIndex() string

func (*Mail) GetThreadUuid

func (m *Mail) GetThreadUuid() string

func (*Mail) GetTo

func (m *Mail) GetTo() []*User

func (*Mail) ProtoMessage

func (*Mail) ProtoMessage()

func (*Mail) Reset

func (m *Mail) Reset()

func (*Mail) String

func (m *Mail) String() string

func (*Mail) Validate

func (this *Mail) Validate() error

type MailerService

type MailerService struct {
	MailerServiceHandler
}

func (*MailerService) ConsumeQueue

func (*MailerService) SendMail

func (h *MailerService) SendMail(ctx context.Context, in *SendMailRequest, out *SendMailResponse) error

type MailerServiceClient

type MailerServiceClient interface {
	SendMail(ctx context.Context, in *SendMailRequest, opts ...client.CallOption) (*SendMailResponse, error)
	ConsumeQueue(ctx context.Context, in *ConsumeQueueRequest, opts ...client.CallOption) (*ConsumeQueueResponse, error)
}

func NewMailerServiceClient

func NewMailerServiceClient(serviceName string, c client.Client) MailerServiceClient

type MailerServiceHandler

type MailerServiceHandler interface {
	SendMail(context.Context, *SendMailRequest, *SendMailResponse) error
	ConsumeQueue(context.Context, *ConsumeQueueRequest, *ConsumeQueueResponse) error
}

type SendMailRequest

type SendMailRequest struct {
	// Complete mail object to send
	Mail *Mail `protobuf:"bytes,1,opt,name=Mail" json:"Mail,omitempty"`
	// Whether to place in mails queue or to send right away
	InQueue bool `protobuf:"varint,2,opt,name=InQueue" json:"InQueue,omitempty"`
}

func (*SendMailRequest) Descriptor

func (*SendMailRequest) Descriptor() ([]byte, []int)

func (*SendMailRequest) GetInQueue

func (m *SendMailRequest) GetInQueue() bool

func (*SendMailRequest) GetMail

func (m *SendMailRequest) GetMail() *Mail

func (*SendMailRequest) ProtoMessage

func (*SendMailRequest) ProtoMessage()

func (*SendMailRequest) Reset

func (m *SendMailRequest) Reset()

func (*SendMailRequest) String

func (m *SendMailRequest) String() string

func (*SendMailRequest) Validate

func (this *SendMailRequest) Validate() error

type SendMailResponse

type SendMailResponse struct {
	Success bool `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
}

func (*SendMailResponse) Descriptor

func (*SendMailResponse) Descriptor() ([]byte, []int)

func (*SendMailResponse) GetSuccess

func (m *SendMailResponse) GetSuccess() bool

func (*SendMailResponse) ProtoMessage

func (*SendMailResponse) ProtoMessage()

func (*SendMailResponse) Reset

func (m *SendMailResponse) Reset()

func (*SendMailResponse) String

func (m *SendMailResponse) String() string

func (*SendMailResponse) Validate

func (this *SendMailResponse) Validate() error

type User

type User struct {
	Uuid     string `protobuf:"bytes,1,opt,name=Uuid" json:"Uuid,omitempty"`
	Address  string `protobuf:"bytes,2,opt,name=Address" json:"Address,omitempty"`
	Name     string `protobuf:"bytes,3,opt,name=Name" json:"Name,omitempty"`
	Language string `protobuf:"bytes,4,opt,name=Language" json:"Language,omitempty"`
}

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (*User) GetAddress

func (m *User) GetAddress() string

func (*User) GetLanguage

func (m *User) GetLanguage() string

func (*User) GetName

func (m *User) GetName() string

func (*User) GetUuid

func (m *User) GetUuid() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) Validate

func (this *User) Validate() error

Jump to

Keyboard shortcuts

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