email

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_email_proto protoreflect.FileDescriptor

Functions

func NewEmailEndpoints

func NewEmailEndpoints() []*api.Endpoint

func RegisterEmailHandler

func RegisterEmailHandler(s server.Server, hdlr EmailHandler, opts ...server.HandlerOption) error

Types

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 added in v0.25.0

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 added in v0.25.0

func (*ParseRequest) Descriptor() ([]byte, []int)

Deprecated: Use ParseRequest.ProtoReflect.Descriptor instead.

func (*ParseRequest) GetAddress added in v0.25.0

func (x *ParseRequest) GetAddress() string

func (*ParseRequest) ProtoMessage added in v0.25.0

func (*ParseRequest) ProtoMessage()

func (*ParseRequest) ProtoReflect added in v0.25.0

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

func (*ParseRequest) Reset added in v0.25.0

func (x *ParseRequest) Reset()

func (*ParseRequest) String added in v0.25.0

func (x *ParseRequest) String() string

type ParseResponse added in v0.25.0

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 added in v0.25.0

func (*ParseResponse) Descriptor() ([]byte, []int)

Deprecated: Use ParseResponse.ProtoReflect.Descriptor instead.

func (*ParseResponse) GetAddress added in v0.25.0

func (x *ParseResponse) GetAddress() string

func (*ParseResponse) GetName added in v0.25.0

func (x *ParseResponse) GetName() string

func (*ParseResponse) ProtoMessage added in v0.25.0

func (*ParseResponse) ProtoMessage()

func (*ParseResponse) ProtoReflect added in v0.25.0

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

func (*ParseResponse) Reset added in v0.25.0

func (x *ParseResponse) Reset()

func (*ParseResponse) String added in v0.25.0

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 added in v0.25.0

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 added in v0.25.0

func (*ValidateRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.

func (*ValidateRequest) GetAddress added in v0.25.0

func (x *ValidateRequest) GetAddress() string

func (*ValidateRequest) ProtoMessage added in v0.25.0

func (*ValidateRequest) ProtoMessage()

func (*ValidateRequest) ProtoReflect added in v0.25.0

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

func (*ValidateRequest) Reset added in v0.25.0

func (x *ValidateRequest) Reset()

func (*ValidateRequest) String added in v0.25.0

func (x *ValidateRequest) String() string

type ValidateResponse added in v0.25.0

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 added in v0.25.0

func (*ValidateResponse) Descriptor() ([]byte, []int)

Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.

func (*ValidateResponse) GetIsValid added in v0.25.0

func (x *ValidateResponse) GetIsValid() bool

func (*ValidateResponse) ProtoMessage added in v0.25.0

func (*ValidateResponse) ProtoMessage()

func (*ValidateResponse) ProtoReflect added in v0.25.0

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

func (*ValidateResponse) Reset added in v0.25.0

func (x *ValidateResponse) Reset()

func (*ValidateResponse) String added in v0.25.0

func (x *ValidateResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL