Files
chain33-dtalk/service/generator/api/api_grpc.pb.go
2022-03-17 15:59:24 +08:00

102 lines
3.3 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package generator
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
// GeneratorClient is the client API for Generator 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 GeneratorClient interface {
GetID(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetIDReply, error)
}
type generatorClient struct {
cc grpc.ClientConnInterface
}
func NewGeneratorClient(cc grpc.ClientConnInterface) GeneratorClient {
return &generatorClient{cc}
}
func (c *generatorClient) GetID(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetIDReply, error) {
out := new(GetIDReply)
err := c.cc.Invoke(ctx, "/dtalk.generator.Generator/GetID", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GeneratorServer is the server API for Generator service.
// All implementations must embed UnimplementedGeneratorServer
// for forward compatibility
type GeneratorServer interface {
GetID(context.Context, *Empty) (*GetIDReply, error)
mustEmbedUnimplementedGeneratorServer()
}
// UnimplementedGeneratorServer must be embedded to have forward compatible implementations.
type UnimplementedGeneratorServer struct {
}
func (UnimplementedGeneratorServer) GetID(context.Context, *Empty) (*GetIDReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetID not implemented")
}
func (UnimplementedGeneratorServer) mustEmbedUnimplementedGeneratorServer() {}
// UnsafeGeneratorServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GeneratorServer will
// result in compilation errors.
type UnsafeGeneratorServer interface {
mustEmbedUnimplementedGeneratorServer()
}
func RegisterGeneratorServer(s grpc.ServiceRegistrar, srv GeneratorServer) {
s.RegisterService(&Generator_ServiceDesc, srv)
}
func _Generator_GetID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GeneratorServer).GetID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dtalk.generator.Generator/GetID",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GeneratorServer).GetID(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
// Generator_ServiceDesc is the grpc.ServiceDesc for Generator service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Generator_ServiceDesc = grpc.ServiceDesc{
ServiceName: "dtalk.generator.Generator",
HandlerType: (*GeneratorServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetID",
Handler: _Generator_GetID_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}