Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEmailHTTPServer(s *http.Server, srv EmailHTTPServer)
- func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer)
- type EmailClient
- type EmailHTTPClient
- type EmailHTTPClientImpl
- type EmailHTTPServer
- type EmailServer
- type Empty
- type SendEmailReq
- func (*SendEmailReq) Descriptor() ([]byte, []int)deprecated
- func (x *SendEmailReq) GetBody() string
- func (x *SendEmailReq) GetSubject() string
- func (x *SendEmailReq) GetTo() []string
- func (*SendEmailReq) ProtoMessage()
- func (x *SendEmailReq) ProtoReflect() protoreflect.Message
- func (x *SendEmailReq) Reset()
- func (x *SendEmailReq) String() string
- type UnimplementedEmailServer
- type UnsafeEmailServer
Constants ¶
const (
Email_SendEmail_FullMethodName = "/api.email.Email/SendEmail"
)
const OperationEmailSendEmail = "/api.email.Email/SendEmail"
Variables ¶
var Email_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.email.Email", HandlerType: (*EmailServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendEmail", Handler: _Email_SendEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "email/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_email_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEmailHTTPServer ¶
func RegisterEmailHTTPServer(s *http.Server, srv EmailHTTPServer)
func RegisterEmailServer ¶
func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer)
Types ¶
type EmailClient ¶
type EmailClient interface {
SendEmail(ctx context.Context, in *SendEmailReq, opts ...grpc.CallOption) (*Empty, 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 EmailHTTPClient ¶
type EmailHTTPClient interface {
SendEmail(ctx context.Context, req *SendEmailReq, opts ...http.CallOption) (rsp *Empty, err error)
}
func NewEmailHTTPClient ¶
func NewEmailHTTPClient(client *http.Client) EmailHTTPClient
type EmailHTTPClientImpl ¶
type EmailHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*EmailHTTPClientImpl) SendEmail ¶
func (c *EmailHTTPClientImpl) SendEmail(ctx context.Context, in *SendEmailReq, opts ...http.CallOption) (*Empty, error)
type EmailHTTPServer ¶
type EmailHTTPServer interface {
SendEmail(context.Context, *SendEmailReq) (*Empty, error)
}
type EmailServer ¶
type EmailServer interface { SendEmail(context.Context, *SendEmailReq) (*Empty, error) // contains filtered or unexported methods }
EmailServer is the server API for Email service. All implementations must embed UnimplementedEmailServer for forward compatibility.
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type SendEmailReq ¶
type SendEmailReq struct { To []string `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"` Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*SendEmailReq) Descriptor
deprecated
func (*SendEmailReq) Descriptor() ([]byte, []int)
Deprecated: Use SendEmailReq.ProtoReflect.Descriptor instead.
func (*SendEmailReq) GetBody ¶
func (x *SendEmailReq) GetBody() string
func (*SendEmailReq) GetSubject ¶
func (x *SendEmailReq) GetSubject() string
func (*SendEmailReq) GetTo ¶
func (x *SendEmailReq) GetTo() []string
func (*SendEmailReq) ProtoMessage ¶
func (*SendEmailReq) ProtoMessage()
func (*SendEmailReq) ProtoReflect ¶
func (x *SendEmailReq) ProtoReflect() protoreflect.Message
func (*SendEmailReq) Reset ¶
func (x *SendEmailReq) Reset()
func (*SendEmailReq) String ¶
func (x *SendEmailReq) String() string
type UnimplementedEmailServer ¶
type UnimplementedEmailServer struct{}
UnimplementedEmailServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedEmailServer) SendEmail ¶
func (UnimplementedEmailServer) SendEmail(context.Context, *SendEmailReq) (*Empty, 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.