Documentation
¶
Index ¶
- Variables
- func NewEmailEndpoints() []*api.Endpoint
- func RegisterEmailHandler(s server.Server, hdlr EmailHandler, opts ...server.HandlerOption) error
- type EmailHandler
- type EmailService
- type ParseRequest
- type ParseResponse
- func (*ParseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ParseResponse) GetAddress() string
- func (x *ParseResponse) GetName() string
- func (*ParseResponse) ProtoMessage()
- func (x *ParseResponse) ProtoReflect() protoreflect.Message
- func (x *ParseResponse) Reset()
- func (x *ParseResponse) String() string
- 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
- type ValidateRequest
- type ValidateResponse
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 Parse(context.Context, *ParseRequest, *ParseResponse) error Validate(context.Context, *ValidateRequest, *ValidateResponse) error }
type EmailService ¶
type EmailService interface { Send(ctx context.Context, in *SendRequest, opts ...client.CallOption) (*SendResponse, error) Parse(ctx context.Context, in *ParseRequest, opts ...client.CallOption) (*ParseResponse, error) Validate(ctx context.Context, in *ValidateRequest, opts ...client.CallOption) (*ValidateResponse, error) }
func NewEmailService ¶
func NewEmailService(name string, c client.Client) EmailService
type ParseRequest ¶
type ParseRequest struct { // The address to parse. Can be of the format "Joe Blogs <joe@example.com>" or "joe@example.com" Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
Parse an RFC5322 address e.g "Joe Blogs <joe@example.com>"
func (*ParseRequest) Descriptor
deprecated
func (*ParseRequest) Descriptor() ([]byte, []int)
Deprecated: Use ParseRequest.ProtoReflect.Descriptor instead.
func (*ParseRequest) GetAddress ¶
func (x *ParseRequest) GetAddress() string
func (*ParseRequest) ProtoMessage ¶
func (*ParseRequest) ProtoMessage()
func (*ParseRequest) ProtoReflect ¶
func (x *ParseRequest) ProtoReflect() protoreflect.Message
func (*ParseRequest) Reset ¶
func (x *ParseRequest) Reset()
func (*ParseRequest) String ¶
func (x *ParseRequest) String() string
type ParseResponse ¶
type ParseResponse struct { // associated name e.g Joe Blogs Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // the email address Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*ParseResponse) Descriptor
deprecated
func (*ParseResponse) Descriptor() ([]byte, []int)
Deprecated: Use ParseResponse.ProtoReflect.Descriptor instead.
func (*ParseResponse) GetAddress ¶
func (x *ParseResponse) GetAddress() string
func (*ParseResponse) GetName ¶
func (x *ParseResponse) GetName() string
func (*ParseResponse) ProtoMessage ¶
func (*ParseResponse) ProtoMessage()
func (*ParseResponse) ProtoReflect ¶
func (x *ParseResponse) ProtoReflect() protoreflect.Message
func (*ParseResponse) Reset ¶
func (x *ParseResponse) Reset()
func (*ParseResponse) String ¶
func (x *ParseResponse) String() string
type SendRequest ¶
type SendRequest struct { // the display 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
type ValidateRequest ¶
type ValidateRequest struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
Validate an email address format
func (*ValidateRequest) Descriptor
deprecated
func (*ValidateRequest) Descriptor() ([]byte, []int)
Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.
func (*ValidateRequest) GetAddress ¶
func (x *ValidateRequest) GetAddress() string
func (*ValidateRequest) ProtoMessage ¶
func (*ValidateRequest) ProtoMessage()
func (*ValidateRequest) ProtoReflect ¶
func (x *ValidateRequest) ProtoReflect() protoreflect.Message
func (*ValidateRequest) Reset ¶
func (x *ValidateRequest) Reset()
func (*ValidateRequest) String ¶
func (x *ValidateRequest) String() string
type ValidateResponse ¶
type ValidateResponse struct { IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` // contains filtered or unexported fields }
func (*ValidateResponse) Descriptor
deprecated
func (*ValidateResponse) Descriptor() ([]byte, []int)
Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.
func (*ValidateResponse) GetIsValid ¶
func (x *ValidateResponse) GetIsValid() bool
func (*ValidateResponse) ProtoMessage ¶
func (*ValidateResponse) ProtoMessage()
func (*ValidateResponse) ProtoReflect ¶
func (x *ValidateResponse) ProtoReflect() protoreflect.Message
func (*ValidateResponse) Reset ¶
func (x *ValidateResponse) Reset()
func (*ValidateResponse) String ¶
func (x *ValidateResponse) String() string
Click to show internal directories.
Click to hide internal directories.