id_generator

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_id_generator_proto protoreflect.FileDescriptor
View Source
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.

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) Descriptor() ([]byte, []int)

Deprecated: Use NewIdReq.ProtoReflect.Descriptor instead.

func (*NewIdReq) GetAppId

func (x *NewIdReq) GetAppId() string

func (*NewIdReq) GetHead

func (x *NewIdReq) GetHead() *common.Request

func (*NewIdReq) GetSysPlat

func (x *NewIdReq) GetSysPlat() string

func (*NewIdReq) GetType

func (x *NewIdReq) GetType() string

func (*NewIdReq) ProtoMessage

func (*NewIdReq) ProtoMessage()

func (*NewIdReq) ProtoReflect

func (x *NewIdReq) ProtoReflect() protoreflect.Message

func (*NewIdReq) Reset

func (x *NewIdReq) Reset()

func (*NewIdReq) String

func (x *NewIdReq) String() string

type UnimplementedIdGeneratorServer

type UnimplementedIdGeneratorServer struct {
}

UnimplementedIdGeneratorServer must be embedded to have forward compatible implementations.

func (UnimplementedIdGeneratorServer) NewId

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL