Documentation ¶
Overview ¶
Package smtpingressapi implements the public API of the smtp.ingress.core microservice, including clients and data structures.
The SMTP ingress microservice listens for incoming emails and fires corresponding events.
Index ¶
Constants ¶
const Hostname = "smtp.ingress.core"
Hostname is the default hostname of the microservice: smtp.ingress.core.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an interface to calling the endpoints of the smtp.ingress.core microservice. This simple version is for unicast calls.
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook assists in the subscription to the events of the smtp.ingress.core microservice.
func NewHook ¶
func NewHook(listener service.Subscriber) *Hook
NewHook creates a new hook to the events of the smtp.ingress.core microservice.
type MulticastClient ¶
type MulticastClient struct {
// contains filtered or unexported fields
}
MulticastClient is an interface to calling the endpoints of the smtp.ingress.core microservice. This advanced version is for multicast calls.
func NewMulticastClient ¶
func NewMulticastClient(caller service.Publisher) *MulticastClient
NewMulticastClient creates a new multicast client to the smtp.ingress.core microservice.
func (*MulticastClient) ForHost ¶
func (_c *MulticastClient) ForHost(host string) *MulticastClient
ForHost replaces the default hostname of this client.
type MulticastTrigger ¶
type MulticastTrigger struct {
// contains filtered or unexported fields
}
MulticastTrigger is an interface to trigger the events of the smtp.ingress.core microservice.
func NewMulticastTrigger ¶
func NewMulticastTrigger(caller service.Publisher) *MulticastTrigger
NewMulticastTrigger creates a new multicast trigger of the smtp.ingress.core microservice.
func (*MulticastTrigger) ForHost ¶
func (_c *MulticastTrigger) ForHost(host string) *MulticastTrigger
ForHost replaces the default hostname of this trigger.
func (*MulticastTrigger) OnIncomingEmail ¶
func (_c *MulticastTrigger) OnIncomingEmail(ctx context.Context, mailMessage *Email) <-chan *OnIncomingEmailResponse
OnIncomingEmail is triggered when a new email message is received.
type OnIncomingEmailIn ¶
type OnIncomingEmailIn struct {
MailMessage *Email `json:"mailMessage"`
}
OnIncomingEmailIn are the input arguments of OnIncomingEmail.
type OnIncomingEmailOut ¶
type OnIncomingEmailOut struct { }
OnIncomingEmailOut are the return values of OnIncomingEmail.
type OnIncomingEmailResponse ¶
type OnIncomingEmailResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
OnIncomingEmailResponse is the response to OnIncomingEmail.
func (*OnIncomingEmailResponse) Get ¶
func (_out *OnIncomingEmailResponse) Get() (err error)
Get retrieves the return values.