mailer

package
v4.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_cells_mailer_proto protoreflect.FileDescriptor
View Source
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 DeregisterMailerServiceEnhancedServer

func DeregisterMailerServiceEnhancedServer(s grpc.ServiceRegistrar, name string)

func RegisterMailerServiceEnhancedServer

func RegisterMailerServiceEnhancedServer(s grpc.ServiceRegistrar, srv NamedMailerServiceServer)

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

func (*ConsumeQueueRequest) Validate

func (this *ConsumeQueueRequest) Validate() error

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

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,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) Descriptor() ([]byte, []int)

Deprecated: Use Mail.ProtoReflect.Descriptor instead.

func (*Mail) GetAttachments

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

func (*Mail) GetCc

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

func (*Mail) GetContentHtml

func (x *Mail) GetContentHtml() string

func (*Mail) GetContentMarkdown

func (x *Mail) GetContentMarkdown() string

func (*Mail) GetContentPlain

func (x *Mail) GetContentPlain() string

func (*Mail) GetDateSent

func (x *Mail) GetDateSent() int64

func (*Mail) GetFrom

func (x *Mail) GetFrom() *User

func (*Mail) GetRetries

func (x *Mail) GetRetries() int32

func (*Mail) GetSendErrors

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

func (*Mail) GetSender

func (x *Mail) GetSender() *User

func (*Mail) GetSubject

func (x *Mail) GetSubject() string

func (*Mail) GetTemplateData

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

func (*Mail) GetTemplateId

func (x *Mail) GetTemplateId() string

func (*Mail) GetThreadIndex

func (x *Mail) GetThreadIndex() string

func (*Mail) GetThreadUuid

func (x *Mail) GetThreadUuid() string

func (*Mail) GetTo

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

func (*Mail) ProtoMessage

func (*Mail) ProtoMessage()

func (*Mail) ProtoReflect

func (x *Mail) ProtoReflect() protoreflect.Message

func (*Mail) Reset

func (x *Mail) Reset()

func (*Mail) String

func (x *Mail) String() string

func (*Mail) Validate

func (this *Mail) Validate() error

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.

type MailerServiceEnhancedServer

type MailerServiceEnhancedServer map[string]NamedMailerServiceServer

func (MailerServiceEnhancedServer) ConsumeQueue

func (MailerServiceEnhancedServer) SendMail

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 NamedMailerServiceServer

type NamedMailerServiceServer interface {
	MailerServiceServer
	Name() string
}

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

func (*SendMailRequest) Validate

func (this *SendMailRequest) Validate() error

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

func (*SendMailResponse) Validate

func (this *SendMailResponse) Validate() error

type UnimplementedMailerServiceServer

type UnimplementedMailerServiceServer struct {
}

UnimplementedMailerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMailerServiceServer) ConsumeQueue

func (UnimplementedMailerServiceServer) SendMail

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAddress

func (x *User) GetAddress() string

func (*User) GetLanguage

func (x *User) GetLanguage() string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetUuid

func (x *User) GetUuid() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *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