pkg

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmailService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pkg.email.EmailService",
	HandlerType: (*EmailServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SendEmail",
			Handler:       _EmailService_SendEmail_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "email.proto",
}

EmailService_ServiceDesc is the grpc.ServiceDesc for EmailService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_email_proto protoreflect.FileDescriptor

Functions

func RegisterEmailServiceServer

func RegisterEmailServiceServer(s grpc.ServiceRegistrar, srv EmailServiceServer)

Types

type Attachment

type Attachment struct {
	Filename    string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	Data        []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// contains filtered or unexported fields
}

func (*Attachment) Descriptor deprecated

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

Deprecated: Use Attachment.ProtoReflect.Descriptor instead.

func (*Attachment) GetContentType

func (x *Attachment) GetContentType() string

func (*Attachment) GetData

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

func (*Attachment) GetFilename

func (x *Attachment) GetFilename() string

func (*Attachment) ProtoMessage

func (*Attachment) ProtoMessage()

func (*Attachment) ProtoReflect

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

func (*Attachment) Reset

func (x *Attachment) Reset()

func (*Attachment) String

func (x *Attachment) String() string

type EmailInfo

type EmailInfo struct {
	FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
	ToAddress   string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	Subject     string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
	PlainText   string `protobuf:"bytes,4,opt,name=plain_text,json=plainText,proto3" json:"plain_text,omitempty"`
	Html        string `protobuf:"bytes,5,opt,name=html,proto3" json:"html,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailInfo) Descriptor deprecated

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

Deprecated: Use EmailInfo.ProtoReflect.Descriptor instead.

func (*EmailInfo) GetFromAddress

func (x *EmailInfo) GetFromAddress() string

func (*EmailInfo) GetHtml

func (x *EmailInfo) GetHtml() string

func (*EmailInfo) GetPlainText

func (x *EmailInfo) GetPlainText() string

func (*EmailInfo) GetSubject

func (x *EmailInfo) GetSubject() string

func (*EmailInfo) GetToAddress

func (x *EmailInfo) GetToAddress() string

func (*EmailInfo) ProtoMessage

func (*EmailInfo) ProtoMessage()

func (*EmailInfo) ProtoReflect

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

func (*EmailInfo) Reset

func (x *EmailInfo) Reset()

func (*EmailInfo) String

func (x *EmailInfo) String() string

type EmailRequest

type EmailRequest struct {

	// Types that are assignable to Payload:
	//
	//	*EmailRequest_EmailInfo
	//	*EmailRequest_Attachment
	Payload isEmailRequest_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*EmailRequest) Descriptor deprecated

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

Deprecated: Use EmailRequest.ProtoReflect.Descriptor instead.

func (*EmailRequest) GetAttachment

func (x *EmailRequest) GetAttachment() *Attachment

func (*EmailRequest) GetEmailInfo

func (x *EmailRequest) GetEmailInfo() *EmailInfo

func (*EmailRequest) GetPayload

func (m *EmailRequest) GetPayload() isEmailRequest_Payload

func (*EmailRequest) ProtoMessage

func (*EmailRequest) ProtoMessage()

func (*EmailRequest) ProtoReflect

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

func (*EmailRequest) Reset

func (x *EmailRequest) Reset()

func (*EmailRequest) String

func (x *EmailRequest) String() string

type EmailRequest_Attachment

type EmailRequest_Attachment struct {
	Attachment *Attachment `protobuf:"bytes,2,opt,name=attachment,proto3,oneof"`
}

type EmailRequest_EmailInfo

type EmailRequest_EmailInfo struct {
	EmailInfo *EmailInfo `protobuf:"bytes,1,opt,name=email_info,json=emailInfo,proto3,oneof"`
}

type EmailResponse

type EmailResponse struct {
	Success bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailResponse) Descriptor deprecated

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

Deprecated: Use EmailResponse.ProtoReflect.Descriptor instead.

func (*EmailResponse) GetMessage

func (x *EmailResponse) GetMessage() string

func (*EmailResponse) GetSuccess

func (x *EmailResponse) GetSuccess() bool

func (*EmailResponse) ProtoMessage

func (*EmailResponse) ProtoMessage()

func (*EmailResponse) ProtoReflect

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

func (*EmailResponse) Reset

func (x *EmailResponse) Reset()

func (*EmailResponse) String

func (x *EmailResponse) String() string

type EmailServiceClient

type EmailServiceClient interface {
	SendEmail(ctx context.Context, opts ...grpc.CallOption) (EmailService_SendEmailClient, error)
}

EmailServiceClient is the client API for EmailService 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.

type EmailServiceServer

type EmailServiceServer interface {
	SendEmail(EmailService_SendEmailServer) error
	// contains filtered or unexported methods
}

EmailServiceServer is the server API for EmailService service. All implementations must embed UnimplementedEmailServiceServer for forward compatibility

type EmailService_SendEmailClient

type EmailService_SendEmailClient interface {
	Send(*EmailRequest) error
	CloseAndRecv() (*EmailResponse, error)
	grpc.ClientStream
}

type EmailService_SendEmailServer

type EmailService_SendEmailServer interface {
	SendAndClose(*EmailResponse) error
	Recv() (*EmailRequest, error)
	grpc.ServerStream
}

type UnimplementedEmailServiceServer

type UnimplementedEmailServiceServer struct {
}

UnimplementedEmailServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEmailServiceServer) SendEmail

type UnsafeEmailServiceServer

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

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

Jump to

Keyboard shortcuts

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