Documentation
¶
Index ¶
- Variables
- func NewEmailEndpoints() []*api.Endpoint
- func RegisterEmailHandler(s server.Server, hdlr EmailHandler, opts ...server.HandlerOption) error
- type EmailHandler
- type EmailService
- type SendRequest
- func (*SendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendRequest) GetFrom() string
- func (x *SendRequest) GetHtmlBody() string
- func (x *SendRequest) GetReplyTo() string
- func (x *SendRequest) GetSubject() string
- func (x *SendRequest) GetTextBody() string
- func (x *SendRequest) GetTo() string
- func (*SendRequest) ProtoMessage()
- func (x *SendRequest) ProtoReflect() protoreflect.Message
- func (x *SendRequest) Reset()
- func (x *SendRequest) String() string
- type SendResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_email_proto protoreflect.FileDescriptor
Functions ¶
func NewEmailEndpoints ¶
func RegisterEmailHandler ¶
func RegisterEmailHandler(s server.Server, hdlr EmailHandler, opts ...server.HandlerOption) error
Types ¶
type EmailHandler ¶
type EmailHandler interface {
Send(context.Context, *SendRequest, *SendResponse) error
}
type EmailService ¶
type EmailService interface {
Send(ctx context.Context, in *SendRequest, opts ...client.CallOption) (*SendResponse, error)
}
func NewEmailService ¶
func NewEmailService(name string, c client.Client) EmailService
type SendRequest ¶
type SendRequest struct {
// the name of the sender
From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
// the email address of the recipient
To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
// an optional reply to email address
ReplyTo string `protobuf:"bytes,3,opt,name=reply_to,json=replyTo,proto3" json:"reply_to,omitempty"`
// the email subject
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
// the text body
TextBody string `protobuf:"bytes,5,opt,name=text_body,json=textBody,proto3" json:"text_body,omitempty"`
// the html body
HtmlBody string `protobuf:"bytes,6,opt,name=html_body,json=htmlBody,proto3" json:"html_body,omitempty"`
// contains filtered or unexported fields
}
Send an email by passing in from, to, subject and a text or html body
func (*SendRequest) Descriptor
deprecated
func (*SendRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
func (*SendRequest) GetFrom ¶
func (x *SendRequest) GetFrom() string
func (*SendRequest) GetHtmlBody ¶
func (x *SendRequest) GetHtmlBody() string
func (*SendRequest) GetReplyTo ¶
func (x *SendRequest) GetReplyTo() string
func (*SendRequest) GetSubject ¶
func (x *SendRequest) GetSubject() string
func (*SendRequest) GetTextBody ¶
func (x *SendRequest) GetTextBody() string
func (*SendRequest) GetTo ¶
func (x *SendRequest) GetTo() string
func (*SendRequest) ProtoMessage ¶
func (*SendRequest) ProtoMessage()
func (*SendRequest) ProtoReflect ¶
func (x *SendRequest) ProtoReflect() protoreflect.Message
func (*SendRequest) Reset ¶
func (x *SendRequest) Reset()
func (*SendRequest) String ¶
func (x *SendRequest) String() string
type SendResponse ¶
type SendResponse struct {
// contains filtered or unexported fields
}
func (*SendResponse) Descriptor
deprecated
func (*SendResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.
func (*SendResponse) ProtoMessage ¶
func (*SendResponse) ProtoMessage()
func (*SendResponse) ProtoReflect ¶
func (x *SendResponse) ProtoReflect() protoreflect.Message
func (*SendResponse) Reset ¶
func (x *SendResponse) Reset()
func (*SendResponse) String ¶
func (x *SendResponse) String() string
Click to show internal directories.
Click to hide internal directories.