protos

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgType_name = map[int32]string{
		0: "MsgRequest",
		1: "MsgNotify",
		2: "MsgResponse",
		3: "MsgPush",
	}
	MsgType_value = map[string]int32{
		"MsgRequest":  0,
		"MsgNotify":   1,
		"MsgResponse": 2,
		"MsgPush":     3,
	}
)

Enum value maps for MsgType.

View Source
var (
	RPCType_name = map[int32]string{
		0: "Sys",
		1: "User",
	}
	RPCType_value = map[string]int32{
		"Sys":  0,
		"User": 1,
	}
)

Enum value maps for RPCType.

View Source
var File_docmsg_proto protoreflect.FileDescriptor
View Source
var File_error_proto protoreflect.FileDescriptor
View Source
var File_pitaya_proto protoreflect.FileDescriptor
View Source
var File_protodescriptor_proto protoreflect.FileDescriptor
View Source
var File_request_proto protoreflect.FileDescriptor
View Source
var File_response_proto protoreflect.FileDescriptor
View Source
var File_session_proto protoreflect.FileDescriptor

Functions

func RegisterPitayaServer

func RegisterPitayaServer(s *grpc.Server, srv PitayaServer)

Types

type BindMsg

type BindMsg struct {
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Fid string `protobuf:"bytes,2,opt,name=fid,proto3" json:"fid,omitempty"`
	// contains filtered or unexported fields
}

func (*BindMsg) Descriptor deprecated

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

Deprecated: Use BindMsg.ProtoReflect.Descriptor instead.

func (*BindMsg) GetFid

func (x *BindMsg) GetFid() string

func (*BindMsg) GetUid

func (x *BindMsg) GetUid() string

func (*BindMsg) ProtoMessage

func (*BindMsg) ProtoMessage()

func (*BindMsg) ProtoReflect

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

func (*BindMsg) Reset

func (x *BindMsg) Reset()

func (*BindMsg) String

func (x *BindMsg) String() string

type Doc

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

func (*Doc) Descriptor deprecated

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

Deprecated: Use Doc.ProtoReflect.Descriptor instead.

func (*Doc) GetDoc

func (x *Doc) GetDoc() string

func (*Doc) ProtoMessage

func (*Doc) ProtoMessage()

func (*Doc) ProtoReflect

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

func (*Doc) Reset

func (x *Doc) Reset()

func (*Doc) String

func (x *Doc) String() string

type DocMsg

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

func (*DocMsg) Descriptor deprecated

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

Deprecated: Use DocMsg.ProtoReflect.Descriptor instead.

func (*DocMsg) GetGetProtos

func (x *DocMsg) GetGetProtos() bool

func (*DocMsg) ProtoMessage

func (*DocMsg) ProtoMessage()

func (*DocMsg) ProtoReflect

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

func (*DocMsg) Reset

func (x *DocMsg) Reset()

func (*DocMsg) String

func (x *DocMsg) String() string

type Error

