Documentation ¶
Overview ¶
Package emailing is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEmailingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEmailingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EmailingClient) error
- func RegisterEmailingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEmailingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EmailingServer) error
- func RegisterEmailingServer(s *grpc.Server, srv EmailingServer)
- type Attachemnt
- func (*Attachemnt) Descriptor() ([]byte, []int)deprecated
- func (x *Attachemnt) GetCtype() string
- func (x *Attachemnt) GetData() []byte
- func (x *Attachemnt) GetFilename() string
- func (x *Attachemnt) GetFilenameOverride() string
- func (*Attachemnt) ProtoMessage()
- func (x *Attachemnt) ProtoReflect() protoreflect.Message
- func (x *Attachemnt) Reset()
- func (x *Attachemnt) String() string
- type Email
- func (*Email) Descriptor() ([]byte, []int)deprecated
- func (x *Email) GetAttachments() []*Attachemnt
- func (x *Email) GetBody() string
- func (x *Email) GetBodyContentType() string
- func (x *Email) GetDestinations() []string
- func (x *Email) GetFrom() string
- func (x *Email) GetSubject() string
- func (*Email) ProtoMessage()
- func (x *Email) ProtoReflect() protoreflect.Message
- func (x *Email) Reset()
- func (x *Email) String() string
- type EmailingClient
- type EmailingServer
- type UnimplementedEmailingServer
Constants ¶
This section is empty.
Variables ¶
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) GetAttachments ¶
func (x *Email) GetAttachments() []*Attachemnt
func (*Email) GetBodyContentType ¶
func (*Email) GetDestinations ¶
func (*Email) GetSubject ¶
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ProtoReflect ¶
func (x *Email) ProtoReflect() protoreflect.Message
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.