emailing

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package emailing is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_emailing_proto protoreflect.FileDescriptor

Functions

func RegisterEmailingHandler

func RegisterEmailingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterEmailingHandler registers the http handlers for service Emailing to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterEmailingHandlerClient

func RegisterEmailingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EmailingClient) error

RegisterEmailingHandlerClient registers the http handlers for service Emailing to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EmailingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EmailingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EmailingClient" to call the correct interceptors.

func RegisterEmailingHandlerFromEndpoint

func RegisterEmailingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterEmailingHandlerFromEndpoint is same as RegisterEmailingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterEmailingHandlerServer

func RegisterEmailingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EmailingServer) error

RegisterEmailingHandlerServer registers the http handlers for service Emailing to "mux". UnaryRPC :call EmailingServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEmailingHandlerFromEndpoint instead.

func RegisterEmailingServer

func RegisterEmailingServer(s grpc.ServiceRegistrar, srv EmailingServer)

Types

type Attachemnt

type Attachemnt struct {
	Filename         string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	FilenameOverride string `protobuf:"bytes,2,opt,name=filename_override,json=filenameOverride,proto3" json:"filename_override,omitempty"`
	Ctype            string `protobuf:"bytes,3,opt,name=ctype,proto3" json:"ctype,omitempty"`
	Data             []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Attachemnt) Descriptor deprecated

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

Deprecated: Use Attachemnt.ProtoReflect.Descriptor instead.

func (*Attachemnt) GetCtype

func (x *Attachemnt) GetCtype() string

func (*Attachemnt) GetData

func (x *Attachemnt) GetData() []byte

func (*Attachemnt) GetFilename

func (x *Attachemnt) GetFilename() string

func (*Attachemnt) GetFilenameOverride

func (x *Attachemnt) GetFilenameOverride() string

func (*Attachemnt) ProtoMessage

func (*Attachemnt) ProtoMessage()

func (*Attachemnt) ProtoReflect

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

func (*Attachemnt) Reset

func (x *Attachemnt) Reset()

func (*Attachemnt) String

func (x *Attachemnt) String() string

type Email

type Email struct {
	Destinations    []string      `protobuf:"bytes,1,rep,name=destinations,proto3" json:"destinations,omitempty"`
	From            string        `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	DisplayName     string        `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	Subject         string        `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
	Body            string        `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	BodyContentType string        `protobuf:"bytes,6,opt,name=body_content_type,json=bodyContentType,proto3" json:"body_content_type,omitempty"`
	Attachments     []*Attachemnt `protobuf:"bytes,7,rep,name=attachments,proto3" json:"attachments,omitempty"`
	// contains filtered or unexported fields
}

func (*Email) Descriptor deprecated

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

Deprecated: Use Email.ProtoReflect.Descriptor instead.

func (*Email) GetAttachments

func (x *Email) GetAttachments() []*Attachemnt

func (*Email) GetBody

func (x *Email) GetBody() string

func (*Email) GetBodyContentType

func (x *Email) GetBodyContentType() string

func (*Email) GetDestinations

func (x *Email) GetDestinations() []string

func (*Email) GetDisplayName

func (x *Email) GetDisplayName() string

func (*Email) GetFrom

func (x *Email) GetFrom() string

func (*Email) GetSubject

func (x *Email) GetSubject() string

func (*Email) ProtoMessage

func (*Email) ProtoMessage()

func (*Email) ProtoReflect

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

func (*Email) Reset

func (x *Email) Reset()

func (*Email) String

func (x *Email) String() string

type EmailSender

type EmailSender struct {
	EmailSender string `protobuf:"bytes,1,opt,name=email_sender,json=emailSender,proto3" json:"email_sender,omitempty"`
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	AppName     string `protobuf:"bytes,3,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailSender) Descriptor deprecated

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

Deprecated: Use EmailSender.ProtoReflect.Descriptor instead.

func (*EmailSender) GetAppName

func (x *EmailSender) GetAppName() string

func (*EmailSender) GetDisplayName

func (x *EmailSender) GetDisplayName() string

func (*EmailSender) GetEmailSender

func (x *EmailSender) GetEmailSender() string

func (*EmailSender) ProtoMessage

func (*EmailSender) ProtoMessage()

func (*EmailSender) ProtoReflect

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

func (*EmailSender) Reset

func (x *EmailSender) Reset()

func (*EmailSender) String

func (x *EmailSender) String() string

type EmailingClient

type EmailingClient interface {
	// Sends email
	SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

EmailingClient is the client API for Emailing 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.

func NewEmailingClient

func NewEmailingClient(cc grpc.ClientConnInterface) EmailingClient

type EmailingServer

type EmailingServer interface {
	// Sends email
	SendEmail(context.Context, *SendEmailRequest) (*empty.Empty, error)
	// contains filtered or unexported methods
}

EmailingServer is the server API for Emailing service. All implementations must embed UnimplementedEmailingServer for forward compatibility

type SendEmailRequest

type SendEmailRequest struct {
	Email *Email `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*SendEmailRequest) Descriptor deprecated

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

Deprecated: Use SendEmailRequest.ProtoReflect.Descriptor instead.

func (*SendEmailRequest) GetEmail

func (x *SendEmailRequest) GetEmail() *Email

func (*SendEmailRequest) ProtoMessage

func (*SendEmailRequest) ProtoMessage()

func (*SendEmailRequest) ProtoReflect

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

func (*SendEmailRequest) Reset

func (x *SendEmailRequest) Reset()

func (*SendEmailRequest) String

func (x *SendEmailRequest) String() string

type UnimplementedEmailingServer

type UnimplementedEmailingServer struct {
}

UnimplementedEmailingServer must be embedded to have forward compatible implementations.

func (UnimplementedEmailingServer) SendEmail

type UnsafeEmailingServer

type UnsafeEmailingServer interface {
	// contains filtered or unexported methods
}

UnsafeEmailingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EmailingServer will result in compilation errors.

Jump to

Keyboard shortcuts

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