You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

553 lines
22 KiB
Go

// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v3.21.2
// source: api/approval/approval.proto
package approval
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
// ApprovalClient is the client API for Approval 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 ApprovalClient interface {
2 years ago
Create(ctx context.Context, in *CreateRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment)
Detail(ctx context.Context, in *DetailRequest, opts ...grpc_go.CallOption) (*CreateRequest, common.ErrorWithAttachment)
Update(ctx context.Context, in *CreateRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment)
Remove(ctx context.Context, in *DetailRequest, opts ...grpc_go.CallOption) (*RemoveResponse, common.ErrorWithAttachment)
List(ctx context.Context, in *ListRequest, opts ...grpc_go.CallOption) (*ListResponse, common.ErrorWithAttachment)
Information(ctx context.Context, in *InformationRequest, opts ...grpc_go.CallOption) (*InformationResponse, common.ErrorWithAttachment)
Viewed(ctx context.Context, in *ViewedRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment)
SetStatus(ctx context.Context, in *StatusRequest, opts ...grpc_go.CallOption) (*StatusResponse, common.ErrorWithAttachment)
DetailSetting(ctx context.Context, in *DetailSettingRequest, opts ...grpc_go.CallOption) (*SettingRequest, common.ErrorWithAttachment)
UpdateSetting(ctx context.Context, in *SettingRequest, opts ...grpc_go.CallOption) (*SettingResponse, common.ErrorWithAttachment)
}
type approvalClient struct {
cc *triple.TripleConn
}
type ApprovalClientImpl struct {
2 years ago
Create func(ctx context.Context, in *CreateRequest) (*ApprovalResponse, error)
Detail func(ctx context.Context, in *DetailRequest) (*CreateRequest, error)
Update func(ctx context.Context, in *CreateRequest) (*ApprovalResponse, error)
Remove func(ctx context.Context, in *DetailRequest) (*RemoveResponse, error)
List func(ctx context.Context, in *ListRequest) (*ListResponse, error)
Information func(ctx context.Context, in *InformationRequest) (*InformationResponse, error)
Viewed func(ctx context.Context, in *ViewedRequest) (*ApprovalResponse, error)
SetStatus func(ctx context.Context, in *StatusRequest) (*StatusResponse, error)
DetailSetting func(ctx context.Context, in *DetailSettingRequest) (*SettingRequest, error)
UpdateSetting func(ctx context.Context, in *SettingRequest) (*SettingResponse, error)
}
func (c *ApprovalClientImpl) GetDubboStub(cc *triple.TripleConn) ApprovalClient {
return NewApprovalClient(cc)
}
func (c *ApprovalClientImpl) XXX_InterfaceName() string {
return "approval.Approval"
}
func NewApprovalClient(cc *triple.TripleConn) ApprovalClient {
return &approvalClient{cc}
}
2 years ago
func (c *approvalClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) {
out := new(ApprovalResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
}
2 years ago
func (c *approvalClient) Detail(ctx context.Context, in *DetailRequest, opts ...grpc_go.CallOption) (*CreateRequest, common.ErrorWithAttachment) {
out := new(CreateRequest)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Detail", in, out)
}
2 years ago
func (c *approvalClient) Update(ctx context.Context, in *CreateRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) {
out := new(ApprovalResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Update", in, out)
}
2 years ago
func (c *approvalClient) Remove(ctx context.Context, in *DetailRequest, opts ...grpc_go.CallOption) (*RemoveResponse, common.ErrorWithAttachment) {
out := new(RemoveResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Remove", in, out)
}
func (c *approvalClient) List(ctx context.Context, in *ListRequest, opts ...grpc_go.CallOption) (*ListResponse, common.ErrorWithAttachment) {
out := new(ListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
}
func (c *approvalClient) Information(ctx context.Context, in *InformationRequest, opts ...grpc_go.CallOption) (*InformationResponse, common.ErrorWithAttachment) {
out := new(InformationResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Information", in, out)
}
func (c *approvalClient) Viewed(ctx context.Context, in *ViewedRequest, opts ...grpc_go.CallOption) (*ApprovalResponse, common.ErrorWithAttachment) {
out := new(ApprovalResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Viewed", in, out)
}
func (c *approvalClient) SetStatus(ctx context.Context, in *StatusRequest, opts ...grpc_go.CallOption) (*StatusResponse, common.ErrorWithAttachment) {
out := new(StatusResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SetStatus", in, out)
}
func (c *approvalClient) DetailSetting(ctx context.Context, in *DetailSettingRequest, opts ...grpc_go.CallOption) (*SettingRequest, common.ErrorWithAttachment) {
out := new(SettingRequest)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DetailSetting", in, out)
}
func (c *approvalClient) UpdateSetting(ctx context.Context, in *SettingRequest, opts ...grpc_go.CallOption) (*SettingResponse, common.ErrorWithAttachment) {
out := new(SettingResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSetting", in, out)
}
// ApprovalServer is the server API for Approval service.
// All implementations must embed UnimplementedApprovalServer
// for forward compatibility
type ApprovalServer interface {
2 years ago
Create(context.Context, *CreateRequest) (*ApprovalResponse, error)
Detail(context.Context, *DetailRequest) (*CreateRequest, error)
Update(context.Context, *CreateRequest) (*ApprovalResponse, error)
Remove(context.Context, *DetailRequest) (*RemoveResponse, error)
List(context.Context, *ListRequest) (*ListResponse, error)
Information(context.Context, *InformationRequest) (*InformationResponse, error)
Viewed(context.Context, *ViewedRequest) (*ApprovalResponse, error)
SetStatus(context.Context, *StatusRequest) (*StatusResponse, error)
DetailSetting(context.Context, *DetailSettingRequest) (*SettingRequest, error)
UpdateSetting(context.Context, *SettingRequest) (*SettingResponse, error)
mustEmbedUnimplementedApprovalServer()
}
// UnimplementedApprovalServer must be embedded to have forward compatible implementations.
type UnimplementedApprovalServer struct {
proxyImpl protocol.Invoker
}
2 years ago
func (UnimplementedApprovalServer) Create(context.Context, *CreateRequest) (*ApprovalResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
2 years ago
func (UnimplementedApprovalServer) Detail(context.Context, *DetailRequest) (*CreateRequest, error) {
return nil, status.Errorf(codes.Unimplemented, "method Detail not implemented")
}
2 years ago
func (UnimplementedApprovalServer) Update(context.Context, *CreateRequest) (*ApprovalResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
2 years ago
func (UnimplementedApprovalServer) Remove(context.Context, *DetailRequest) (*RemoveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Remove not implemented")
}
func (UnimplementedApprovalServer) List(context.Context, *ListRequest) (*ListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedApprovalServer) Information(context.Context, *InformationRequest) (*InformationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Information not implemented")
}
func (UnimplementedApprovalServer) Viewed(context.Context, *ViewedRequest) (*ApprovalResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Viewed not implemented")
}
func (UnimplementedApprovalServer) SetStatus(context.Context, *StatusRequest) (*StatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetStatus not implemented")
}
func (UnimplementedApprovalServer) DetailSetting(context.Context, *DetailSettingRequest) (*SettingRequest, error) {
return nil, status.Errorf(codes.Unimplemented, "method DetailSetting not implemented")
}
func (UnimplementedApprovalServer) UpdateSetting(context.Context, *SettingRequest) (*SettingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSetting not implemented")
}
func (s *UnimplementedApprovalServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedApprovalServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedApprovalServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Approval_ServiceDesc
}
func (s *UnimplementedApprovalServer) XXX_InterfaceName() string {
return "approval.Approval"
}
func (UnimplementedApprovalServer) mustEmbedUnimplementedApprovalServer() {}
// UnsafeApprovalServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ApprovalServer will
// result in compilation errors.
type UnsafeApprovalServer interface {
mustEmbedUnimplementedApprovalServer()
}
func RegisterApprovalServer(s grpc_go.ServiceRegistrar, srv ApprovalServer) {
s.RegisterService(&Approval_ServiceDesc, srv)
}
func _Approval_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
2 years ago
in := new(CreateRequest)
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("Create", 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 _Approval_Detail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
2 years ago
in := new(DetailRequest)
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("Detail", 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 _Approval_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
2 years ago
in := new(CreateRequest)
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("Update", 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 _Approval_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
2 years ago
in := new(DetailRequest)
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("Remove", 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 _Approval_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRequest)
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("List", 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 _Approval_Information_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(InformationRequest)
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("Information", 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 _Approval_Viewed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ViewedRequest)
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("Viewed", 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 _Approval_SetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(StatusRequest)
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("SetStatus", 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 _Approval_DetailSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DetailSettingRequest)
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("DetailSetting", 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 _Approval_UpdateSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SettingRequest)
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("UpdateSetting", 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)
}
// Approval_ServiceDesc is the grpc_go.ServiceDesc for Approval service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Approval_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "approval.Approval",
HandlerType: (*ApprovalServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "Create",
Handler: _Approval_Create_Handler,
},
{
MethodName: "Detail",
Handler: _Approval_Detail_Handler,
},
{
MethodName: "Update",
Handler: _Approval_Update_Handler,
},
{
MethodName: "Remove",
Handler: _Approval_Remove_Handler,
},
{
MethodName: "List",
Handler: _Approval_List_Handler,
},
{
MethodName: "Information",
Handler: _Approval_Information_Handler,
},
{
MethodName: "Viewed",
Handler: _Approval_Viewed_Handler,
},
{
MethodName: "SetStatus",
Handler: _Approval_SetStatus_Handler,
},
{
MethodName: "DetailSetting",
Handler: _Approval_DetailSetting_Handler,
},
{
MethodName: "UpdateSetting",
Handler: _Approval_UpdateSetting_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/approval/approval.proto",
}