proto

package
v0.0.0-...-6b9ac5a Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Dice) GetChart

func (m *Dice) GetChart() []byte

func (*Dice) GetColor

func (m *Dice) GetColor() string

func (*Dice) GetCount

func (m *Dice) GetCount() int64

func (*Dice) GetDropHighest

func (m *Dice) GetDropHighest() int64

func (*Dice) GetDropLowest

func (m *Dice) GetDropLowest() int64

func (*Dice) GetFaces

func (m *Dice) GetFaces() []int64

func (*Dice) GetMax

func (m *Dice) GetMax() int64

func (*Dice) GetMin

func (m *Dice) GetMin() int64

func (*Dice) GetProbabilities

func (m *Dice) GetProbabilities() map[int64]float64

func (*Dice) GetSides

func (m *Dice) GetSides() int64

func (*Dice) GetTotal

func (m *Dice) GetTotal() int64

func (*Dice) ProtoMessage

func (*Dice) ProtoMessage()

func (*Dice) Reset

func (m *Dice) Reset()

func (*Dice) String

func (m *Dice) String() string

func (*Dice) XXX_DiscardUnknown

func (m *Dice) XXX_DiscardUnknown()

func (*Dice) XXX_Marshal

func (m *Dice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Dice) XXX_Merge

func (m *Dice) XXX_Merge(src proto.Message)

func (*Dice) XXX_Size

func (m *Dice) XXX_Size() int

func (*Dice) XXX_Unmarshal

func (m *Dice) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*DiceSet) GetDice

func (m *DiceSet) GetDice() []*Dice

func (*DiceSet) GetReString

func (m *DiceSet) GetReString() string

func (*DiceSet) GetTotal

func (m *DiceSet) GetTotal() int64

func (*DiceSet) GetTotalsByColor

func (m *DiceSet) GetTotalsByColor() map[string]float64

func (*DiceSet) ProtoMessage

func (*DiceSet) ProtoMessage()

func (*DiceSet) Reset

func (m *DiceSet) Reset()

func (*DiceSet) String

func (m *DiceSet) String() string

func (*DiceSet) XXX_DiscardUnknown

func (m *DiceSet) XXX_DiscardUnknown()

func (*DiceSet) XXX_Marshal

func (m *DiceSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DiceSet) XXX_Merge

func (m *DiceSet) XXX_Merge(src proto.Message)

func (*DiceSet) XXX_Size

func (m *DiceSet) XXX_Size() int

func (*DiceSet) XXX_Unmarshal

func (m *DiceSet) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*DiceSets) GetDiceSet

func (m *DiceSets) GetDiceSet() []*DiceSet

func (*DiceSets) ProtoMessage

func (*DiceSets) ProtoMessage()

func (*DiceSets) Reset

func (m *DiceSets) Reset()

func (*DiceSets) String

func (m *DiceSets) String() string

func (*DiceSets) XXX_DiscardUnknown

func (m *DiceSets) XXX_DiscardUnknown()

func (*DiceSets) XXX_Marshal

func (m *DiceSets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DiceSets) XXX_Merge

func (m *DiceSets) XXX_Merge(src proto.Message)

func (*DiceSets) XXX_Size

func (m *DiceSets) XXX_Size() int

func (*DiceSets) XXX_Unmarshal

func (m *DiceSets) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*RollError) GetCode

func (m *RollError) GetCode() int32

func (*RollError) GetMsg

func (m *RollError) GetMsg() string

func (*RollError) ProtoMessage

func (*RollError) ProtoMessage()

func (*RollError) Reset

func (m *RollError) Reset()

func (*RollError) String

func (m *RollError) String() string

func (*RollError) XXX_DiscardUnknown

func (m *RollError) XXX_DiscardUnknown()

func (*RollError) XXX_Marshal

func (m *RollError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RollError) XXX_Merge

func (m *RollError) XXX_Merge(src proto.Message)

func (*RollError) XXX_Size

func (m *RollError) XXX_Size() int

func (*RollError) XXX_Unmarshal

func (m *RollError) XXX_Unmarshal(b []byte) error

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.

Jump to

Keyboard shortcuts

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