Documentation ¶
Index ¶
- func RegisterRollerServer(s *grpc.Server, srv RollerServer)
- type Dice
- func (*Dice) Descriptor() ([]byte, []int)
- func (m *Dice) GetChart() []byte
- func (m *Dice) GetColor() string
- func (m *Dice) GetCount() int64
- func (m *Dice) GetDropHighest() int64
- func (m *Dice) GetDropLowest() int64
- func (m *Dice) GetFaces() []int64
- func (m *Dice) GetMax() int64
- func (m *Dice) GetMin() int64
- func (m *Dice) GetProbabilities() map[int64]float64
- func (m *Dice) GetSides() int64
- func (m *Dice) GetTotal() int64
- func (*Dice) ProtoMessage()
- func (m *Dice) Reset()
- func (m *Dice) String() string
- func (m *Dice) XXX_DiscardUnknown()
- func (m *Dice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Dice) XXX_Merge(src proto.Message)
- func (m *Dice) XXX_Size() int
- func (m *Dice) XXX_Unmarshal(b []byte) error
- type DiceSet
- func (*DiceSet) Descriptor() ([]byte, []int)
- func (m *DiceSet) GetDice() []*Dice
- func (m *DiceSet) GetReString() string
- func (m *DiceSet) GetTotal() int64
- func (m *DiceSet) GetTotalsByColor() map[string]float64
- func (*DiceSet) ProtoMessage()
- func (m *DiceSet) Reset()
- func (m *DiceSet) String() string
- func (m *DiceSet) XXX_DiscardUnknown()
- func (m *DiceSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DiceSet) XXX_Merge(src proto.Message)
- func (m *DiceSet) XXX_Size() int
- func (m *DiceSet) XXX_Unmarshal(b []byte) error
- type DiceSets
- func (*DiceSets) Descriptor() ([]byte, []int)
- func (m *DiceSets) GetDiceSet() []*DiceSet
- func (*DiceSets) ProtoMessage()
- func (m *DiceSets) Reset()
- func (m *DiceSets) String() string
- func (m *DiceSets) XXX_DiscardUnknown()
- func (m *DiceSets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DiceSets) XXX_Merge(src proto.Message)
- func (m *DiceSets) XXX_Size() int
- func (m *DiceSets) XXX_Unmarshal(b []byte) error
- type RollError
- func (*RollError) Descriptor() ([]byte, []int)
- func (m *RollError) GetCode() int32
- func (m *RollError) GetMsg() string
- func (*RollError) ProtoMessage()
- func (m *RollError) Reset()
- func (m *RollError) String() string
- func (m *RollError) XXX_DiscardUnknown()
- func (m *RollError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RollError) XXX_Merge(src proto.Message)
- func (m *RollError) XXX_Size() int
- func (m *RollError) XXX_Unmarshal(b []byte) error
- type RollRequest
- func (*RollRequest) Descriptor() ([]byte, []int)
- func (m *RollRequest) GetChart() bool
- func (m *RollRequest) GetCmd() string
- func (m *RollRequest) GetProbabilities() bool
- func (m *RollRequest) GetRootOnly() bool
- func (*RollRequest) ProtoMessage()
- func (m *RollRequest) Reset()
- func (m *RollRequest) String() string
- func (m *RollRequest) XXX_DiscardUnknown()
- func (m *RollRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RollRequest) XXX_Merge(src proto.Message)
- func (m *RollRequest) XXX_Size() int
- func (m *RollRequest) XXX_Unmarshal(b []byte) error
- type RollResponse
- func (*RollResponse) Descriptor() ([]byte, []int)
- func (m *RollResponse) GetCmd() string
- func (m *RollResponse) GetDiceSet() *DiceSet
- func (m *RollResponse) GetDiceSets() []*DiceSet
- func (m *RollResponse) GetError() *RollError
- func (m *RollResponse) GetOk() bool
- func (*RollResponse) ProtoMessage()
- func (m *RollResponse) Reset()
- func (m *RollResponse) String() string
- func (m *RollResponse) XXX_DiscardUnknown()
- func (m *RollResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RollResponse) XXX_Merge(src proto.Message)
- func (m *RollResponse) XXX_Size() int
- func (m *RollResponse) XXX_Unmarshal(b []byte) error
- type RollerClient
- type RollerServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRollerServer ¶
func RegisterRollerServer(s *grpc.Server, srv RollerServer)
Types ¶
type Dice ¶
type Dice struct { Count int64 `protobuf:"varint,1,opt,name=Count,proto3" json:"Count,omitempty"` Sides int64 `protobuf:"varint,2,opt,name=Sides,proto3" json:"Sides,omitempty"` Total int64 `protobuf:"varint,3,opt,name=Total,proto3" json:"Total,omitempty"` Faces []int64 `protobuf:"varint,4,rep,packed,name=Faces,proto3" json:"Faces,omitempty"` Color string `protobuf:"bytes,5,opt,name=Color,proto3" json:"Color,omitempty"` Max int64 `protobuf:"varint,6,opt,name=Max,proto3" json:"Max,omitempty"` Min int64 `protobuf:"varint,7,opt,name=Min,proto3" json:"Min,omitempty"` DropHighest int64 `protobuf:"varint,8,opt,name=DropHighest,proto3" json:"DropHighest,omitempty"` DropLowest int64 `protobuf:"varint,9,opt,name=DropLowest,proto3" json:"DropLowest,omitempty"` Chart []byte `protobuf:"bytes,10,opt,name=Chart,proto3" json:"Chart,omitempty"` Probabilities map[int64]float64 `` /* 171-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Dice) Descriptor ¶
func (*Dice) GetDropHighest ¶
func (*Dice) GetDropLowest ¶
func (*Dice) GetProbabilities ¶
func (*Dice) ProtoMessage ¶
func (*Dice) ProtoMessage()
func (*Dice) XXX_DiscardUnknown ¶
func (m *Dice) XXX_DiscardUnknown()
func (*Dice) XXX_Unmarshal ¶
type DiceSet ¶
type DiceSet struct { Dice []*Dice `protobuf:"bytes,1,rep,name=Dice,proto3" json:"Dice,omitempty"` TotalsByColor map[string]float64 `` /* 169-byte string literal not displayed */ Total int64 `protobuf:"varint,3,opt,name=Total,proto3" json:"Total,omitempty"` ReString string `protobuf:"bytes,4,opt,name=ReString,proto3" json:"ReString,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DiceSet) Descriptor ¶
func (*DiceSet) GetReString ¶
func (*DiceSet) GetTotalsByColor ¶
func (*DiceSet) ProtoMessage ¶
func (*DiceSet) ProtoMessage()
func (*DiceSet) XXX_DiscardUnknown ¶
func (m *DiceSet) XXX_DiscardUnknown()
func (*DiceSet) XXX_Marshal ¶
func (*DiceSet) XXX_Unmarshal ¶
type DiceSets ¶
type DiceSets struct { DiceSet []*DiceSet `protobuf:"bytes,1,rep,name=DiceSet,proto3" json:"DiceSet,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DiceSets) Descriptor ¶
func (*DiceSets) GetDiceSet ¶
func (*DiceSets) ProtoMessage ¶
func (*DiceSets) ProtoMessage()
func (*DiceSets) XXX_DiscardUnknown ¶
func (m *DiceSets) XXX_DiscardUnknown()
func (*DiceSets) XXX_Marshal ¶
func (*DiceSets) XXX_Unmarshal ¶
type RollError ¶
type RollError struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RollError) Descriptor ¶
func (*RollError) ProtoMessage ¶
func (*RollError) ProtoMessage()
func (*RollError) XXX_DiscardUnknown ¶
func (m *RollError) XXX_DiscardUnknown()
func (*RollError) XXX_Marshal ¶
func (*RollError) XXX_Unmarshal ¶
type RollRequest ¶
type RollRequest struct { Cmd string `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` Probabilities bool `protobuf:"varint,2,opt,name=probabilities,proto3" json:"probabilities,omitempty"` Chart bool `protobuf:"varint,3,opt,name=chart,proto3" json:"chart,omitempty"` RootOnly bool `protobuf:"varint,4,opt,name=rootOnly,proto3" json:"rootOnly,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message containing the command. Input validation preformed on the server side.
func (*RollRequest) Descriptor ¶
func (*RollRequest) Descriptor() ([]byte, []int)
func (*RollRequest) GetChart ¶
func (m *RollRequest) GetChart() bool
func (*RollRequest) GetCmd ¶
func (m *RollRequest) GetCmd() string
func (*RollRequest) GetProbabilities ¶
func (m *RollRequest) GetProbabilities() bool
func (*RollRequest) GetRootOnly ¶
func (m *RollRequest) GetRootOnly() bool
func (*RollRequest) ProtoMessage ¶
func (*RollRequest) ProtoMessage()
func (*RollRequest) Reset ¶
func (m *RollRequest) Reset()
func (*RollRequest) String ¶
func (m *RollRequest) String() string
func (*RollRequest) XXX_DiscardUnknown ¶
func (m *RollRequest) XXX_DiscardUnknown()
func (*RollRequest) XXX_Marshal ¶
func (m *RollRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RollRequest) XXX_Merge ¶
func (m *RollRequest) XXX_Merge(src proto.Message)
func (*RollRequest) XXX_Size ¶
func (m *RollRequest) XXX_Size() int
func (*RollRequest) XXX_Unmarshal ¶
func (m *RollRequest) XXX_Unmarshal(b []byte) error
type RollResponse ¶
type RollResponse struct { Cmd string `protobuf:"bytes,1,opt,name=Cmd,proto3" json:"Cmd,omitempty"` DiceSet *DiceSet `protobuf:"bytes,2,opt,name=DiceSet,proto3" json:"DiceSet,omitempty"` DiceSets []*DiceSet `protobuf:"bytes,3,rep,name=DiceSets,proto3" json:"DiceSets,omitempty"` Ok bool `protobuf:"varint,4,opt,name=Ok,proto3" json:"Ok,omitempty"` Error *RollError `protobuf:"bytes,5,opt,name=Error,proto3" json:"Error,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message containing one DiceSet. If the command warrents multiple dice-sets, they will be merged
func (*RollResponse) Descriptor ¶
func (*RollResponse) Descriptor() ([]byte, []int)
func (*RollResponse) GetCmd ¶
func (m *RollResponse) GetCmd() string
func (*RollResponse) GetDiceSet ¶
func (m *RollResponse) GetDiceSet() *DiceSet
func (*RollResponse) GetDiceSets ¶
func (m *RollResponse) GetDiceSets() []*DiceSet
func (*RollResponse) GetError ¶
func (m *RollResponse) GetError() *RollError
func (*RollResponse) GetOk ¶
func (m *RollResponse) GetOk() bool
func (*RollResponse) ProtoMessage ¶
func (*RollResponse) ProtoMessage()
func (*RollResponse) Reset ¶
func (m *RollResponse) Reset()
func (*RollResponse) String ¶
func (m *RollResponse) String() string
func (*RollResponse) XXX_DiscardUnknown ¶
func (m *RollResponse) XXX_DiscardUnknown()
func (*RollResponse) XXX_Marshal ¶
func (m *RollResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RollResponse) XXX_Merge ¶
func (m *RollResponse) XXX_Merge(src proto.Message)
func (*RollResponse) XXX_Size ¶
func (m *RollResponse) XXX_Size() int
func (*RollResponse) XXX_Unmarshal ¶
func (m *RollResponse) XXX_Unmarshal(b []byte) error
type RollerClient ¶
type RollerClient interface { // Rolls dice Roll(ctx context.Context, in *RollRequest, opts ...grpc.CallOption) (*RollResponse, error) }
RollerClient is the client API for Roller service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRollerClient ¶
func NewRollerClient(cc *grpc.ClientConn) RollerClient
type RollerServer ¶
type RollerServer interface { // Rolls dice Roll(context.Context, *RollRequest) (*RollResponse, error) }
RollerServer is the server API for Roller service.
Click to show internal directories.
Click to hide internal directories.