github.com/infraboard/keyauth@v0.8.1/apps/application/service_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.2.0 4 // - protoc v3.19.1 5 // source: apps/application/pb/service.proto 6 7 package application 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 ) 15 16 // This is a compile-time assertion to ensure that this generated file 17 // is compatible with the grpc package it is being compiled against. 18 // Requires gRPC-Go v1.32.0 or later. 19 const _ = grpc.SupportPackageIsVersion7 20 21 // ServiceClient is the client API for Service service. 22 // 23 // 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. 24 type ServiceClient interface { 25 CreateApplication(ctx context.Context, in *CreateApplicatonRequest, opts ...grpc.CallOption) (*Application, error) 26 DescribeApplication(ctx context.Context, in *DescribeApplicationRequest, opts ...grpc.CallOption) (*Application, error) 27 QueryApplication(ctx context.Context, in *QueryApplicationRequest, opts ...grpc.CallOption) (*Set, error) 28 DeleteApplication(ctx context.Context, in *DeleteApplicationRequest, opts ...grpc.CallOption) (*Application, error) 29 } 30 31 type serviceClient struct { 32 cc grpc.ClientConnInterface 33 } 34 35 func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { 36 return &serviceClient{cc} 37 } 38 39 func (c *serviceClient) CreateApplication(ctx context.Context, in *CreateApplicatonRequest, opts ...grpc.CallOption) (*Application, error) { 40 out := new(Application) 41 err := c.cc.Invoke(ctx, "/infraboard.keyauth.application.Service/CreateApplication", in, out, opts...) 42 if err != nil { 43 return nil, err 44 } 45 return out, nil 46 } 47 48 func (c *serviceClient) DescribeApplication(ctx context.Context, in *DescribeApplicationRequest, opts ...grpc.CallOption) (*Application, error) { 49 out := new(Application) 50 err := c.cc.Invoke(ctx, "/infraboard.keyauth.application.Service/DescribeApplication", in, out, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return out, nil 55 } 56 57 func (c *serviceClient) QueryApplication(ctx context.Context, in *QueryApplicationRequest, opts ...grpc.CallOption) (*Set, error) { 58 out := new(Set) 59 err := c.cc.Invoke(ctx, "/infraboard.keyauth.application.Service/QueryApplication", in, out, opts...) 60 if err != nil { 61 return nil, err 62 } 63 return out, nil 64 } 65 66 func (c *serviceClient) DeleteApplication(ctx context.Context, in *DeleteApplicationRequest, opts ...grpc.CallOption) (*Application, error) { 67 out := new(Application) 68 err := c.cc.Invoke(ctx, "/infraboard.keyauth.application.Service/DeleteApplication", in, out, opts...) 69 if err != nil { 70 return nil, err 71 } 72 return out, nil 73 } 74 75 // ServiceServer is the server API for Service service. 76 // All implementations must embed UnimplementedServiceServer 77 // for forward compatibility 78 type ServiceServer interface { 79 CreateApplication(context.Context, *CreateApplicatonRequest) (*Application, error) 80 DescribeApplication(context.Context, *DescribeApplicationRequest) (*Application, error) 81 QueryApplication(context.Context, *QueryApplicationRequest) (*Set, error) 82 DeleteApplication(context.Context, *DeleteApplicationRequest) (*Application, error) 83 mustEmbedUnimplementedServiceServer() 84 } 85 86 // UnimplementedServiceServer must be embedded to have forward compatible implementations. 87 type UnimplementedServiceServer struct { 88 } 89 90 func (UnimplementedServiceServer) CreateApplication(context.Context, *CreateApplicatonRequest) (*Application, error) { 91 return nil, status.Errorf(codes.Unimplemented, "method CreateApplication not implemented") 92 } 93 func (UnimplementedServiceServer) DescribeApplication(context.Context, *DescribeApplicationRequest) (*Application, error) { 94 return nil, status.Errorf(codes.Unimplemented, "method DescribeApplication not implemented") 95 } 96 func (UnimplementedServiceServer) QueryApplication(context.Context, *QueryApplicationRequest) (*Set, error) { 97 return nil, status.Errorf(codes.Unimplemented, "method QueryApplication not implemented") 98 } 99 func (UnimplementedServiceServer) DeleteApplication(context.Context, *DeleteApplicationRequest) (*Application, error) { 100 return nil, status.Errorf(codes.Unimplemented, "method DeleteApplication not implemented") 101 } 102 func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} 103 104 // UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. 105 // Use of this interface is not recommended, as added methods to ServiceServer will 106 // result in compilation errors. 107 type UnsafeServiceServer interface { 108 mustEmbedUnimplementedServiceServer() 109 } 110 111 func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { 112 s.RegisterService(&Service_ServiceDesc, srv) 113 } 114 115 func _Service_CreateApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 116 in := new(CreateApplicatonRequest) 117 if err := dec(in); err != nil { 118 return nil, err 119 } 120 if interceptor == nil { 121 return srv.(ServiceServer).CreateApplication(ctx, in) 122 } 123 info := &grpc.UnaryServerInfo{ 124 Server: srv, 125 FullMethod: "/infraboard.keyauth.application.Service/CreateApplication", 126 } 127 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 128 return srv.(ServiceServer).CreateApplication(ctx, req.(*CreateApplicatonRequest)) 129 } 130 return interceptor(ctx, in, info, handler) 131 } 132 133 func _Service_DescribeApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 134 in := new(DescribeApplicationRequest) 135 if err := dec(in); err != nil { 136 return nil, err 137 } 138 if interceptor == nil { 139 return srv.(ServiceServer).DescribeApplication(ctx, in) 140 } 141 info := &grpc.UnaryServerInfo{ 142 Server: srv, 143 FullMethod: "/infraboard.keyauth.application.Service/DescribeApplication", 144 } 145 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 146 return srv.(ServiceServer).DescribeApplication(ctx, req.(*DescribeApplicationRequest)) 147 } 148 return interceptor(ctx, in, info, handler) 149 } 150 151 func _Service_QueryApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 152 in := new(QueryApplicationRequest) 153 if err := dec(in); err != nil { 154 return nil, err 155 } 156 if interceptor == nil { 157 return srv.(ServiceServer).QueryApplication(ctx, in) 158 } 159 info := &grpc.UnaryServerInfo{ 160 Server: srv, 161 FullMethod: "/infraboard.keyauth.application.Service/QueryApplication", 162 } 163 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 164 return srv.(ServiceServer).QueryApplication(ctx, req.(*QueryApplicationRequest)) 165 } 166 return interceptor(ctx, in, info, handler) 167 } 168 169 func _Service_DeleteApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 170 in := new(DeleteApplicationRequest) 171 if err := dec(in); err != nil { 172 return nil, err 173 } 174 if interceptor == nil { 175 return srv.(ServiceServer).DeleteApplication(ctx, in) 176 } 177 info := &grpc.UnaryServerInfo{ 178 Server: srv, 179 FullMethod: "/infraboard.keyauth.application.Service/DeleteApplication", 180 } 181 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 182 return srv.(ServiceServer).DeleteApplication(ctx, req.(*DeleteApplicationRequest)) 183 } 184 return interceptor(ctx, in, info, handler) 185 } 186 187 // Service_ServiceDesc is the grpc.ServiceDesc for Service service. 188 // It's only intended for direct use with grpc.RegisterService, 189 // and not to be introspected or modified (even as a copy) 190 var Service_ServiceDesc = grpc.ServiceDesc{ 191 ServiceName: "infraboard.keyauth.application.Service", 192 HandlerType: (*ServiceServer)(nil), 193 Methods: []grpc.MethodDesc{ 194 { 195 MethodName: "CreateApplication", 196 Handler: _Service_CreateApplication_Handler, 197 }, 198 { 199 MethodName: "DescribeApplication", 200 Handler: _Service_DescribeApplication_Handler, 201 }, 202 { 203 MethodName: "QueryApplication", 204 Handler: _Service_QueryApplication_Handler, 205 }, 206 { 207 MethodName: "DeleteApplication", 208 Handler: _Service_DeleteApplication_Handler, 209 }, 210 }, 211 Streams: []grpc.StreamDesc{}, 212 Metadata: "apps/application/pb/service.proto", 213 }