Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
game.proto
It has these top-level messages:
Frame EnterTableReq SitdownReq BetReq DuelReq FriendReq GiftReq ChatReq DelegateReq GeRes RevealRes Player Table PlayerSeat Reveal GeCall GiveUp Duel Bet DuelResult FriendAdd FriendAddResult SendGift GameOver TableResult CardDeal ChatMsg NetInfo
Index ¶
- func RegisterGameServiceServer(s *grpc.Server, srv GameServiceServer)
- type Bet
- type BetReq
- type CardDeal
- type ChatMsg
- type ChatReq
- type DelegateReq
- type Duel
- type DuelReq
- type DuelResult
- func (*DuelResult) Descriptor() ([]byte, []int)
- func (m *DuelResult) GetCallSeat() int32
- func (m *DuelResult) GetDuelCards() map[int32][]byte
- func (m *DuelResult) GetFromSeat() int32
- func (m *DuelResult) GetToSeat() int32
- func (m *DuelResult) GetWinSeat() int32
- func (*DuelResult) ProtoMessage()
- func (m *DuelResult) Reset()
- func (m *DuelResult) String() string
- type EnterTableReq
- type Frame
- type FriendAdd
- type FriendAddResult
- type FriendReq
- type GameOver
- type GameServiceClient
- type GameServiceServer
- type GameService_StreamClient
- type GameService_StreamServer
- type GeCall
- type GeRes
- type GiftReq
- type GiveUp
- type NetInfo
- type Player
- func (*Player) Descriptor() ([]byte, []int)
- func (m *Player) GetAvatar() string
- func (m *Player) GetBetCoin() int64
- func (m *Player) GetBlind() bool
- func (m *Player) GetCards() []byte
- func (m *Player) GetCharacter() int32
- func (m *Player) GetCoin() int64
- func (m *Player) GetNick() string
- func (m *Player) GetSeat() int32
- func (m *Player) GetSeatCode() int32
- func (m *Player) GetStatus() int32
- func (m *Player) GetUid() int64
- func (*Player) ProtoMessage()
- func (m *Player) Reset()
- func (m *Player) String() string
- type PlayerSeat
- type Reveal
- type RevealRes
- type SendGift
- type SitdownReq
- type Table
- func (*Table) Descriptor() ([]byte, []int)
- func (m *Table) GetBankerSeat() int32
- func (m *Table) GetCallSeat() int32
- func (m *Table) GetCode() int32
- func (m *Table) GetJackpot() int64
- func (m *Table) GetPlayers() []*Player
- func (m *Table) GetRound() int32
- func (m *Table) GetRoundBet() int64
- func (m *Table) GetStatus() int32
- func (m *Table) GetTableId() int32
- func (*Table) ProtoMessage()
- func (m *Table) Reset()
- func (m *Table) String() string
- type TableResult
- func (*TableResult) Descriptor() ([]byte, []int)
- func (m *TableResult) GetBetCoins() int64
- func (m *TableResult) GetCards() []byte
- func (m *TableResult) GetCardsType() int32
- func (m *TableResult) GetGreetType() int32
- func (*TableResult) ProtoMessage()
- func (m *TableResult) Reset()
- func (m *TableResult) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGameServiceServer ¶
func RegisterGameServiceServer(s *grpc.Server, srv GameServiceServer)
Types ¶
type Bet ¶
type Bet struct { // 下注玩家座号 Seat int32 `protobuf:"varint,1,opt,name=seat" json:"seat,omitempty"` // 下注金币数量 Coins int64 `protobuf:"varint,2,opt,name=coins" json:"coins,omitempty"` // 下一个叫牌座号 CallSeat int32 `protobuf:"varint,3,opt,name=callSeat" json:"callSeat,omitempty"` }
func (*Bet) Descriptor ¶
func (*Bet) GetCallSeat ¶
func (*Bet) ProtoMessage ¶
func (*Bet) ProtoMessage()
type BetReq ¶
type BetReq struct { // 下注金币数量 Coins int64 `protobuf:"varint,1,opt,name=coins" json:"coins,omitempty"` }
func (*BetReq) Descriptor ¶
func (*BetReq) ProtoMessage ¶
func (*BetReq) ProtoMessage()
type CardDeal ¶
type CardDeal struct { // 下一个叫牌座号 CallSeat int32 `protobuf:"varint,1,opt,name=callSeat" json:"callSeat,omitempty"` BankerSeat int32 `protobuf:"varint,2,opt,name=bankerSeat" json:"bankerSeat,omitempty"` }
func (*CardDeal) Descriptor ¶
func (*CardDeal) GetBankerSeat ¶
func (*CardDeal) GetCallSeat ¶
func (*CardDeal) ProtoMessage ¶
func (*CardDeal) ProtoMessage()
type ChatMsg ¶
type ChatMsg struct { // 座号 Sid int32 `protobuf:"varint,1,opt,name=sid" json:"sid,omitempty"` // 消息类型或消息编码 Mid int32 `protobuf:"varint,2,opt,name=mid" json:"mid,omitempty"` // 自定义消息内容 Msg string `protobuf:"bytes,3,opt,name=msg" json:"msg,omitempty"` }
func (*ChatMsg) Descriptor ¶
func (*ChatMsg) ProtoMessage ¶
func (*ChatMsg) ProtoMessage()
type ChatReq ¶
type ChatReq struct { // 消息类型或消息编码 Mid int32 `protobuf:"varint,1,opt,name=mid" json:"mid,omitempty"` // 自定义消息内容 Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"` }
func (*ChatReq) Descriptor ¶
func (*ChatReq) ProtoMessage ¶
func (*ChatReq) ProtoMessage()
type DelegateReq ¶
type DelegateReq struct { // 托管操作[1:自动弃牌,2:自动跟注] Method int32 `protobuf:"varint,1,opt,name=method" json:"method,omitempty"` Action bool `protobuf:"varint,2,opt,name=action" json:"action,omitempty"` }
func (*DelegateReq) Descriptor ¶
func (*DelegateReq) Descriptor() ([]byte, []int)
func (*DelegateReq) GetAction ¶
func (m *DelegateReq) GetAction() bool
func (*DelegateReq) GetMethod ¶
func (m *DelegateReq) GetMethod() int32
func (*DelegateReq) ProtoMessage ¶
func (*DelegateReq) ProtoMessage()
func (*DelegateReq) Reset ¶
func (m *DelegateReq) Reset()
func (*DelegateReq) String ¶
func (m *DelegateReq) String() string
type Duel ¶
type Duel struct { // 比牌发起者、拒绝者或接受者座号(根据协议定) FromSeat int32 `protobuf:"varint,1,opt,name=fromSeat" json:"fromSeat,omitempty"` // 比牌发起者、拒绝者或接受者座号(根据协议定) ToSeat int32 `protobuf:"varint,2,opt,name=toSeat" json:"toSeat,omitempty"` // 下一个叫牌座号 CallSeat int32 `protobuf:"varint,3,opt,name=callSeat" json:"callSeat,omitempty"` }
func (*Duel) Descriptor ¶
func (*Duel) GetCallSeat ¶
func (*Duel) GetFromSeat ¶
func (*Duel) ProtoMessage ¶
func (*Duel) ProtoMessage()
type DuelReq ¶
type DuelReq struct { // 被比牌玩家ID Rival int64 `protobuf:"varint,1,opt,name=rival" json:"rival,omitempty"` }
func (*DuelReq) Descriptor ¶
func (*DuelReq) ProtoMessage ¶
func (*DuelReq) ProtoMessage()
type DuelResult ¶
type DuelResult struct { // 比牌发起者座号 FromSeat int32 `protobuf:"varint,1,opt,name=fromSeat" json:"fromSeat,omitempty"` // 被比牌者座号 ToSeat int32 `protobuf:"varint,2,opt,name=toSeat" json:"toSeat,omitempty"` // 胜者座号 WinSeat int32 `protobuf:"varint,3,opt,name=winSeat" json:"winSeat,omitempty"` // 比牌二者的牌组 DuelCards map[int32][]byte `` /* 146-byte string literal not displayed */ // 下一个叫牌座号 CallSeat int32 `protobuf:"varint,5,opt,name=callSeat" json:"callSeat,omitempty"` }
func (*DuelResult) Descriptor ¶
func (*DuelResult) Descriptor() ([]byte, []int)
func (*DuelResult) GetCallSeat ¶
func (m *DuelResult) GetCallSeat() int32
func (*DuelResult) GetDuelCards ¶
func (m *DuelResult) GetDuelCards() map[int32][]byte
func (*DuelResult) GetFromSeat ¶
func (m *DuelResult) GetFromSeat() int32
func (*DuelResult) GetToSeat ¶
func (m *DuelResult) GetToSeat() int32
func (*DuelResult) GetWinSeat ¶
func (m *DuelResult) GetWinSeat() int32
func (*DuelResult) ProtoMessage ¶
func (*DuelResult) ProtoMessage()
func (*DuelResult) Reset ¶
func (m *DuelResult) Reset()
func (*DuelResult) String ¶
func (m *DuelResult) String() string
type EnterTableReq ¶
type EnterTableReq struct { Uid int64 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"` // 登陆令牌 Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` // 房间等级 RoomClass int32 `protobuf:"varint,3,opt,name=roomClass" json:"roomClass,omitempty"` }
双向流请求包
func (*EnterTableReq) Descriptor ¶
func (*EnterTableReq) Descriptor() ([]byte, []int)
func (*EnterTableReq) GetRoomClass ¶
func (m *EnterTableReq) GetRoomClass() int32
func (*EnterTableReq) GetToken ¶
func (m *EnterTableReq) GetToken() string
func (*EnterTableReq) GetUid ¶
func (m *EnterTableReq) GetUid() int64
func (*EnterTableReq) ProtoMessage ¶
func (*EnterTableReq) ProtoMessage()
func (*EnterTableReq) Reset ¶
func (m *EnterTableReq) Reset()
func (*EnterTableReq) String ¶
func (m *EnterTableReq) String() string
type Frame ¶
type Frame struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}
双向流包
func (*Frame) Descriptor ¶
func (*Frame) GetPayload ¶
func (*Frame) ProtoMessage ¶
func (*Frame) ProtoMessage()
type FriendAdd ¶
type FriendAdd struct { // 发起、拒绝或接受加好友玩家座号(根据协议定) FromId int64 `protobuf:"varint,1,opt,name=fromId" json:"fromId,omitempty"` // 发起、拒绝或接受加好友玩家座号(根据协议定) ToId int64 `protobuf:"varint,2,opt,name=toId" json:"toId,omitempty"` }
func (*FriendAdd) Descriptor ¶
func (*FriendAdd) ProtoMessage ¶
func (*FriendAdd) ProtoMessage()
type FriendAddResult ¶
type FriendAddResult struct { // 发起加好友玩家座号 FromId int64 `protobuf:"varint,1,opt,name=fromId" json:"fromId,omitempty"` // 被加好友玩家座号 ToId int64 `protobuf:"varint,2,opt,name=toId" json:"toId,omitempty"` // 加友好是否接受 Accept bool `protobuf:"varint,3,opt,name=accept" json:"accept,omitempty"` }
func (*FriendAddResult) Descriptor ¶
func (*FriendAddResult) Descriptor() ([]byte, []int)
func (*FriendAddResult) GetAccept ¶
func (m *FriendAddResult) GetAccept() bool
func (*FriendAddResult) GetFromId ¶
func (m *FriendAddResult) GetFromId() int64
func (*FriendAddResult) GetToId ¶
func (m *FriendAddResult) GetToId() int64
func (*FriendAddResult) ProtoMessage ¶
func (*FriendAddResult) ProtoMessage()
func (*FriendAddResult) Reset ¶
func (m *FriendAddResult) Reset()
func (*FriendAddResult) String ¶
func (m *FriendAddResult) String() string
type FriendReq ¶
type FriendReq struct { // 被加好友ID ToId int64 `protobuf:"varint,1,opt,name=toId" json:"toId,omitempty"` }
func (*FriendReq) Descriptor ¶
func (*FriendReq) ProtoMessage ¶
func (*FriendReq) ProtoMessage()
type GameOver ¶
type GameOver struct { // 胜者座号 WinUid int64 `protobuf:"varint,1,opt,name=winUid" json:"winUid,omitempty"` // 税后金币 Result map[string]*TableResult `` /* 132-byte string literal not displayed */ }
func (*GameOver) Descriptor ¶
func (*GameOver) GetResult ¶
func (m *GameOver) GetResult() map[string]*TableResult
func (*GameOver) ProtoMessage ¶
func (*GameOver) ProtoMessage()
type GameServiceClient ¶
type GameServiceClient interface {
Stream(ctx context.Context, opts ...grpc.CallOption) (GameService_StreamClient, error)
}
func NewGameServiceClient ¶
func NewGameServiceClient(cc *grpc.ClientConn) GameServiceClient
type GameServiceServer ¶
type GameServiceServer interface {
Stream(GameService_StreamServer) error
}
type GeCall ¶
type GeCall struct { // 座号 Seat int32 `protobuf:"varint,1,opt,name=seat" json:"seat,omitempty"` CallSeat int32 `protobuf:"varint,2,opt,name=callSeat" json:"callSeat,omitempty"` }
func (*GeCall) Descriptor ¶
func (*GeCall) GetCallSeat ¶
func (*GeCall) ProtoMessage ¶
func (*GeCall) ProtoMessage()
type GeRes ¶
type GeRes struct { Code int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"` CallSeat int32 `protobuf:"varint,2,opt,name=callSeat" json:"callSeat,omitempty"` }
func (*GeRes) Descriptor ¶
func (*GeRes) GetCallSeat ¶
func (*GeRes) ProtoMessage ¶
func (*GeRes) ProtoMessage()
type GiftReq ¶
type GiftReq struct { // 被加好友ID ToId int64 `protobuf:"varint,1,opt,name=toId" json:"toId,omitempty"` // 礼物ID GiftId int32 `protobuf:"varint,2,opt,name=giftId" json:"giftId,omitempty"` // 礼物数量 Amount int32 `protobuf:"varint,3,opt,name=amount" json:"amount,omitempty"` }
func (*GiftReq) Descriptor ¶
func (*GiftReq) ProtoMessage ¶
func (*GiftReq) ProtoMessage()
type GiveUp ¶
type GiveUp struct { // 座号 Seat int32 `protobuf:"varint,1,opt,name=seat" json:"seat,omitempty"` // 下一个叫牌座号 CallSeat int32 `protobuf:"varint,2,opt,name=callSeat" json:"callSeat,omitempty"` }
func (*GiveUp) Descriptor ¶
func (*GiveUp) GetCallSeat ¶
func (*GiveUp) ProtoMessage ¶
func (*GiveUp) ProtoMessage()
type NetInfo ¶
type NetInfo struct { // 座号 Sid int32 `protobuf:"varint,1,opt,name=sid" json:"sid,omitempty"` // 网络状态[在线/掉线] Status bool `protobuf:"varint,2,opt,name=status" json:"status,omitempty"` }
func (*NetInfo) Descriptor ¶
func (*NetInfo) ProtoMessage ¶
func (*NetInfo) ProtoMessage()
type Player ¶
type Player struct { // 玩家ID Uid int64 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"` // 玩家座标 SeatCode int32 `protobuf:"varint,2,opt,name=seatCode" json:"seatCode,omitempty"` // 是否未看牌 Blind bool `protobuf:"varint,3,opt,name=blind" json:"blind,omitempty"` // 牌桌座位号 Seat int32 `protobuf:"varint,4,opt,name=seat" json:"seat,omitempty"` // 金币数量 Coin int64 `protobuf:"varint,5,opt,name=coin" json:"coin,omitempty"` // 昵称 Nick string `protobuf:"bytes,6,opt,name=nick" json:"nick,omitempty"` // 头像路径 Avatar string `protobuf:"bytes,7,opt,name=avatar" json:"avatar,omitempty"` // 玩家牌 Cards []byte `protobuf:"bytes,8,opt,name=cards,proto3" json:"cards,omitempty"` // 本局下注金币 BetCoin int64 `protobuf:"varint,9,opt,name=betCoin" json:"betCoin,omitempty"` // 玩家特征 Character int32 `protobuf:"varint,10,opt,name=character" json:"character,omitempty"` // 玩家当前牌局状态 Status int32 `protobuf:"varint,11,opt,name=status" json:"status,omitempty"` }
func (*Player) Descriptor ¶
func (*Player) GetBetCoin ¶
func (*Player) GetCharacter ¶
func (*Player) GetSeatCode ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
type PlayerSeat ¶
type PlayerSeat struct { // 玩家ID Uid int64 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"` // 玩家座号 Seat int32 `protobuf:"varint,2,opt,name=seat" json:"seat,omitempty"` CallSeat int32 `protobuf:"varint,3,opt,name=callSeat" json:"callSeat,omitempty"` }
func (*PlayerSeat) Descriptor ¶
func (*PlayerSeat) Descriptor() ([]byte, []int)
func (*PlayerSeat) GetCallSeat ¶
func (m *PlayerSeat) GetCallSeat() int32
func (*PlayerSeat) GetSeat ¶
func (m *PlayerSeat) GetSeat() int32
func (*PlayerSeat) GetUid ¶
func (m *PlayerSeat) GetUid() int64
func (*PlayerSeat) ProtoMessage ¶
func (*PlayerSeat) ProtoMessage()
func (*PlayerSeat) Reset ¶
func (m *PlayerSeat) Reset()
func (*PlayerSeat) String ¶
func (m *PlayerSeat) String() string
type Reveal ¶
type Reveal struct { // 座号 Seat int32 `protobuf:"varint,1,opt,name=seat" json:"seat,omitempty"` CallSeat int32 `protobuf:"varint,2,opt,name=callSeat" json:"callSeat,omitempty"` Cards []byte `protobuf:"bytes,3,opt,name=cards,proto3" json:"cards,omitempty"` // 牌型[1:高牌,2:对子,3:同花,4:顺子,5:同花顺,6:豹子] CardType int32 `protobuf:"varint,4,opt,name=cardType" json:"cardType,omitempty"` }
func (*Reveal) Descriptor ¶
func (*Reveal) GetCallSeat ¶
func (*Reveal) GetCardType ¶
func (*Reveal) ProtoMessage ¶
func (*Reveal) ProtoMessage()
type RevealRes ¶
type RevealRes struct { Code int32 `protobuf:"varint,1,opt,name=code" json:"code,omitempty"` CallSeat int32 `protobuf:"varint,2,opt,name=callSeat" json:"callSeat,omitempty"` Cards []byte `protobuf:"bytes,3,opt,name=cards,proto3" json:"cards,omitempty"` // 牌型[1:高牌,2:对子,3:同花,4:顺子,5:同花顺,6:豹子] CardType int32 `protobuf:"varint,4,opt,name=cardType" json:"cardType,omitempty"` }
func (*RevealRes) Descriptor ¶
func (*RevealRes) GetCallSeat ¶
func (*RevealRes) GetCardType ¶
func (*RevealRes) ProtoMessage ¶
func (*RevealRes) ProtoMessage()
type SendGift ¶
type SendGift struct { // 送礼物玩家座号 FromId int64 `protobuf:"varint,1,opt,name=fromId" json:"fromId,omitempty"` // 被送礼物玩家座号 ToId int64 `protobuf:"varint,2,opt,name=toId" json:"toId,omitempty"` // 礼物编号 GiftId int32 `protobuf:"varint,3,opt,name=giftId" json:"giftId,omitempty"` // 礼物数量 Amount int32 `protobuf:"varint,4,opt,name=amount" json:"amount,omitempty"` }
func (*SendGift) Descriptor ¶
func (*SendGift) ProtoMessage ¶
func (*SendGift) ProtoMessage()
type SitdownReq ¶
type SitdownReq struct { // 座位号 Seat int32 `protobuf:"varint,1,opt,name=seat" json:"seat,omitempty"` }
func (*SitdownReq) Descriptor ¶
func (*SitdownReq) Descriptor() ([]byte, []int)
func (*SitdownReq) GetSeat ¶
func (m *SitdownReq) GetSeat() int32
func (*SitdownReq) ProtoMessage ¶
func (*SitdownReq) ProtoMessage()
func (*SitdownReq) Reset ¶
func (m *SitdownReq) Reset()
func (*SitdownReq) String ¶
func (m *SitdownReq) String() string
type Table ¶
type Table struct { // 桌号 TableId int32 `protobuf:"varint,1,opt,name=tableId" json:"tableId,omitempty"` // 当前叫牌座号 CallSeat int32 `protobuf:"varint,2,opt,name=callSeat" json:"callSeat,omitempty"` // 庄家座号 BankerSeat int32 `protobuf:"varint,3,opt,name=bankerSeat" json:"bankerSeat,omitempty"` // 总注池 Jackpot int64 `protobuf:"varint,4,opt,name=jackpot" json:"jackpot,omitempty"` // 当局轮数 Round int32 `protobuf:"varint,5,opt,name=round" json:"round,omitempty"` // 当轮下注值 RoundBet int64 `protobuf:"varint,6,opt,name=roundBet" json:"roundBet,omitempty"` // 牌局状态,0:等待,1:读秒准备中,3:进行中 Status int32 `protobuf:"varint,7,opt,name=status" json:"status,omitempty"` // 桌内玩家列表 Players []*Player `protobuf:"bytes,8,rep,name=players" json:"players,omitempty"` // 返回码 Code int32 `protobuf:"varint,9,opt,name=code" json:"code,omitempty"` }
func (*Table) Descriptor ¶
func (*Table) GetBankerSeat ¶
func (*Table) GetCallSeat ¶
func (*Table) GetJackpot ¶
func (*Table) GetPlayers ¶
func (*Table) GetRoundBet ¶
func (*Table) GetTableId ¶
func (*Table) ProtoMessage ¶
func (*Table) ProtoMessage()
type TableResult ¶
type TableResult struct { BetCoins int64 `protobuf:"varint,1,opt,name=betCoins" json:"betCoins,omitempty"` Cards []byte `protobuf:"bytes,2,opt,name=cards,proto3" json:"cards,omitempty"` CardsType int32 `protobuf:"varint,3,opt,name=cardsType" json:"cardsType,omitempty"` GreetType int32 `protobuf:"varint,4,opt,name=greetType" json:"greetType,omitempty"` }
func (*TableResult) Descriptor ¶
func (*TableResult) Descriptor() ([]byte, []int)
func (*TableResult) GetBetCoins ¶
func (m *TableResult) GetBetCoins() int64
func (*TableResult) GetCards ¶
func (m *TableResult) GetCards() []byte
func (*TableResult) GetCardsType ¶
func (m *TableResult) GetCardsType() int32
func (*TableResult) GetGreetType ¶
func (m *TableResult) GetGreetType() int32
func (*TableResult) ProtoMessage ¶
func (*TableResult) ProtoMessage()
func (*TableResult) Reset ¶
func (m *TableResult) Reset()
func (*TableResult) String ¶
func (m *TableResult) String() string
Click to show internal directories.
Click to hide internal directories.