github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/protos/tools/tools_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.3.0 4 // - protoc v4.25.3 5 // source: tools/tools.proto 6 7 package tools 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 emptypb "google.golang.org/protobuf/types/known/emptypb" 15 wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" 16 ) 17 18 // This is a compile-time assertion to ensure that this generated file 19 // is compatible with the grpc package it is being compiled against. 20 // Requires gRPC-Go v1.32.0 or later. 21 const _ = grpc.SupportPackageIsVersion7 22 23 const ( 24 Tools_SaveRemoteBypassFile_FullMethodName = "/yuhaiin.tools.tools/save_remote_bypass_file" 25 Tools_GetInterface_FullMethodName = "/yuhaiin.tools.tools/get_interface" 26 ) 27 28 // ToolsClient is the client API for Tools service. 29 // 30 // 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. 31 type ToolsClient interface { 32 // req: url 33 SaveRemoteBypassFile(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) 34 GetInterface(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Interfaces, error) 35 } 36 37 type toolsClient struct { 38 cc grpc.ClientConnInterface 39 } 40 41 func NewToolsClient(cc grpc.ClientConnInterface) ToolsClient { 42 return &toolsClient{cc} 43 } 44 45 func (c *toolsClient) SaveRemoteBypassFile(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { 46 out := new(emptypb.Empty) 47 err := c.cc.Invoke(ctx, Tools_SaveRemoteBypassFile_FullMethodName, in, out, opts...) 48 if err != nil { 49 return nil, err 50 } 51 return out, nil 52 } 53 54 func (c *toolsClient) GetInterface(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Interfaces, error) { 55 out := new(Interfaces) 56 err := c.cc.Invoke(ctx, Tools_GetInterface_FullMethodName, in, out, opts...) 57 if err != nil { 58 return nil, err 59 } 60 return out, nil 61 } 62 63 // ToolsServer is the server API for Tools service. 64 // All implementations must embed UnimplementedToolsServer 65 // for forward compatibility 66 type ToolsServer interface { 67 // req: url 68 SaveRemoteBypassFile(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) 69 GetInterface(context.Context, *emptypb.Empty) (*Interfaces, error) 70 mustEmbedUnimplementedToolsServer() 71 } 72 73 // UnimplementedToolsServer must be embedded to have forward compatible implementations. 74 type UnimplementedToolsServer struct { 75 } 76 77 func (UnimplementedToolsServer) SaveRemoteBypassFile(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) { 78 return nil, status.Errorf(codes.Unimplemented, "method SaveRemoteBypassFile not implemented") 79 } 80 func (UnimplementedToolsServer) GetInterface(context.Context, *emptypb.Empty) (*Interfaces, error) { 81 return nil, status.Errorf(codes.Unimplemented, "method GetInterface not implemented") 82 } 83 func (UnimplementedToolsServer) mustEmbedUnimplementedToolsServer() {} 84 85 // UnsafeToolsServer may be embedded to opt out of forward compatibility for this service. 86 // Use of this interface is not recommended, as added methods to ToolsServer will 87 // result in compilation errors. 88 type UnsafeToolsServer interface { 89 mustEmbedUnimplementedToolsServer() 90 } 91 92 func RegisterToolsServer(s grpc.ServiceRegistrar, srv ToolsServer) { 93 s.RegisterService(&Tools_ServiceDesc, srv) 94 } 95 96 func _Tools_SaveRemoteBypassFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 97 in := new(wrapperspb.StringValue) 98 if err := dec(in); err != nil { 99 return nil, err 100 } 101 if interceptor == nil { 102 return srv.(ToolsServer).SaveRemoteBypassFile(ctx, in) 103 } 104 info := &grpc.UnaryServerInfo{ 105 Server: srv, 106 FullMethod: Tools_SaveRemoteBypassFile_FullMethodName, 107 } 108 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 109 return srv.(ToolsServer).SaveRemoteBypassFile(ctx, req.(*wrapperspb.StringValue)) 110 } 111 return interceptor(ctx, in, info, handler) 112 } 113 114 func _Tools_GetInterface_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 115 in := new(emptypb.Empty) 116 if err := dec(in); err != nil { 117 return nil, err 118 } 119 if interceptor == nil { 120 return srv.(ToolsServer).GetInterface(ctx, in) 121 } 122 info := &grpc.UnaryServerInfo{ 123 Server: srv, 124 FullMethod: Tools_GetInterface_FullMethodName, 125 } 126 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 127 return srv.(ToolsServer).GetInterface(ctx, req.(*emptypb.Empty)) 128 } 129 return interceptor(ctx, in, info, handler) 130 } 131 132 // Tools_ServiceDesc is the grpc.ServiceDesc for Tools service. 133 // It's only intended for direct use with grpc.RegisterService, 134 // and not to be introspected or modified (even as a copy) 135 var Tools_ServiceDesc = grpc.ServiceDesc{ 136 ServiceName: "yuhaiin.tools.tools", 137 HandlerType: (*ToolsServer)(nil), 138 Methods: []grpc.MethodDesc{ 139 { 140 MethodName: "save_remote_bypass_file", 141 Handler: _Tools_SaveRemoteBypassFile_Handler, 142 }, 143 { 144 MethodName: "get_interface", 145 Handler: _Tools_GetInterface_Handler, 146 }, 147 }, 148 Streams: []grpc.StreamDesc{}, 149 Metadata: "tools/tools.proto", 150 }