Documentation ¶
Index ¶
- Variables
- func RegisterIdGeneratorServer(s grpc.ServiceRegistrar, srv IdGeneratorServer)
- type IdGeneratorClient
- type IdGeneratorServer
- type NewIdReply
- type NewIdReq
- func (*NewIdReq) Descriptor() ([]byte, []int)deprecated
- func (x *NewIdReq) GetAppId() string
- func (x *NewIdReq) GetHead() *common.Request
- func (x *NewIdReq) GetSysPlat() string
- func (x *NewIdReq) GetType() string
- func (*NewIdReq) ProtoMessage()
- func (x *NewIdReq) ProtoReflect() protoreflect.Message
- func (x *NewIdReq) Reset()
- func (x *NewIdReq) String() string
- type UnimplementedIdGeneratorServer
- type UnsafeIdGeneratorServer
Constants ¶
This section is empty.
Variables ¶
var File_id_generator_proto protoreflect.FileDescriptor
var IdGenerator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "id_generator.IdGenerator", HandlerType: (*IdGeneratorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "NewId", Handler: _IdGenerator_NewId_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "id_generator.proto", }
IdGenerator_ServiceDesc is the grpc.ServiceDesc for IdGenerator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterIdGeneratorServer ¶
func RegisterIdGeneratorServer(s grpc.ServiceRegistrar, srv IdGeneratorServer)
Types ¶
type IdGeneratorClient ¶
type IdGeneratorClient interface {
NewId(ctx context.Context, in *NewIdReq, opts ...grpc.CallOption) (*NewIdReply, error)
}
IdGeneratorClient is the client API for IdGenerator 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.
func NewIdGeneratorClient ¶
func NewIdGeneratorClient(cc grpc.ClientConnInterface) IdGeneratorClient
type IdGeneratorServer ¶
type IdGeneratorServer interface { NewId(context.Context, *NewIdReq) (*NewIdReply, error) // contains filtered or unexported methods }
IdGeneratorServer is the server API for IdGenerator service. All implementations must embed UnimplementedIdGeneratorServer for forward compatibility
type NewIdReply ¶
type NewIdReply struct { Head *common.Response `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*NewIdReply) Descriptor
deprecated
func (*NewIdReply) Descriptor() ([]byte, []int)
Deprecated: Use NewIdReply.ProtoReflect.Descriptor instead.
func (*NewIdReply) GetHead ¶
func (x *NewIdReply) GetHead() *common.Response
func (*NewIdReply) GetId ¶
func (x *NewIdReply) GetId() int64
func (*NewIdReply) ProtoMessage ¶
func (*NewIdReply) ProtoMessage()
func (*NewIdReply) ProtoReflect ¶
func (x *NewIdReply) ProtoReflect() protoreflect.Message
func (*NewIdReply) Reset ¶
func (x *NewIdReply) Reset()
func (*NewIdReply) String ¶
func (x *NewIdReply) String() string
type NewIdReq ¶
type NewIdReq struct { Head *common.Request `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` //需要哪种ID AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"` SysPlat string `protobuf:"bytes,4,opt,name=sys_plat,json=sysPlat,proto3" json:"sys_plat,omitempty"` // contains filtered or unexported fields }
func (*NewIdReq) Descriptor
deprecated
func (*NewIdReq) GetSysPlat ¶
func (*NewIdReq) ProtoMessage ¶
func (*NewIdReq) ProtoMessage()
func (*NewIdReq) ProtoReflect ¶
func (x *NewIdReq) ProtoReflect() protoreflect.Message
type UnimplementedIdGeneratorServer ¶
type UnimplementedIdGeneratorServer struct { }
UnimplementedIdGeneratorServer must be embedded to have forward compatible implementations.
func (UnimplementedIdGeneratorServer) NewId ¶
func (UnimplementedIdGeneratorServer) NewId(context.Context, *NewIdReq) (*NewIdReply, error)
type UnsafeIdGeneratorServer ¶
type UnsafeIdGeneratorServer interface {
// contains filtered or unexported methods
}
UnsafeIdGeneratorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IdGeneratorServer will result in compilation errors.