pb

package
v0.1.6-alpha7 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_GetUserInfo_FullMethodName = "/pb.UserService/GetUserInfo"
)

Variables

View Source
var (
	OpCode_name = map[int32]string{
		0: "None",
		1: "Op_C2S_Login",
		2: "Op_S2C_Login",
		3: "Op_C2S_Say",
		4: "Op_S2C_Say",
		5: "Op_S2S_Hi",
	}
	OpCode_value = map[string]int32{
		"None":         0,
		"Op_C2S_Login": 1,
		"Op_S2C_Login": 2,
		"Op_C2S_Say":   3,
		"Op_S2C_Say":   4,
		"Op_S2S_Hi":    5,
	}
)

Enum value maps for OpCode.

View Source
var File_game_op_proto protoreflect.FileDescriptor
View Source
var File_gameserver_proto protoreflect.FileDescriptor
View Source
var File_user_service_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserInfo",
			Handler:    _UserService_GetUserInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.service.proto",
}

UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type C2S_Login

type C2S_Login struct {
	Account  string `protobuf:"bytes,1,opt,name=Account,proto3" json:"Account,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"`
	// contains filtered or unexported fields
}

C2S_Login 登录服务器

func (*C2S_Login) Descriptor deprecated

func (*C2S_Login) Descriptor() ([]byte, []int)

Deprecated: Use C2S_Login.ProtoReflect.Descriptor instead.

func (*C2S_Login) GetAccount

func (x *C2S_Login) GetAccount() string

func (*C2S_Login) GetPassword

func (x *C2S_Login) GetPassword() string

func (*C2S_Login) ProtoMessage

func (*C2S_Login) ProtoMessage()

func (*C2S_Login) ProtoReflect

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

func (*C2S_Login) Reset

func (x *C2S_Login) Reset()

func (*C2S_Login) String

func (x *C2S_Login) String() string

type C2S_Ping

type C2S_Ping struct {
	TickTime int64 `protobuf:"varint,1,opt,name=TickTime,proto3" json:"TickTime,omitempty"`
	// contains filtered or unexported fields
}

C2S_Ping 客户端向服务器发送心跳

func (*C2S_Ping) Descriptor deprecated

func (*C2S_Ping) Descriptor() ([]byte, []int)

Deprecated: Use C2S_Ping.ProtoReflect.Descriptor instead.

func (*C2S_Ping) GetTickTime

func (x *C2S_Ping) GetTickTime() int64

func (*C2S_Ping) ProtoMessage

func (*C2S_Ping) ProtoMessage()

func (*C2S_Ping) ProtoReflect

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

func (*C2S_Ping) Reset

func (x *C2S_Ping) Reset()

func (*C2S_Ping) String

func (x *C2S_Ping) String() string

type C2S_Say added in v0.0.4

type C2S_Say struct {
	Actor int64  `protobuf:"varint,1,opt,name=Actor,proto3" json:"Actor,omitempty"`
	Word  string `protobuf:"bytes,2,opt,name=Word,proto3" json:"Word,omitempty"`
	// contains filtered or unexported fields
}

C2S_Say 玩家通信

func (*C2S_Say) Descriptor deprecated added in v0.0.4

func (*C2S_Say) Descriptor() ([]byte, []int)

Deprecated: Use C2S_Say.ProtoReflect.Descriptor instead.

func (*C2S_Say) GetActor added in v0.0.4

func (x *C2S_Say) GetActor() int64

func (*C2S_Say) GetWord added in v0.0.4

func (x *C2S_Say) GetWord() string

func (*C2S_Say) ProtoMessage added in v0.0.4

func (*C2S_Say) ProtoMessage()

func (*C2S_Say) ProtoReflect added in v0.0.4

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

func (*C2S_Say) Reset added in v0.0.4

func (x *C2S_Say) Reset()

func (*C2S_Say) String added in v0.0.4

func (x *C2S_Say) String() string

type GetUserInfoArgs

type GetUserInfoArgs struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id"` // 用户ID
	// contains filtered or unexported fields
}

func (*GetUserInfoArgs) Descriptor deprecated

func (*GetUserInfoArgs) Descriptor() ([]byte, []int)

Deprecated: Use GetUserInfoArgs.ProtoReflect.Descriptor instead.

func (*GetUserInfoArgs) GetUserId

func (x *GetUserInfoArgs) GetUserId() int64

func (*GetUserInfoArgs) ProtoMessage

func (*GetUserInfoArgs) ProtoMessage()

func (*GetUserInfoArgs) ProtoReflect

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

func (*GetUserInfoArgs) Reset

func (x *GetUserInfoArgs) Reset()

func (*GetUserInfoArgs) String

func (x *GetUserInfoArgs) String() string

type GetUserInfoReply

type GetUserInfoReply struct {
	UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name"` // 用户名
	// contains filtered or unexported fields
}

func (*GetUserInfoReply) Descriptor deprecated

func (*GetUserInfoReply) Descriptor() ([]byte, []int)

Deprecated: Use GetUserInfoReply.ProtoReflect.Descriptor instead.

func (*GetUserInfoReply) GetUserName

func (x *GetUserInfoReply) GetUserName() string

func (*GetUserInfoReply) ProtoMessage

func (*GetUserInfoReply) ProtoMessage()

func (*GetUserInfoReply) ProtoReflect

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

func (*GetUserInfoReply) Reset

func (x *GetUserInfoReply) Reset()

func (*GetUserInfoReply) String

func (x *GetUserInfoReply) String() string

type OpCode

type OpCode int32

OpCode 操作符定义

const (
	OpCode_None         OpCode = 0 // 心跳包占用
	OpCode_Op_C2S_Login OpCode = 1
	OpCode_Op_S2C_Login OpCode = 2
	OpCode_Op_C2S_Say   OpCode = 3
	OpCode_Op_S2C_Say   OpCode = 4
	OpCode_Op_S2S_Hi    OpCode = 5
)

func (OpCode) Descriptor

func (OpCode) Descriptor() protoreflect.EnumDescriptor

func (OpCode) Enum

func (x OpCode) Enum() *OpCode

func (OpCode) EnumDescriptor deprecated

func (OpCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use OpCode.Descriptor instead.

func (OpCode) Number

func (x OpCode) Number() protoreflect.EnumNumber

func (OpCode) String

func (x OpCode) String() string

func (OpCode) Type

func (OpCode) Type() protoreflect.EnumType

type S2C_Login

type S2C_Login struct {
	Ok bool `protobuf:"varint,1,opt,name=Ok,proto3" json:"Ok,omitempty"`
	// contains filtered or unexported fields
}

func (*S2C_Login) Descriptor deprecated

func (*S2C_Login) Descriptor() ([]byte, []int)

Deprecated: Use S2C_Login.ProtoReflect.Descriptor instead.

func (*S2C_Login) GetOk

func (x *S2C_Login) GetOk() bool

func (*S2C_Login) ProtoMessage

func (*S2C_Login) ProtoMessage()

func (*S2C_Login) ProtoReflect

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

func (*S2C_Login) Reset

func (x *S2C_Login) Reset()

func (*S2C_Login) String

func (x *S2C_Login) String() string

type S2C_Pong

type S2C_Pong struct {
	OK bool `protobuf:"varint,1,opt,name=OK,proto3" json:"OK,omitempty"`
	// contains filtered or unexported fields
}

func (*S2C_Pong) Descriptor deprecated

func (*S2C_Pong) Descriptor() ([]byte, []int)

Deprecated: Use S2C_Pong.ProtoReflect.Descriptor instead.

func (*S2C_Pong) GetOK

func (x *S2C_Pong) GetOK() bool

func (*S2C_Pong) ProtoMessage

func (*S2C_Pong) ProtoMessage()

func (*S2C_Pong) ProtoReflect

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

func (*S2C_Pong) Reset

func (x *S2C_Pong) Reset()

func (*S2C_Pong) String

func (x *S2C_Pong) String() string

type S2C_Say added in v0.0.4

type S2C_Say struct {
	Word string `protobuf:"bytes,1,opt,name=Word,proto3" json:"Word,omitempty"`
	// contains filtered or unexported fields
}

func (*S2C_Say) Descriptor deprecated added in v0.0.4

func (*S2C_Say) Descriptor() ([]byte, []int)

Deprecated: Use S2C_Say.ProtoReflect.Descriptor instead.

func (*S2C_Say) GetWord added in v0.0.4

func (x *S2C_Say) GetWord() string

func (*S2C_Say) ProtoMessage added in v0.0.4

func (*S2C_Say) ProtoMessage()

func (*S2C_Say) ProtoReflect added in v0.0.4

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

func (*S2C_Say) Reset added in v0.0.4

func (x *S2C_Say) Reset()

func (*S2C_Say) String added in v0.0.4

func (x *S2C_Say) String() string

type S2S_Hi added in v0.0.5

type S2S_Hi struct {
	Repeat string `protobuf:"bytes,1,opt,name=Repeat,proto3" json:"Repeat,omitempty"`
	// contains filtered or unexported fields
}

S2S_Hi 服务端玩家通信

func (*S2S_Hi) Descriptor deprecated added in v0.0.5

func (*S2S_Hi) Descriptor() ([]byte, []int)

Deprecated: Use S2S_Hi.ProtoReflect.Descriptor instead.

func (*S2S_Hi) GetRepeat added in v0.0.5

func (x *S2S_Hi) GetRepeat() string

func (*S2S_Hi) ProtoMessage added in v0.0.5

func (*S2S_Hi) ProtoMessage()

func (*S2S_Hi) ProtoReflect added in v0.0.5

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

func (*S2S_Hi) Reset added in v0.0.5

func (x *S2S_Hi) Reset()

func (*S2S_Hi) String added in v0.0.5

func (x *S2S_Hi) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) GetUserInfo

type UnsafeUserServiceServer

type UnsafeUserServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.

type UserServiceClient

type UserServiceClient interface {
	GetUserInfo(ctx context.Context, in *GetUserInfoArgs, opts ...grpc.CallOption) (*GetUserInfoReply, error)
}

UserServiceClient is the client API for UserService 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 UserServiceServer

type UserServiceServer interface {
	GetUserInfo(context.Context, *GetUserInfoArgs) (*GetUserInfoReply, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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