email

package
v0.0.0-...-00a9c49 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 11 Imported by: 0

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 EmailHandler

type EmailHandler interface {
	Send(context.Context, *RequestEmail, Email_SendStream) error
}

type EmailService

type EmailService interface {
	Send(ctx context.Context, in *RequestEmail, opts ...client.CallOption) (Email_SendService, error)
}

func NewEmailService

func NewEmailService(name string, c client.Client) EmailService

type Email_SendService

type Email_SendService interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*ResponseEmail, error)
}

type Email_SendStream

type Email_SendStream interface {
	Context() context.Context
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*ResponseEmail) error
}

type RequestEmail

type RequestEmail struct {
	Token      string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Subject    string   `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
	Recipients []string `protobuf:"bytes,3,rep,name=recipients,proto3" json:"recipients,omitempty"`
	Type       uint32   `protobuf:"varint,4,opt,name=type,proto3" json:"type,omitempty"` // 1: text, 2: html
	Content    []byte   `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*RequestEmail) Descriptor deprecated

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

Deprecated: Use RequestEmail.ProtoReflect.Descriptor instead.

func (*RequestEmail) GetContent

func (x *RequestEmail) GetContent() []byte

func (*RequestEmail) GetRecipients

func (x *RequestEmail) GetRecipients() []string

func (*RequestEmail) GetSubject

func (x *RequestEmail) GetSubject() string

func (*RequestEmail) GetToken

func (x *RequestEmail) GetToken() string

func (*RequestEmail) GetType

func (x *RequestEmail) GetType() uint32

func (*RequestEmail) ProtoMessage

func (*RequestEmail) ProtoMessage()

func (*RequestEmail) ProtoReflect

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

func (*RequestEmail) Reset

func (x *RequestEmail) Reset()

func (*RequestEmail) String

func (x *RequestEmail) String() string

type ResponseEmail

type ResponseEmail struct {
	Code    uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data    []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ResponseEmail) Descriptor deprecated

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

Deprecated: Use ResponseEmail.ProtoReflect.Descriptor instead.

func (*ResponseEmail) GetCode

func (x *ResponseEmail) GetCode() uint32

func (*ResponseEmail) GetData

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

func (*ResponseEmail) GetMessage

func (x *ResponseEmail) GetMessage() string

func (*ResponseEmail) ProtoMessage

func (*ResponseEmail) ProtoMessage()

func (*ResponseEmail) ProtoReflect

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

func (*ResponseEmail) Reset

func (x *ResponseEmail) Reset()

func (*ResponseEmail) String

func (x *ResponseEmail) String() string

Jump to

Keyboard shortcuts

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