emailing

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 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.

func RegisterEmailingServer

func RegisterEmailingServer(s *grpc.Server, 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,2,rep,name=destinations,proto3" json:"destinations,omitempty"`
	From            string        `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	Subject         string        `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
	Body            string        `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	BodyContentType string        `protobuf:"bytes,5,opt,name=body_content_type,json=bodyContentType,proto3" json:"body_content_type,omitempty"`
	Attachments     []*Attachemnt `protobuf:"bytes,6,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) 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 EmailingClient

type EmailingClient interface {
	// Sends email
	SendEmail(ctx context.Context, in *Email, 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewEmailingClient

func NewEmailingClient(cc grpc.ClientConnInterface) EmailingClient

type EmailingServer

type EmailingServer interface {
	// Sends email
	SendEmail(context.Context, *Email) (*empty.Empty, error)
}

EmailingServer is the server API for Emailing service.

type UnimplementedEmailingServer

type UnimplementedEmailingServer struct {
}

UnimplementedEmailingServer can be embedded to have forward compatible implementations.

func (*UnimplementedEmailingServer) SendEmail

Jump to

Keyboard shortcuts

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