Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
- type Action
- type ActionRequest
- func (*ActionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ActionRequest) GetBetSoFar() uint64
- func (x *ActionRequest) GetBetToPlayer() uint64
- func (x *ActionRequest) GetFlop() []*Card
- func (x *ActionRequest) GetHoleCards() []*Card
- func (x *ActionRequest) GetMinRaise() uint64
- func (x *ActionRequest) GetPlayers() []*Player
- func (x *ActionRequest) GetPots() []*Pot
- func (x *ActionRequest) GetRiver() *Card
- func (x *ActionRequest) GetTurn() *Card
- func (*ActionRequest) ProtoMessage()
- func (x *ActionRequest) ProtoReflect() protoreflect.Message
- func (x *ActionRequest) Reset()
- func (x *ActionRequest) String() string
- type ActionResponse
- func (*ActionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ActionResponse) GetAction() Action
- func (x *ActionResponse) GetAmount() uint64
- func (*ActionResponse) ProtoMessage()
- func (x *ActionResponse) ProtoReflect() protoreflect.Message
- func (x *ActionResponse) Reset()
- func (x *ActionResponse) String() string
- type Card
- type Empty
- type Player
- func (*Player) Descriptor() ([]byte, []int)deprecated
- func (x *Player) GetBank() uint64
- func (x *Player) GetBetSoFar() uint64
- func (x *Player) GetGuid() string
- func (x *Player) GetName() string
- func (x *Player) GetState() State
- func (*Player) ProtoMessage()
- func (x *Player) ProtoReflect() protoreflect.Message
- func (x *Player) Reset()
- func (x *Player) String() string
- type PluginClient
- type PluginServer
- type Pot
- type Rank
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetDecisionTimeoutSeconds() uint64
- func (x *RegisterRequest) GetPlayerGuid() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type State
- type Suit
- type UnimplementedPluginServer
- type UnsafePluginServer
Constants ¶
const ( Plugin_Register_FullMethodName = "/pb.Plugin/Register" Plugin_Action_FullMethodName = "/pb.Plugin/Action" )
Variables ¶
var ( Rank_name = map[int32]string{ 0: "UNKNOWN_Rank", 1: "AceLow", 2: "Two", 3: "Three", 4: "Four", 5: "Five", 6: "Six", 7: "Severn", 8: "Eight", 9: "Nine", 10: "Ten", 11: "Jack", 12: "Queen", 13: "King", 14: "Ace", } Rank_value = map[string]int32{ "UNKNOWN_Rank": 0, "AceLow": 1, "Two": 2, "Three": 3, "Four": 4, "Five": 5, "Six": 6, "Severn": 7, "Eight": 8, "Nine": 9, "Ten": 10, "Jack": 11, "Queen": 12, "King": 13, "Ace": 14, } )
Enum value maps for Rank.
var ( Suit_name = map[int32]string{ 0: "UNKNOWN_Suit", 1: "Spades", 2: "Dimonds", 3: "Clubs", 4: "Hearts", } Suit_value = map[string]int32{ "UNKNOWN_Suit": 0, "Spades": 1, "Dimonds": 2, "Clubs": 3, "Hearts": 4, } )
Enum value maps for Suit.
var ( State_name = map[int32]string{ 0: "UNKNOWN_State", 1: "Active", 2: "Folded", 3: "Called", } State_value = map[string]int32{ "UNKNOWN_State": 0, "Active": 1, "Folded": 2, "Called": 3, } )
Enum value maps for State.
var ( Action_name = map[int32]string{ 0: "UNKNOWN_Action", 1: "Fold", 2: "Bet", } Action_value = map[string]int32{ "UNKNOWN_Action": 0, "Fold": 1, "Bet": 2, } )
Enum value maps for Action.
var File_poker_proto protoreflect.FileDescriptor
var Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Plugin", HandlerType: (*PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _Plugin_Register_Handler, }, { MethodName: "Action", Handler: _Plugin_Action_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "poker.proto", }
Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPluginServer ¶
func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)
Types ¶
type Action ¶
type Action int32
func (Action) Descriptor ¶
func (Action) Descriptor() protoreflect.EnumDescriptor
func (Action) EnumDescriptor
deprecated
func (Action) Number ¶
func (x Action) Number() protoreflect.EnumNumber
func (Action) Type ¶
func (Action) Type() protoreflect.EnumType
type ActionRequest ¶
type ActionRequest struct { // Players at the table Players []*Player `protobuf:"bytes,1,rep,name=players,proto3" json:"players,omitempty"` // Cards on the board inc player's hole cards HoleCards []*Card `protobuf:"bytes,2,rep,name=hole_cards,json=holeCards,proto3" json:"hole_cards,omitempty"` Flop []*Card `protobuf:"bytes,3,rep,name=flop,proto3" json:"flop,omitempty"` Turn *Card `protobuf:"bytes,4,opt,name=turn,proto3" json:"turn,omitempty"` River *Card `protobuf:"bytes,5,opt,name=river,proto3" json:"river,omitempty"` // Chips on the table Pots []*Pot `protobuf:"bytes,6,rep,name=pots,proto3" json:"pots,omitempty"` BetSoFar uint64 `protobuf:"varint,7,opt,name=bet_so_far,json=betSoFar,proto3" json:"bet_so_far,omitempty"` BetToPlayer uint64 `protobuf:"varint,8,opt,name=bet_to_player,json=betToPlayer,proto3" json:"bet_to_player,omitempty"` MinRaise uint64 `protobuf:"varint,9,opt,name=min_raise,json=minRaise,proto3" json:"min_raise,omitempty"` // contains filtered or unexported fields }
func (*ActionRequest) Descriptor
deprecated
func (*ActionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ActionRequest.ProtoReflect.Descriptor instead.
func (*ActionRequest) GetBetSoFar ¶
func (x *ActionRequest) GetBetSoFar() uint64
func (*ActionRequest) GetBetToPlayer ¶
func (x *ActionRequest) GetBetToPlayer() uint64
func (*ActionRequest) GetFlop ¶
func (x *ActionRequest) GetFlop() []*Card
func (*ActionRequest) GetHoleCards ¶
func (x *ActionRequest) GetHoleCards() []*Card
func (*ActionRequest) GetMinRaise ¶
func (x *ActionRequest) GetMinRaise() uint64
func (*ActionRequest) GetPlayers ¶
func (x *ActionRequest) GetPlayers() []*Player
func (*ActionRequest) GetPots ¶
func (x *ActionRequest) GetPots() []*Pot
func (*ActionRequest) GetRiver ¶
func (x *ActionRequest) GetRiver() *Card
func (*ActionRequest) GetTurn ¶
func (x *ActionRequest) GetTurn() *Card
func (*ActionRequest) ProtoMessage ¶
func (*ActionRequest) ProtoMessage()
func (*ActionRequest) ProtoReflect ¶
func (x *ActionRequest) ProtoReflect() protoreflect.Message
func (*ActionRequest) Reset ¶
func (x *ActionRequest) Reset()
func (*ActionRequest) String ¶
func (x *ActionRequest) String() string
type ActionResponse ¶
type ActionResponse struct { Action Action `protobuf:"varint,1,opt,name=action,proto3,enum=pb.Action" json:"action,omitempty"` Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*ActionResponse) Descriptor
deprecated
func (*ActionResponse) Descriptor() ([]byte, []int)
Deprecated: Use ActionResponse.ProtoReflect.Descriptor instead.
func (*ActionResponse) GetAction ¶
func (x *ActionResponse) GetAction() Action
func (*ActionResponse) GetAmount ¶
func (x *ActionResponse) GetAmount() uint64
func (*ActionResponse) ProtoMessage ¶
func (*ActionResponse) ProtoMessage()
func (*ActionResponse) ProtoReflect ¶
func (x *ActionResponse) ProtoReflect() protoreflect.Message
func (*ActionResponse) Reset ¶
func (x *ActionResponse) Reset()
func (*ActionResponse) String ¶
func (x *ActionResponse) String() string
type Card ¶
type Card struct { Rank Rank `protobuf:"varint,1,opt,name=rank,proto3,enum=pb.Rank" json:"rank,omitempty"` Suit Suit `protobuf:"varint,2,opt,name=suit,proto3,enum=pb.Suit" json:"suit,omitempty"` // contains filtered or unexported fields }
func (*Card) Descriptor
deprecated
func (*Card) ProtoMessage ¶
func (*Card) ProtoMessage()
func (*Card) ProtoReflect ¶
func (x *Card) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Player ¶
type Player struct { Guid string `protobuf:"bytes,1,opt,name=guid,proto3" json:"guid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` State State `protobuf:"varint,3,opt,name=state,proto3,enum=pb.State" json:"state,omitempty"` Bank uint64 `protobuf:"varint,4,opt,name=bank,proto3" json:"bank,omitempty"` BetSoFar uint64 `protobuf:"varint,5,opt,name=bet_so_far,json=betSoFar,proto3" json:"bet_so_far,omitempty"` // contains filtered or unexported fields }
func (*Player) Descriptor
deprecated
func (*Player) GetBetSoFar ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
func (*Player) ProtoReflect ¶
func (x *Player) ProtoReflect() protoreflect.Message
type PluginClient ¶
type PluginClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Action(ctx context.Context, in *ActionRequest, opts ...grpc.CallOption) (*ActionResponse, error) }
PluginClient is the client API for Plugin 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 NewPluginClient ¶
func NewPluginClient(cc grpc.ClientConnInterface) PluginClient
type PluginServer ¶
type PluginServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Action(context.Context, *ActionRequest) (*ActionResponse, error) // contains filtered or unexported methods }
PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility
type Pot ¶
type Pot struct { Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` Players []string `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` // contains filtered or unexported fields }
func (*Pot) Descriptor
deprecated
func (*Pot) GetPlayers ¶
func (*Pot) ProtoMessage ¶
func (*Pot) ProtoMessage()
func (*Pot) ProtoReflect ¶
func (x *Pot) ProtoReflect() protoreflect.Message
type Rank ¶
type Rank int32
const ( Rank_UNKNOWN_Rank Rank = 0 Rank_AceLow Rank = 1 Rank_Two Rank = 2 Rank_Three Rank = 3 Rank_Four Rank = 4 Rank_Five Rank = 5 Rank_Six Rank = 6 Rank_Severn Rank = 7 Rank_Eight Rank = 8 Rank_Nine Rank = 9 Rank_Ten Rank = 10 Rank_Jack Rank = 11 Rank_Queen Rank = 12 Rank_King Rank = 13 Rank_Ace Rank = 14 )
func (Rank) Descriptor ¶
func (Rank) Descriptor() protoreflect.EnumDescriptor
func (Rank) EnumDescriptor
deprecated
func (Rank) Number ¶
func (x Rank) Number() protoreflect.EnumNumber
func (Rank) Type ¶
func (Rank) Type() protoreflect.EnumType
type RegisterRequest ¶
type RegisterRequest struct { PlayerGuid string `protobuf:"bytes,1,opt,name=player_guid,json=playerGuid,proto3" json:"player_guid,omitempty"` DecisionTimeoutSeconds uint64 `` /* 130-byte string literal not displayed */ // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetDecisionTimeoutSeconds ¶
func (x *RegisterRequest) GetDecisionTimeoutSeconds() uint64
func (*RegisterRequest) GetPlayerGuid ¶
func (x *RegisterRequest) GetPlayerGuid() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { BotName string `protobuf:"bytes,1,opt,name=bot_name,json=botName,proto3" json:"bot_name,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetBotName ¶
func (x *RegisterResponse) GetBotName() string
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type State ¶
type State int32
func (State) Descriptor ¶
func (State) Descriptor() protoreflect.EnumDescriptor
func (State) EnumDescriptor
deprecated
func (State) Number ¶
func (x State) Number() protoreflect.EnumNumber
func (State) Type ¶
func (State) Type() protoreflect.EnumType
type Suit ¶
type Suit int32
func (Suit) Descriptor ¶
func (Suit) Descriptor() protoreflect.EnumDescriptor
func (Suit) EnumDescriptor
deprecated
func (Suit) Number ¶
func (x Suit) Number() protoreflect.EnumNumber
func (Suit) Type ¶
func (Suit) Type() protoreflect.EnumType
type UnimplementedPluginServer ¶
type UnimplementedPluginServer struct { }
UnimplementedPluginServer must be embedded to have forward compatible implementations.
func (UnimplementedPluginServer) Action ¶
func (UnimplementedPluginServer) Action(context.Context, *ActionRequest) (*ActionResponse, error)
func (UnimplementedPluginServer) Register ¶
func (UnimplementedPluginServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
type UnsafePluginServer ¶
type UnsafePluginServer interface {
// contains filtered or unexported methods
}
UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.