Documentation ¶
Index ¶
- Variables
- func RegisterMailerServiceServer(s grpc.ServiceRegistrar, srv MailerServiceServer)
- type ConsumeQueueRequest
- func (*ConsumeQueueRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConsumeQueueRequest) GetMaxEmails() int64
- func (*ConsumeQueueRequest) ProtoMessage()
- func (x *ConsumeQueueRequest) ProtoReflect() protoreflect.Message
- func (x *ConsumeQueueRequest) Reset()
- func (x *ConsumeQueueRequest) String() string
- type ConsumeQueueResponse
- func (*ConsumeQueueResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConsumeQueueResponse) GetEmailsSent() int64
- func (x *ConsumeQueueResponse) GetMessage() string
- func (*ConsumeQueueResponse) ProtoMessage()
- func (x *ConsumeQueueResponse) ProtoReflect() protoreflect.Message
- func (x *ConsumeQueueResponse) Reset()
- func (x *ConsumeQueueResponse) String() string
- type Mail
- func (*Mail) Descriptor() ([]byte, []int)deprecated
- func (x *Mail) GetAttachments() []string
- func (x *Mail) GetCc() []*User
- func (x *Mail) GetContentHtml() string
- func (x *Mail) GetContentMarkdown() string
- func (x *Mail) GetContentPlain() string
- func (x *Mail) GetDateSent() int64
- func (x *Mail) GetFrom() *User
- func (x *Mail) GetRetries() int32
- func (x *Mail) GetSendErrors() []string
- func (x *Mail) GetSender() *User
- func (x *Mail) GetSubject() string
- func (x *Mail) GetTemplateData() map[string]string
- func (x *Mail) GetTemplateId() string
- func (x *Mail) GetThreadIndex() string
- func (x *Mail) GetThreadUuid() string
- func (x *Mail) GetTo() []*User
- func (*Mail) ProtoMessage()
- func (x *Mail) ProtoReflect() protoreflect.Message
- func (x *Mail) Reset()
- func (x *Mail) String() string
- type MailerServiceClient
- type MailerServiceServer
- type SendMailRequest
- func (*SendMailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendMailRequest) GetInQueue() bool
- func (x *SendMailRequest) GetMail() *Mail
- func (*SendMailRequest) ProtoMessage()
- func (x *SendMailRequest) ProtoReflect() protoreflect.Message
- func (x *SendMailRequest) Reset()
- func (x *SendMailRequest) String() string
- type SendMailResponse
- type UnimplementedMailerServiceServer
- type UnsafeMailerServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAddress() string
- func (x *User) GetLanguage() string
- func (x *User) GetName() string
- func (x *User) GetUuid() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
This section is empty.
Variables ¶
var File_cells_mailer_proto protoreflect.FileDescriptor
var MailerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mailer.MailerService", HandlerType: (*MailerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendMail", Handler: _MailerService_SendMail_Handler, }, { MethodName: "ConsumeQueue", Handler: _MailerService_ConsumeQueue_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cells-mailer.proto", }
MailerService_ServiceDesc is the grpc.ServiceDesc for MailerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMailerServiceServer ¶
func RegisterMailerServiceServer(s grpc.ServiceRegistrar, srv MailerServiceServer)
Types ¶
type ConsumeQueueRequest ¶
type ConsumeQueueRequest struct { MaxEmails int64 `protobuf:"varint,1,opt,name=MaxEmails,proto3" json:"MaxEmails,omitempty"` // contains filtered or unexported fields }
func (*ConsumeQueueRequest) Descriptor
deprecated
func (*ConsumeQueueRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConsumeQueueRequest.ProtoReflect.Descriptor instead.
func (*ConsumeQueueRequest) GetMaxEmails ¶
func (x *ConsumeQueueRequest) GetMaxEmails() int64
func (*ConsumeQueueRequest) ProtoMessage ¶
func (*ConsumeQueueRequest) ProtoMessage()
func (*ConsumeQueueRequest) ProtoReflect ¶
func (x *ConsumeQueueRequest) ProtoReflect() protoreflect.Message
func (*ConsumeQueueRequest) Reset ¶
func (x *ConsumeQueueRequest) Reset()
func (*ConsumeQueueRequest) String ¶
func (x *ConsumeQueueRequest) String() string
type ConsumeQueueResponse ¶
type ConsumeQueueResponse struct { Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"` EmailsSent int64 `protobuf:"varint,2,opt,name=EmailsSent,proto3" json:"EmailsSent,omitempty"` // contains filtered or unexported fields }
func (*ConsumeQueueResponse) Descriptor
deprecated
func (*ConsumeQueueResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConsumeQueueResponse.ProtoReflect.Descriptor instead.
func (*ConsumeQueueResponse) GetEmailsSent ¶
func (x *ConsumeQueueResponse) GetEmailsSent() int64
func (*ConsumeQueueResponse) GetMessage ¶
func (x *ConsumeQueueResponse) GetMessage() string
func (*ConsumeQueueResponse) ProtoMessage ¶
func (*ConsumeQueueResponse) ProtoMessage()
func (*ConsumeQueueResponse) ProtoReflect ¶
func (x *ConsumeQueueResponse) ProtoReflect() protoreflect.Message
func (*ConsumeQueueResponse) Reset ¶
func (x *ConsumeQueueResponse) Reset()
func (*ConsumeQueueResponse) String ¶
func (x *ConsumeQueueResponse) String() string
type Mail ¶
type Mail struct { // User object used to compute the From header From *User `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"` // List of target users to send the mail to To []*User `protobuf:"bytes,3,rep,name=To,proto3" json:"To,omitempty"` // List of target users to put in CC Cc []*User `protobuf:"bytes,4,rep,name=Cc,proto3" json:"Cc,omitempty"` // Date of sending DateSent int64 `protobuf:"varint,5,opt,name=DateSent,proto3" json:"DateSent,omitempty"` // String used as subject for the email Subject string `protobuf:"bytes,6,opt,name=Subject,proto3" 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,proto3" json:"ContentPlain,omitempty"` // HTML content used for the body ContentHtml string `protobuf:"bytes,8,opt,name=ContentHtml,proto3" json:"ContentHtml,omitempty"` // Markdown content used for the body ContentMarkdown string `protobuf:"bytes,9,opt,name=ContentMarkdown,proto3" json:"ContentMarkdown,omitempty"` // List of attachments Attachments []string `protobuf:"bytes,10,rep,name=Attachments,proto3" json:"Attachments,omitempty"` // Not used, could be used to create conversations ThreadUuid string `protobuf:"bytes,11,opt,name=ThreadUuid,proto3" json:"ThreadUuid,omitempty"` // Not used, could be used to create conversations ThreadIndex string `protobuf:"bytes,12,opt,name=ThreadIndex,proto3" json:"ThreadIndex,omitempty"` // Mail Template Id refers to predefined templates TemplateId string `protobuf:"bytes,13,opt,name=TemplateId,proto3" json:"TemplateId,omitempty"` // Key/values to pass to the template TemplateData map[string]string `` /* 166-byte string literal not displayed */ // Number of retries after failed attempts (used internally) Retries int32 `protobuf:"varint,15,opt,name=Retries,proto3" json:"Retries,omitempty"` // Errors stacked on failed attempts SendErrors []string `protobuf:"bytes,16,rep,name=sendErrors,proto3" json:"sendErrors,omitempty"` // User object used to compute the Sender header Sender *User `protobuf:"bytes,17,opt,name=Sender,proto3" json:"Sender,omitempty"` // contains filtered or unexported fields }
func (*Mail) Descriptor
deprecated
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()
func (*Mail) ProtoReflect ¶
func (x *Mail) ProtoReflect() protoreflect.Message
type MailerServiceClient ¶
type MailerServiceClient interface { SendMail(ctx context.Context, in *SendMailRequest, opts ...grpc.CallOption) (*SendMailResponse, error) ConsumeQueue(ctx context.Context, in *ConsumeQueueRequest, opts ...grpc.CallOption) (*ConsumeQueueResponse, error) }
MailerServiceClient is the client API for MailerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMailerServiceClient ¶
func NewMailerServiceClient(cc grpc.ClientConnInterface) MailerServiceClient
type MailerServiceServer ¶
type MailerServiceServer interface { SendMail(context.Context, *SendMailRequest) (*SendMailResponse, error) ConsumeQueue(context.Context, *ConsumeQueueRequest) (*ConsumeQueueResponse, error) // contains filtered or unexported methods }
MailerServiceServer is the server API for MailerService service. All implementations must embed UnimplementedMailerServiceServer for forward compatibility
type SendMailRequest ¶
type SendMailRequest struct { // Complete mail object to send Mail *Mail `protobuf:"bytes,1,opt,name=Mail,proto3" json:"Mail,omitempty"` // Whether to place in mails queue or to send right away InQueue bool `protobuf:"varint,2,opt,name=InQueue,proto3" json:"InQueue,omitempty"` // contains filtered or unexported fields }
func (*SendMailRequest) Descriptor
deprecated
func (*SendMailRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendMailRequest.ProtoReflect.Descriptor instead.
func (*SendMailRequest) GetInQueue ¶
func (x *SendMailRequest) GetInQueue() bool
func (*SendMailRequest) GetMail ¶
func (x *SendMailRequest) GetMail() *Mail
func (*SendMailRequest) ProtoMessage ¶
func (*SendMailRequest) ProtoMessage()
func (*SendMailRequest) ProtoReflect ¶
func (x *SendMailRequest) ProtoReflect() protoreflect.Message
func (*SendMailRequest) Reset ¶
func (x *SendMailRequest) Reset()
func (*SendMailRequest) String ¶
func (x *SendMailRequest) String() string
type SendMailResponse ¶
type SendMailResponse struct { Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"` // contains filtered or unexported fields }
func (*SendMailResponse) Descriptor
deprecated
func (*SendMailResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendMailResponse.ProtoReflect.Descriptor instead.
func (*SendMailResponse) GetSuccess ¶
func (x *SendMailResponse) GetSuccess() bool
func (*SendMailResponse) ProtoMessage ¶
func (*SendMailResponse) ProtoMessage()
func (*SendMailResponse) ProtoReflect ¶
func (x *SendMailResponse) ProtoReflect() protoreflect.Message
func (*SendMailResponse) Reset ¶
func (x *SendMailResponse) Reset()
func (*SendMailResponse) String ¶
func (x *SendMailResponse) String() string
type UnimplementedMailerServiceServer ¶
type UnimplementedMailerServiceServer struct { }
UnimplementedMailerServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMailerServiceServer) ConsumeQueue ¶
func (UnimplementedMailerServiceServer) ConsumeQueue(context.Context, *ConsumeQueueRequest) (*ConsumeQueueResponse, error)
func (UnimplementedMailerServiceServer) SendMail ¶
func (UnimplementedMailerServiceServer) SendMail(context.Context, *SendMailRequest) (*SendMailResponse, error)
type UnsafeMailerServiceServer ¶
type UnsafeMailerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMailerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MailerServiceServer will result in compilation errors.
type User ¶
type User struct { Uuid string `protobuf:"bytes,1,opt,name=Uuid,proto3" json:"Uuid,omitempty"` Address string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"` Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"` Language string `protobuf:"bytes,4,opt,name=Language,proto3" json:"Language,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetAddress ¶
func (*User) GetLanguage ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message