195 lines
7.6 KiB
Go
195 lines
7.6 KiB
Go
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-triple v1.0.5
|
|
// - protoc v5.26.0
|
|
// source: api/emailAlerts/emailAlerts.proto
|
|
|
|
package emailAlerts
|
|
|
|
import (
|
|
context "context"
|
|
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
|
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
|
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
|
grpc_go "github.com/dubbogo/grpc-go"
|
|
codes "github.com/dubbogo/grpc-go/codes"
|
|
metadata "github.com/dubbogo/grpc-go/metadata"
|
|
status "github.com/dubbogo/grpc-go/status"
|
|
common "github.com/dubbogo/triple/pkg/common"
|
|
constant "github.com/dubbogo/triple/pkg/common/constant"
|
|
triple "github.com/dubbogo/triple/pkg/triple"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc_go.SupportPackageIsVersion7
|
|
|
|
// EmailAlertsClient is the client API for EmailAlerts 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 EmailAlertsClient interface {
|
|
EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment)
|
|
// ========================= EmailInformatio ==============================
|
|
GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment)
|
|
}
|
|
|
|
type emailAlertsClient struct {
|
|
cc *triple.TripleConn
|
|
}
|
|
|
|
type EmailAlertsClientImpl struct {
|
|
EmailAlertsSubmit func(ctx context.Context, in *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
|
|
GetEmailInformationList func(ctx context.Context, in *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
|
|
}
|
|
|
|
func (c *EmailAlertsClientImpl) GetDubboStub(cc *triple.TripleConn) EmailAlertsClient {
|
|
return NewEmailAlertsClient(cc)
|
|
}
|
|
|
|
func (c *EmailAlertsClientImpl) XXX_InterfaceName() string {
|
|
return "emailAlerts.EmailAlerts"
|
|
}
|
|
|
|
func NewEmailAlertsClient(cc *triple.TripleConn) EmailAlertsClient {
|
|
return &emailAlertsClient{cc}
|
|
}
|
|
|
|
func (c *emailAlertsClient) EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment) {
|
|
out := new(EmailAlertsSubmitResp)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EmailAlertsSubmit", in, out)
|
|
}
|
|
|
|
func (c *emailAlertsClient) GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment) {
|
|
out := new(GetEmailInformationListResp)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetEmailInformationList", in, out)
|
|
}
|
|
|
|
// EmailAlertsServer is the server API for EmailAlerts service.
|
|
// All implementations must embed UnimplementedEmailAlertsServer
|
|
// for forward compatibility
|
|
type EmailAlertsServer interface {
|
|
EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
|
|
// ========================= EmailInformatio ==============================
|
|
GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
|
|
mustEmbedUnimplementedEmailAlertsServer()
|
|
}
|
|
|
|
// UnimplementedEmailAlertsServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedEmailAlertsServer struct {
|
|
proxyImpl protocol.Invoker
|
|
}
|
|
|
|
func (UnimplementedEmailAlertsServer) EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method EmailAlertsSubmit not implemented")
|
|
}
|
|
func (UnimplementedEmailAlertsServer) GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetEmailInformationList not implemented")
|
|
}
|
|
func (s *UnimplementedEmailAlertsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
|
s.proxyImpl = impl
|
|
}
|
|
|
|
func (s *UnimplementedEmailAlertsServer) XXX_GetProxyImpl() protocol.Invoker {
|
|
return s.proxyImpl
|
|
}
|
|
|
|
func (s *UnimplementedEmailAlertsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
|
return &EmailAlerts_ServiceDesc
|
|
}
|
|
func (s *UnimplementedEmailAlertsServer) XXX_InterfaceName() string {
|
|
return "emailAlerts.EmailAlerts"
|
|
}
|
|
|
|
func (UnimplementedEmailAlertsServer) mustEmbedUnimplementedEmailAlertsServer() {}
|
|
|
|
// UnsafeEmailAlertsServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to EmailAlertsServer will
|
|
// result in compilation errors.
|
|
type UnsafeEmailAlertsServer interface {
|
|
mustEmbedUnimplementedEmailAlertsServer()
|
|
}
|
|
|
|
func RegisterEmailAlertsServer(s grpc_go.ServiceRegistrar, srv EmailAlertsServer) {
|
|
s.RegisterService(&EmailAlerts_ServiceDesc, srv)
|
|
}
|
|
|
|
func _EmailAlerts_EmailAlertsSubmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EmailAlertsSubmitReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
base := srv.(dubbo3.Dubbo3GrpcService)
|
|
args := []interface{}{}
|
|
args = append(args, in)
|
|
md, _ := metadata.FromIncomingContext(ctx)
|
|
invAttachment := make(map[string]interface{}, len(md))
|
|
for k, v := range md {
|
|
invAttachment[k] = v
|
|
}
|
|
invo := invocation.NewRPCInvocation("EmailAlertsSubmit", args, invAttachment)
|
|
if interceptor == nil {
|
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
|
return result, result.Error()
|
|
}
|
|
info := &grpc_go.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
|
return result, result.Error()
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _EmailAlerts_GetEmailInformationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetEmailInformationListReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
base := srv.(dubbo3.Dubbo3GrpcService)
|
|
args := []interface{}{}
|
|
args = append(args, in)
|
|
md, _ := metadata.FromIncomingContext(ctx)
|
|
invAttachment := make(map[string]interface{}, len(md))
|
|
for k, v := range md {
|
|
invAttachment[k] = v
|
|
}
|
|
invo := invocation.NewRPCInvocation("GetEmailInformationList", args, invAttachment)
|
|
if interceptor == nil {
|
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
|
return result, result.Error()
|
|
}
|
|
info := &grpc_go.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
|
return result, result.Error()
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// EmailAlerts_ServiceDesc is the grpc_go.ServiceDesc for EmailAlerts service.
|
|
// It's only intended for direct use with grpc_go.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var EmailAlerts_ServiceDesc = grpc_go.ServiceDesc{
|
|
ServiceName: "emailAlerts.EmailAlerts",
|
|
HandlerType: (*EmailAlertsServer)(nil),
|
|
Methods: []grpc_go.MethodDesc{
|
|
{
|
|
MethodName: "EmailAlertsSubmit",
|
|
Handler: _EmailAlerts_EmailAlertsSubmit_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetEmailInformationList",
|
|
Handler: _EmailAlerts_GetEmailInformationList_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc_go.StreamDesc{},
|
|
Metadata: "api/emailAlerts/emailAlerts.proto",
|
|
}
|