type Error struct {
	Code     string            `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg      string            `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() string

func (*Error) GetMetadata

func (x *Error) GetMetadata() map[string]string

func (*Error) GetMsg

func (x *Error) GetMsg() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type KickAnswer

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

func (*KickAnswer) Descriptor deprecated

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

Deprecated: Use KickAnswer.ProtoReflect.Descriptor instead.

func (*KickAnswer) GetKicked

func (x *KickAnswer) GetKicked() bool

func (*KickAnswer) ProtoMessage

func (*KickAnswer) ProtoMessage()

func (*KickAnswer) ProtoReflect

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

func (*KickAnswer) Reset

func (x *KickAnswer) Reset()

func (*KickAnswer) String

func (x *KickAnswer) String() string

type KickMsg

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

func (*KickMsg) Descriptor deprecated

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

Deprecated: Use KickMsg.ProtoReflect.Descriptor instead.

func (*KickMsg) GetUserId

func (x *KickMsg) GetUserId() string

func (*KickMsg) ProtoMessage

func (*KickMsg) ProtoMessage()

func (*KickMsg) ProtoReflect

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

func (*KickMsg) Reset

func (x *KickMsg) Reset()

func (*KickMsg) String

func (x *KickMsg) String() string

type Msg

type Msg struct {
	Id    uint64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Route string  `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
	Data  []byte  `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Reply string  `protobuf:"bytes,4,opt,name=reply,proto3" json:"reply,omitempty"`
	Type  MsgType `protobuf:"varint,5,opt,name=type,proto3,enum=protos.MsgType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Msg) Descriptor deprecated

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

Deprecated: Use Msg.ProtoReflect.Descriptor instead.

func (*Msg) GetData

func (x *Msg) GetData() []byte

func (*Msg) GetId

func (x *Msg) GetId() uint64

func (*Msg) GetReply

func (x *Msg) GetReply() string

func (*Msg) GetRoute

func (x *Msg) GetRoute() string

func (*Msg) GetType

func (x *Msg) GetType() MsgType

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) ProtoReflect

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

func (*Msg) Reset

func (x *Msg) Reset()

func (*Msg) String

func (x *Msg) String() string

type MsgType

type MsgType int32
const (
	MsgType_MsgRequest  MsgType = 0
	MsgType_MsgNotify   MsgType = 1
	MsgType_MsgResponse MsgType = 2
	MsgType_MsgPush     MsgType = 3
)

func (MsgType) Descriptor

func (MsgType) Descriptor() protoreflect.EnumDescriptor

func (MsgType) Enum

func (x MsgType) Enum() *MsgType

func (MsgType) EnumDescriptor deprecated

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

Deprecated: Use MsgType.Descriptor instead.

func (MsgType) Number

func (x MsgType) Number() protoreflect.EnumNumber

func (MsgType) String

func (x MsgType) String() string

func (MsgType) Type

func (MsgType) Type() protoreflect.EnumType

type PitayaClient

type PitayaClient interface {
	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	PushToUser(ctx context.Context, in *Push, opts ...grpc.CallOption) (*Response, error)
	SessionBindRemote(ctx context.Context, in *BindMsg, opts ...grpc.CallOption) (*Response, error)
	KickUser(ctx context.Context, in *KickMsg, opts ...grpc.CallOption) (*KickAnswer, error)
}

PitayaClient is the client API for Pitaya service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPitayaClient

func NewPitayaClient(cc grpc.ClientConnInterface) PitayaClient

type PitayaServer

type PitayaServer interface {
	Call(context.Context, *Request) (*Response, error)
	PushToUser(context.Context, *Push) (*Response, error)
	SessionBindRemote(context.Context, *BindMsg) (*Response, error)
	KickUser(context.Context, *KickMsg) (*KickAnswer, error)
}

PitayaServer is the server API for Pitaya service.

type ProtoDescriptor

type ProtoDescriptor struct {
	Desc []byte `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

Descriptor proto used to retrieve zipped proto descriptors remotely

func (*ProtoDescriptor) Descriptor deprecated

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

Deprecated: Use ProtoDescriptor.ProtoReflect.Descriptor instead.

func (*ProtoDescriptor) GetDesc

func (x *ProtoDescriptor) GetDesc() []byte

func (*ProtoDescriptor) ProtoMessage

func (*ProtoDescriptor) ProtoMessage()

func (*ProtoDescriptor) ProtoReflect

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

func (*ProtoDescriptor) Reset

func (x *ProtoDescriptor) Reset()

func (*ProtoDescriptor) String

func (x *ProtoDescriptor) String() string

type ProtoDescriptors

type ProtoDescriptors struct {
	Desc [][]byte `protobuf:"bytes,1,rep,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*ProtoDescriptors) Descriptor deprecated

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

Deprecated: Use ProtoDescriptors.ProtoReflect.Descriptor instead.

func (*ProtoDescriptors) GetDesc

func (x *ProtoDescriptors) GetDesc() [][]byte

func (*ProtoDescriptors) ProtoMessage

func (*ProtoDescriptors) ProtoMessage()

func (*ProtoDescriptors) ProtoReflect

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

func (*ProtoDescriptors) Reset

func (x *ProtoDescriptors) Reset()

func (*ProtoDescriptors) String

func (x *ProtoDescriptors) String() string

type ProtoName

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

func (*ProtoName) Descriptor deprecated

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

Deprecated: Use ProtoName.ProtoReflect.Descriptor instead.

func (*ProtoName) GetName

func (x *ProtoName) GetName() string

func (*ProtoName) ProtoMessage

func (*ProtoName) ProtoMessage()

func (*ProtoName) ProtoReflect

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

func (*ProtoName) Reset

func (x *ProtoName) Reset()

func (*ProtoName) String

func (x *ProtoName) String() string

type ProtoNames

type ProtoNames struct {
	Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*ProtoNames) Descriptor deprecated

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

Deprecated: Use ProtoNames.ProtoReflect.Descriptor instead.

func (*ProtoNames) GetName

func (x *ProtoNames) GetName() []string

func (*ProtoNames) ProtoMessage

func (*ProtoNames) ProtoMessage()

func (*ProtoNames) ProtoReflect

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

func (*ProtoNames) Reset

func (x *ProtoNames) Reset()

func (*ProtoNames) String

func (x *ProtoNames) String() string

type Push

type Push struct {
	Route string `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
	Uid   string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Data  []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Push) Descriptor deprecated

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

Deprecated: Use Push.ProtoReflect.Descriptor instead.

func (*Push) GetData

func (x *Push) GetData() []byte

func (*Push) GetRoute

func (x *Push) GetRoute() string

func (*Push) GetUid

func (x *Push) GetUid() string

func (*Push) ProtoMessage

func (*Push) ProtoMessage()

func (*Push) ProtoReflect

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

func (*Push) Reset

func (x *Push) Reset()

func (*Push) String

func (x *Push) String() string

type RPCType

type RPCType int32
const (
	RPCType_Sys  RPCType = 0
	RPCType_User RPCType = 1
)

func (RPCType) Descriptor

func (RPCType) Descriptor() protoreflect.EnumDescriptor

func (RPCType) Enum

func (x RPCType) Enum() *RPCType

func (RPCType) EnumDescriptor deprecated

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

Deprecated: Use RPCType.Descriptor instead.

func (RPCType) Number

func (x RPCType) Number() protoreflect.EnumNumber

func (RPCType) String

func (x RPCType) String() string

func (RPCType) Type

func (RPCType) Type() protoreflect.EnumType

type Request

type Request struct {
	Type       RPCType  `protobuf:"varint,1,opt,name=type,proto3,enum=protos.RPCType" json:"type,omitempty"`
	Session    *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	Msg        *Msg     `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	FrontendID string   `protobuf:"bytes,4,opt,name=frontendID,proto3" json:"frontendID,omitempty"`
	Metadata   []byte   `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetFrontendID

func (x *Request) GetFrontendID() string

func (*Request) GetMetadata

func (x *Request) GetMetadata() []byte

func (*Request) GetMsg

func (x *Request) GetMsg() *Msg

func (*Request) GetSession

func (x *Request) GetSession() *Session

func (*Request) GetType

func (x *Request) GetType() RPCType

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Data  []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() []byte

func (*Response) GetError

func (x *Response) GetError() *Error

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Session

type Session struct {
	Id          int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`  // 运行时的session id
	Uid         string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` // 玩家id,角色id是另外一个,玩家可能有多个角色
	Data        []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	EntityID    string `protobuf:"bytes,4,opt,name=entityID,proto3" json:"entityID,omitempty"`
	EntityLabel string `protobuf:"bytes,5,opt,name=entityLabel,proto3" json:"entityLabel,omitempty"`
	// contains filtered or unexported fields
}

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) GetData

func (x *Session) GetData() []byte

func (*Session) GetEntityID

func (x *Session) GetEntityID() string

func (*Session) GetEntityLabel

func (x *Session) GetEntityLabel() string

func (*Session) GetId

func (x *Session) GetId() int64

func (*Session) GetUid

func (x *Session) GetUid() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type UnimplementedPitayaServer

type UnimplementedPitayaServer struct {
}

UnimplementedPitayaServer can be embedded to have forward compatible implementations.

func (*UnimplementedPitayaServer) Call

func (*UnimplementedPitayaServer) KickUser

func (*UnimplementedPitayaServer) PushToUser

func (*UnimplementedPitayaServer) SessionBindRemote

func (*UnimplementedPitayaServer) SessionBindRemote(context.Context, *BindMsg) (*Response, error)

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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