|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc (unknown)
- // source: idl/pbpod/pod.proto
-
- package pbpod
-
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
-
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
-
- // PodServiceClient is the client API for PodService 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 PodServiceClient interface {
- // 创建Pod
- CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error)
- // 查询Pod明细
- ListPodDetail(ctx context.Context, in *ListPodDetailReq, opts ...grpc.CallOption) (*ListPodDetailResp, error)
- // 查询Pod全量 - 根据云类型
- ListPod(ctx context.Context, in *ListPodReq, opts ...grpc.CallOption) (*ListPodResp, error)
- // 查询所有云的Pod
- ListPodAll(ctx context.Context, in *ListPodAllReq, opts ...grpc.CallOption) (*ListPodResp, error)
- }
-
- type podServiceClient struct {
- cc grpc.ClientConnInterface
- }
-
- func NewPodServiceClient(cc grpc.ClientConnInterface) PodServiceClient {
- return &podServiceClient{cc}
- }
-
- func (c *podServiceClient) CreatePod(ctx context.Context, in *CreatePodReq, opts ...grpc.CallOption) (*CreatePodResp, error) {
- out := new(CreatePodResp)
- err := c.cc.Invoke(ctx, "/pbpod.PodService/CreatePod", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *podServiceClient) ListPodDetail(ctx context.Context, in *ListPodDetailReq, opts ...grpc.CallOption) (*ListPodDetailResp, error) {
- out := new(ListPodDetailResp)
- err := c.cc.Invoke(ctx, "/pbpod.PodService/ListPodDetail", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *podServiceClient) ListPod(ctx context.Context, in *ListPodReq, opts ...grpc.CallOption) (*ListPodResp, error) {
- out := new(ListPodResp)
- err := c.cc.Invoke(ctx, "/pbpod.PodService/ListPod", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- func (c *podServiceClient) ListPodAll(ctx context.Context, in *ListPodAllReq, opts ...grpc.CallOption) (*ListPodResp, error) {
- out := new(ListPodResp)
- err := c.cc.Invoke(ctx, "/pbpod.PodService/ListPodAll", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
-
- // PodServiceServer is the server API for PodService service.
- // All implementations must embed UnimplementedPodServiceServer
- // for forward compatibility
- type PodServiceServer interface {
- // 创建Pod
- CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error)
- // 查询Pod明细
- ListPodDetail(context.Context, *ListPodDetailReq) (*ListPodDetailResp, error)
- // 查询Pod全量 - 根据云类型
- ListPod(context.Context, *ListPodReq) (*ListPodResp, error)
- // 查询所有云的Pod
- ListPodAll(context.Context, *ListPodAllReq) (*ListPodResp, error)
- mustEmbedUnimplementedPodServiceServer()
- }
-
- // UnimplementedPodServiceServer must be embedded to have forward compatible implementations.
- type UnimplementedPodServiceServer struct {
- }
-
- func (UnimplementedPodServiceServer) CreatePod(context.Context, *CreatePodReq) (*CreatePodResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreatePod not implemented")
- }
- func (UnimplementedPodServiceServer) ListPodDetail(context.Context, *ListPodDetailReq) (*ListPodDetailResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListPodDetail not implemented")
- }
- func (UnimplementedPodServiceServer) ListPod(context.Context, *ListPodReq) (*ListPodResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListPod not implemented")
- }
- func (UnimplementedPodServiceServer) ListPodAll(context.Context, *ListPodAllReq) (*ListPodResp, error) {
- return nil, status.Errorf(codes.Unimplemented, "method ListPodAll not implemented")
- }
- func (UnimplementedPodServiceServer) mustEmbedUnimplementedPodServiceServer() {}
-
- // UnsafePodServiceServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to PodServiceServer will
- // result in compilation errors.
- type UnsafePodServiceServer interface {
- mustEmbedUnimplementedPodServiceServer()
- }
-
- func RegisterPodServiceServer(s grpc.ServiceRegistrar, srv PodServiceServer) {
- s.RegisterService(&PodService_ServiceDesc, srv)
- }
-
- func _PodService_CreatePod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CreatePodReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(PodServiceServer).CreatePod(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pbpod.PodService/CreatePod",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(PodServiceServer).CreatePod(ctx, req.(*CreatePodReq))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _PodService_ListPodDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListPodDetailReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(PodServiceServer).ListPodDetail(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pbpod.PodService/ListPodDetail",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(PodServiceServer).ListPodDetail(ctx, req.(*ListPodDetailReq))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _PodService_ListPod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListPodReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(PodServiceServer).ListPod(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pbpod.PodService/ListPod",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(PodServiceServer).ListPod(ctx, req.(*ListPodReq))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- func _PodService_ListPodAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ListPodAllReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(PodServiceServer).ListPodAll(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pbpod.PodService/ListPodAll",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(PodServiceServer).ListPodAll(ctx, req.(*ListPodAllReq))
- }
- return interceptor(ctx, in, info, handler)
- }
-
- // PodService_ServiceDesc is the grpc.ServiceDesc for PodService service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var PodService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "pbpod.PodService",
- HandlerType: (*PodServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "CreatePod",
- Handler: _PodService_CreatePod_Handler,
- },
- {
- MethodName: "ListPodDetail",
- Handler: _PodService_ListPodDetail_Handler,
- },
- {
- MethodName: "ListPod",
- Handler: _PodService_ListPod_Handler,
- },
- {
- MethodName: "ListPodAll",
- Handler: _PodService_ListPodAll_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "idl/pbpod/pod.proto",
- }
|