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 ¶
- func RegisterMailerServiceHandler(s server.Server, hdlr MailerServiceHandler, opts ...server.HandlerOption)
- type ConsumeQueueRequest
- type ConsumeQueueResponse
- func (*ConsumeQueueResponse) Descriptor() ([]byte, []int)
- func (m *ConsumeQueueResponse) GetEmailsSent() int64
- func (m *ConsumeQueueResponse) GetMessage() string
- func (*ConsumeQueueResponse) ProtoMessage()
- func (m *ConsumeQueueResponse) Reset()
- func (m *ConsumeQueueResponse) String() string
- func (this *ConsumeQueueResponse) Validate() error
- type Mail
- func (*Mail) Descriptor() ([]byte, []int)
- func (m *Mail) GetAttachments() []string
- func (m *Mail) GetCc() []*User
- func (m *Mail) GetContentHtml() string
- func (m *Mail) GetContentMarkdown() string
- func (m *Mail) GetContentPlain() string
- func (m *Mail) GetDateSent() int64
- func (m *Mail) GetFrom() *User
- func (m *Mail) GetRetries() int32
- func (m *Mail) GetSendErrors() []string
- func (m *Mail) GetSender() *User
- func (m *Mail) GetSubject() string
- func (m *Mail) GetTemplateData() map[string]string
- func (m *Mail) GetTemplateId() string
- func (m *Mail) GetThreadIndex() string
- func (m *Mail) GetThreadUuid() string
- func (m *Mail) GetTo() []*User
- func (*Mail) ProtoMessage()
- func (m *Mail) Reset()
- func (m *Mail) String() string
- func (this *Mail) Validate() error
- type MailerService
- type MailerServiceClient
- type MailerServiceHandler
- type SendMailRequest
- type SendMailResponse
- type User
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) GetAttachments ¶
func (*Mail) GetContentHtml ¶
func (*Mail) GetContentMarkdown ¶
func (*Mail) GetContentPlain ¶
func (*Mail) GetDateSent ¶
func (*Mail) GetRetries ¶
func (*Mail) GetSendErrors ¶
func (*Mail) GetSubject ¶
func (*Mail) GetTemplateData ¶
func (*Mail) GetTemplateId ¶
func (*Mail) GetThreadIndex ¶
func (*Mail) GetThreadUuid ¶
func (*Mail) ProtoMessage ¶
func (*Mail) ProtoMessage()
type MailerService ¶
type MailerService struct {
MailerServiceHandler
}
func (*MailerService) ConsumeQueue ¶
func (h *MailerService) ConsumeQueue(ctx context.Context, in *ConsumeQueueRequest, out *ConsumeQueueResponse) error
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) GetAddress ¶
func (*User) GetLanguage ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.