Documentation ¶
Index ¶
- Variables
- func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer)
- type Contact
- type EmailClient
- type EmailServer
- type Mail
- func (*Mail) Descriptor() ([]byte, []int)deprecated
- func (x *Mail) GetBcc() []*Contact
- func (x *Mail) GetBody() string
- func (x *Mail) GetCc() []*Contact
- func (x *Mail) GetContentType() Mail_ContentType
- func (x *Mail) GetSubject() string
- func (x *Mail) GetTo() []*Contact
- func (*Mail) ProtoMessage()
- func (x *Mail) ProtoReflect() protoreflect.Message
- func (x *Mail) Reset()
- func (x *Mail) String() string
- type Mail_ContentType
- func (Mail_ContentType) Descriptor() protoreflect.EnumDescriptor
- func (x Mail_ContentType) Enum() *Mail_ContentType
- func (Mail_ContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Mail_ContentType) Number() protoreflect.EnumNumber
- func (x Mail_ContentType) String() string
- func (Mail_ContentType) Type() protoreflect.EnumType
- type UnimplementedEmailServer
- type UnsafeEmailServer
Constants ¶
This section is empty.
Variables ¶
var ( Mail_ContentType_name = map[int32]string{ 0: "TEXT_HTML", 1: "TEXT_PLAIN", } Mail_ContentType_value = map[string]int32{ "TEXT_HTML": 0, "TEXT_PLAIN": 1, } )
Enum value maps for Mail_ContentType.
var Email_ServiceDesc = grpc.ServiceDesc{ ServiceName: "email.Email", HandlerType: (*EmailServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Send", Handler: _Email_Send_Handler, }, { MethodName: "Ping", Handler: _Email_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "email.proto", }
Email_ServiceDesc is the grpc.ServiceDesc for Email service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_email_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEmailServer ¶
func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer)
Types ¶
type Contact ¶
type Contact struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*Contact) Descriptor
deprecated
func (*Contact) GetAddress ¶
func (*Contact) ProtoMessage ¶
func (*Contact) ProtoMessage()
func (*Contact) ProtoReflect ¶
func (x *Contact) ProtoReflect() protoreflect.Message
type EmailClient ¶
type EmailClient interface { Send(ctx context.Context, in *Mail, opts ...grpc.CallOption) (*emptypb.Empty, error) Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) }
EmailClient is the client API for Email 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 NewEmailClient ¶
func NewEmailClient(cc grpc.ClientConnInterface) EmailClient
type EmailServer ¶
type EmailServer interface { Send(context.Context, *Mail) (*emptypb.Empty, error) Ping(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) // contains filtered or unexported methods }
EmailServer is the server API for Email service. All implementations must embed UnimplementedEmailServer for forward compatibility
type Mail ¶
type Mail struct { To []*Contact `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"` Cc []*Contact `protobuf:"bytes,2,rep,name=cc,proto3" json:"cc,omitempty"` Bcc []*Contact `protobuf:"bytes,3,rep,name=bcc,proto3" json:"bcc,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"` ContentType Mail_ContentType `protobuf:"varint,6,opt,name=content_type,json=contentType,proto3,enum=email.Mail_ContentType" json:"content_type,omitempty"` // contains filtered or unexported fields }
func (*Mail) Descriptor
deprecated
func (*Mail) GetContentType ¶
func (x *Mail) GetContentType() Mail_ContentType
func (*Mail) GetSubject ¶
func (*Mail) ProtoMessage ¶
func (*Mail) ProtoMessage()
func (*Mail) ProtoReflect ¶
func (x *Mail) ProtoReflect() protoreflect.Message
type Mail_ContentType ¶
type Mail_ContentType int32
const ( Mail_TEXT_HTML Mail_ContentType = 0 Mail_TEXT_PLAIN Mail_ContentType = 1 )
func (Mail_ContentType) Descriptor ¶
func (Mail_ContentType) Descriptor() protoreflect.EnumDescriptor
func (Mail_ContentType) Enum ¶
func (x Mail_ContentType) Enum() *Mail_ContentType
func (Mail_ContentType) EnumDescriptor
deprecated
func (Mail_ContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Mail_ContentType.Descriptor instead.
func (Mail_ContentType) Number ¶
func (x Mail_ContentType) Number() protoreflect.EnumNumber
func (Mail_ContentType) String ¶
func (x Mail_ContentType) String() string
func (Mail_ContentType) Type ¶
func (Mail_ContentType) Type() protoreflect.EnumType
type UnimplementedEmailServer ¶
type UnimplementedEmailServer struct { }
UnimplementedEmailServer must be embedded to have forward compatible implementations.
func (UnimplementedEmailServer) Ping ¶
func (UnimplementedEmailServer) Ping(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
type UnsafeEmailServer ¶
type UnsafeEmailServer interface {
// contains filtered or unexported methods
}
UnsafeEmailServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EmailServer will result in compilation errors.