Documentation ¶
Overview ¶
Package republique is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGameServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGameServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GameServiceClient) error
- func RegisterGameServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGameServiceServer(s *grpc.Server, srv GameServiceServer)
- type Action
- func (*Action) Descriptor() ([]byte, []int)
- func (m *Action) GetDescription() string
- func (m *Action) GetDone() bool
- func (m *Action) GetType() ActionType
- func (*Action) ProtoMessage()
- func (m *Action) Reset()
- func (m *Action) String() string
- func (m *Action) XXX_DiscardUnknown()
- func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Action) XXX_Merge(src proto.Message)
- func (m *Action) XXX_Size() int
- func (m *Action) XXX_Unmarshal(b []byte) error
- type ActionType
- type Arm
- type Arrival
- func (*Arrival) Descriptor() ([]byte, []int)
- func (m *Arrival) GetActualArrival() *timestamp.Timestamp
- func (m *Arrival) GetComputedTurn() int32
- func (m *Arrival) GetContact() bool
- func (m *Arrival) GetFrom() int32
- func (m *Arrival) GetPercent() int32
- func (m *Arrival) GetPosition() BattlefieldPosition
- func (m *Arrival) GetTo() int32
- func (*Arrival) ProtoMessage()
- func (m *Arrival) Reset()
- func (m *Arrival) String() string
- func (m *Arrival) XXX_DiscardUnknown()
- func (m *Arrival) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Arrival) XXX_Merge(src proto.Message)
- func (m *Arrival) XXX_Size() int
- func (m *Arrival) XXX_Unmarshal(b []byte) error
- type BattlefieldPosition
- type Command
- func (c *Command) AddAction(s string, done bool, t ActionType)
- func (c *Command) AddToObjective(x, y int32) []*Grid
- func (c *Command) BattleFormation() Formation
- func (c *Command) ClearActions()
- func (c *Command) ClearOrder()
- func (*Command) Descriptor() ([]byte, []int)
- func (m *Command) GetArm() Arm
- func (m *Command) GetArrival() *Arrival
- func (m *Command) GetCommandRating() CommandRating
- func (c *Command) GetCommandStrength() CommandStrength
- func (c *Command) GetCommandStrengthLabel() string
- func (m *Command) GetCommanderBonus() int32
- func (m *Command) GetCommanderName() string
- func (m *Command) GetDrill() Drill
- func (m *Command) GetGameState() *CommandGameState
- func (m *Command) GetGrade() UnitGrade
- func (m *Command) GetHistory() []*CommandGameState
- func (m *Command) GetId() int32
- func (m *Command) GetName() string
- func (m *Command) GetNationality() Nationality
- func (m *Command) GetNotes() string
- func (m *Command) GetRank() Rank
- func (m *Command) GetReserve() bool
- func (m *Command) GetSubcommands() []*Command
- func (m *Command) GetUnits() []*Unit
- func (c *Command) LabelString() string
- func (c *Command) LongDescription() string
- func (*Command) ProtoMessage()
- func (m *Command) Reset()
- func (c *Command) SetAction(s string, done bool)
- func (c *Command) SetObjective(x, y int32) []*Grid
- func (c *Command) SetOrder(order Order) bool
- func (m *Command) String() string
- func (m *Command) XXX_DiscardUnknown()
- func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Command) XXX_Merge(src proto.Message)
- func (m *Command) XXX_Size() int
- func (m *Command) XXX_Unmarshal(b []byte) error
- type CommandGameState
- func (*CommandGameState) Descriptor() ([]byte, []int)
- func (m *CommandGameState) GetActions() []*Action
- func (m *CommandGameState) GetAttachedTo() string
- func (m *CommandGameState) GetCan() *UnitAction
- func (m *CommandGameState) GetFormation() Formation
- func (m *CommandGameState) GetGrid() *Grid
- func (m *CommandGameState) GetHas() *UnitAction
- func (m *CommandGameState) GetInjured() bool
- func (m *CommandGameState) GetMust() *UnitAction
- func (m *CommandGameState) GetObjective() []*Grid
- func (m *CommandGameState) GetObjectiveName() string
- func (m *CommandGameState) GetOrders() Order
- func (m *CommandGameState) GetPanicState() int32
- func (m *CommandGameState) GetPosition() BattlefieldPosition
- func (m *CommandGameState) GetTimestamp() *timestamp.Timestamp
- func (m *CommandGameState) GetTurn() int32
- func (*CommandGameState) ProtoMessage()
- func (m *CommandGameState) Reset()
- func (m *CommandGameState) String() string
- func (m *CommandGameState) XXX_DiscardUnknown()
- func (m *CommandGameState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CommandGameState) XXX_Merge(src proto.Message)
- func (m *CommandGameState) XXX_Size() int
- func (m *CommandGameState) XXX_Unmarshal(b []byte) error
- type CommandRating
- type CommandStrength
- type Drill
- type EmptyMessage
- func (*EmptyMessage) Descriptor() ([]byte, []int)
- func (*EmptyMessage) ProtoMessage()
- func (m *EmptyMessage) Reset()
- func (m *EmptyMessage) String() string
- func (m *EmptyMessage) XXX_DiscardUnknown()
- func (m *EmptyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyMessage) XXX_Merge(src proto.Message)
- func (m *EmptyMessage) XXX_Size() int
- func (m *EmptyMessage) XXX_Unmarshal(b []byte) error
- type Formation
- type Game
- func (*Game) Descriptor() ([]byte, []int)
- func (g *Game) GenerateIDs()
- func (m *Game) GetAdminAccess() string
- func (m *Game) GetGameTime() *timestamp.Timestamp
- func (m *Game) GetName() string
- func (m *Game) GetPhase() Phase
- func (m *Game) GetScenario() *Scenario
- func (m *Game) GetTableLayout() string
- func (m *Game) GetTableX() int32
- func (m *Game) GetTableY() int32
- func (g *Game) GetTeam(p *Player) *Team
- func (m *Game) GetTurnNumber() int32
- func (g *Game) GetUnitCommander(id int32) *Command
- func (g *Game) InitGameState()
- func (*Game) ProtoMessage()
- func (m *Game) Reset()
- func (m *Game) String() string
- func (m *Game) XXX_DiscardUnknown()
- func (m *Game) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Game) XXX_Merge(src proto.Message)
- func (m *Game) XXX_Size() int
- func (m *Game) XXX_Unmarshal(b []byte) error
- type GameServiceClient
- type GameServiceServer
- type GameTimeResponse
- func (*GameTimeResponse) Descriptor() ([]byte, []int)
- func (m *GameTimeResponse) GetGameTime() *timestamp.Timestamp
- func (m *GameTimeResponse) GetPhase() Phase
- func (m *GameTimeResponse) GetStopWatch() int64
- func (*GameTimeResponse) ProtoMessage()
- func (m *GameTimeResponse) Reset()
- func (m *GameTimeResponse) String() string
- func (m *GameTimeResponse) XXX_DiscardUnknown()
- func (m *GameTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GameTimeResponse) XXX_Merge(src proto.Message)
- func (m *GameTimeResponse) XXX_Size() int
- func (m *GameTimeResponse) XXX_Unmarshal(b []byte) error
- type Grid
- func (*Grid) Descriptor() ([]byte, []int)
- func (m *Grid) GetBua() bool
- func (m *Grid) GetCover() bool
- func (m *Grid) GetFort() bool
- func (m *Grid) GetWoods() bool
- func (m *Grid) GetX() int32
- func (m *Grid) GetY() int32
- func (*Grid) ProtoMessage()
- func (m *Grid) Reset()
- func (m *Grid) String() string
- func (m *Grid) XXX_DiscardUnknown()
- func (m *Grid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Grid) XXX_Merge(src proto.Message)
- func (m *Grid) XXX_Size() int
- func (m *Grid) XXX_Unmarshal(b []byte) error
- type LoginMessage
- func (*LoginMessage) Descriptor() ([]byte, []int)
- func (m *LoginMessage) GetHash() []byte
- func (m *LoginMessage) GetPlayerCode() string
- func (m *LoginMessage) GetTeamCode() string
- func (*LoginMessage) ProtoMessage()
- func (m *LoginMessage) Reset()
- func (m *LoginMessage) String() string
- func (m *LoginMessage) XXX_DiscardUnknown()
- func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginMessage) XXX_Merge(src proto.Message)
- func (m *LoginMessage) XXX_Size() int
- func (m *LoginMessage) XXX_Unmarshal(b []byte) error
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)
- func (m *LoginResponse) GetBriefing() string
- func (m *LoginResponse) GetCommanders() []string
- func (m *LoginResponse) GetGameName() string
- func (m *LoginResponse) GetGameTime() *timestamp.Timestamp
- func (m *LoginResponse) GetTeamName() string
- func (m *LoginResponse) GetToken() *Token
- func (m *LoginResponse) GetWelcome() string
- func (*LoginResponse) ProtoMessage()
- func (m *LoginResponse) Reset()
- func (m *LoginResponse) String() string
- func (m *LoginResponse) XXX_DiscardUnknown()
- func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoginResponse) XXX_Merge(src proto.Message)
- func (m *LoginResponse) XXX_Size() int
- func (m *LoginResponse) XXX_Unmarshal(b []byte) error
- type MapData
- func (*MapData) Descriptor() ([]byte, []int)
- func (m *MapData) GetData() string
- func (m *MapData) GetSide() MapSide
- func (m *MapData) GetValue(x, y int32) byte
- func (m *MapData) GetWaypoints(command *Command) []Waypoint
- func (m *MapData) GetX() int32
- func (m *MapData) GetY() int32
- func (*MapData) ProtoMessage()
- func (m *MapData) Reset()
- func (m *MapData) String() string
- func (m *MapData) XXX_DiscardUnknown()
- func (m *MapData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MapData) XXX_Merge(src proto.Message)
- func (m *MapData) XXX_Size() int
- func (m *MapData) XXX_Unmarshal(b []byte) error
- type MapSide
- type MoraleState
- type Nationality
- type Order
- type Phase
- type Player
- func (*Player) Descriptor() ([]byte, []int)
- func (m *Player) GetAccessCode() string
- func (m *Player) GetCommanders() []string
- func (m *Player) GetPoints() int32
- func (m *Player) GetToken() *Token
- func (*Player) ProtoMessage()
- func (m *Player) Reset()
- func (m *Player) String() string
- func (m *Player) XXX_DiscardUnknown()
- func (m *Player) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Player) XXX_Merge(src proto.Message)
- func (m *Player) XXX_Size() int
- func (m *Player) XXX_Unmarshal(b []byte) error
- type Rank
- type Scenario
- func (*Scenario) Descriptor() ([]byte, []int)
- func (m *Scenario) GetStartTime() *timestamp.Timestamp
- func (m *Scenario) GetTeams() map[string]*Team
- func (*Scenario) ProtoMessage()
- func (m *Scenario) Reset()
- func (m *Scenario) String() string
- func (m *Scenario) XXX_DiscardUnknown()
- func (m *Scenario) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Scenario) XXX_Merge(src proto.Message)
- func (m *Scenario) XXX_Size() int
- func (m *Scenario) XXX_Unmarshal(b []byte) error
- type SkirmishRating
- type StringMessage
- func (*StringMessage) Descriptor() ([]byte, []int)
- func (m *StringMessage) GetValue() string
- func (*StringMessage) ProtoMessage()
- func (m *StringMessage) Reset()
- func (m *StringMessage) String() string
- func (m *StringMessage) XXX_DiscardUnknown()
- func (m *StringMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StringMessage) XXX_Merge(src proto.Message)
- func (m *StringMessage) XXX_Size() int
- func (m *StringMessage) XXX_Unmarshal(b []byte) error
- type Team
- func (*Team) Descriptor() ([]byte, []int)
- func (m *Team) GetAccessCode() string
- func (m *Team) GetBriefing() string
- func (t *Team) GetCommandByCommanderName(name string) *Command
- func (t *Team) GetCommandByID(id int32) *Command
- func (t *Team) GetCommandByName(name string) *Command
- func (m *Team) GetCommands() []*Command
- func (m *Team) GetGameName() string
- func (m *Team) GetName() string
- func (m *Team) GetPlayers() []*Player
- func (m *Team) GetSide() MapSide
- func (*Team) ProtoMessage()
- func (m *Team) Reset()
- func (m *Team) String() string
- func (m *Team) XXX_DiscardUnknown()
- func (m *Team) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Team) XXX_Merge(src proto.Message)
- func (m *Team) XXX_Size() int
- func (m *Team) XXX_Unmarshal(b []byte) error
- type Token
- func (*Token) Descriptor() ([]byte, []int)
- func (m *Token) GetExpires() *timestamp.Timestamp
- func (m *Token) GetId() string
- func (*Token) ProtoMessage()
- func (m *Token) Reset()
- func (m *Token) String() string
- func (m *Token) XXX_DiscardUnknown()
- func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Token) XXX_Merge(src proto.Message)
- func (m *Token) XXX_Size() int
- func (m *Token) XXX_Unmarshal(b []byte) error
- type TokenMessage
- func (*TokenMessage) Descriptor() ([]byte, []int)
- func (m *TokenMessage) GetId() string
- func (*TokenMessage) ProtoMessage()
- func (m *TokenMessage) Reset()
- func (m *TokenMessage) String() string
- func (m *TokenMessage) XXX_DiscardUnknown()
- func (m *TokenMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TokenMessage) XXX_Merge(src proto.Message)
- func (m *TokenMessage) XXX_Size() int
- func (m *TokenMessage) XXX_Unmarshal(b []byte) error
- type UnimplementedGameServiceServer
- func (*UnimplementedGameServiceServer) GameTime(ctx context.Context, req *TokenMessage) (*GameTimeResponse, error)
- func (*UnimplementedGameServiceServer) GetEnemy(ctx context.Context, req *TokenMessage) (*Units, error)
- func (*UnimplementedGameServiceServer) GetMap(ctx context.Context, req *TokenMessage) (*MapData, error)
- func (*UnimplementedGameServiceServer) GetUnits(ctx context.Context, req *TokenMessage) (*Units, error)
- func (*UnimplementedGameServiceServer) Login(ctx context.Context, req *LoginMessage) (*LoginResponse, error)
- func (*UnimplementedGameServiceServer) Version(ctx context.Context, req *EmptyMessage) (*StringMessage, error)
- type Unit
- func (u *Unit) BattleFormation() Formation
- func (*Unit) Descriptor() ([]byte, []int)
- func (m *Unit) GetArm() Arm
- func (m *Unit) GetBnGuns() bool
- func (m *Unit) GetCommandReserve() bool
- func (m *Unit) GetDrill() Drill
- func (m *Unit) GetGameState() *UnitGameState
- func (m *Unit) GetGrade() UnitGrade
- func (m *Unit) GetHistory() []*UnitGameState
- func (m *Unit) GetId() int32
- func (m *Unit) GetName() string
- func (m *Unit) GetNationality() Nationality
- func (m *Unit) GetNotes() string
- func (u *Unit) GetSKLabel() string
- func (m *Unit) GetSkirmishRating() SkirmishRating
- func (m *Unit) GetSkirmisherMax() int32
- func (m *Unit) GetStrength() int32
- func (u *Unit) GetStrengthLabel(withSK bool) string
- func (m *Unit) GetUnitType() UnitType
- func (u *Unit) LabelString() string
- func (*Unit) ProtoMessage()
- func (m *Unit) Reset()
- func (u *Unit) ShortLabel() string
- func (m *Unit) String() string
- func (m *Unit) XXX_DiscardUnknown()
- func (m *Unit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Unit) XXX_Merge(src proto.Message)
- func (m *Unit) XXX_Size() int
- func (m *Unit) XXX_Unmarshal(b []byte) error
- type UnitAction
- func (*UnitAction) Descriptor() ([]byte, []int)
- func (m *UnitAction) GetAssault() bool
- func (m *UnitAction) GetChangeFormation() bool
- func (m *UnitAction) GetFallback() bool
- func (m *UnitAction) GetGunDeploy() bool
- func (m *UnitAction) GetGunFire() bool
- func (m *UnitAction) GetGunLimber() bool
- func (m *UnitAction) GetGunMove() bool
- func (m *UnitAction) GetMove() bool
- func (m *UnitAction) GetOrder() bool
- func (m *UnitAction) GetRally() bool
- func (m *UnitAction) GetRout() bool
- func (m *UnitAction) GetSkAttack() bool
- func (m *UnitAction) GetSkDeploy() bool
- func (m *UnitAction) GetSkRetire() bool
- func (m *UnitAction) GetWithdraw() bool
- func (*UnitAction) ProtoMessage()
- func (m *UnitAction) Reset()
- func (m *UnitAction) String() string
- func (m *UnitAction) XXX_DiscardUnknown()
- func (m *UnitAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UnitAction) XXX_Merge(src proto.Message)
- func (m *UnitAction) XXX_Size() int
- func (m *UnitAction) XXX_Unmarshal(b []byte) error
- type UnitGameState
- func (*UnitGameState) Descriptor() ([]byte, []int)
- func (m *UnitGameState) GetActionRequired() bool
- func (m *UnitGameState) GetCan() *UnitAction
- func (m *UnitGameState) GetCover() int32
- func (m *UnitGameState) GetEngagedUnit() string
- func (m *UnitGameState) GetFatigue() int32
- func (m *UnitGameState) GetFormation() Formation
- func (m *UnitGameState) GetGrid() *Grid
- func (m *UnitGameState) GetGunTarget() *Grid
- func (m *UnitGameState) GetGunsDamaged() bool
- func (m *UnitGameState) GetGunsDeployed() bool
- func (m *UnitGameState) GetGunsStocked() bool
- func (m *UnitGameState) GetHas() *UnitAction
- func (m *UnitGameState) GetHasFired() bool
- func (m *UnitGameState) GetHidden() bool
- func (m *UnitGameState) GetHits() int32
- func (m *UnitGameState) GetLowAmmo() bool
- func (m *UnitGameState) GetMoraleState() MoraleState
- func (m *UnitGameState) GetMoveTo() *Grid
- func (m *UnitGameState) GetMust() *UnitAction
- func (m *UnitGameState) GetObjective() *Grid
- func (m *UnitGameState) GetPlayerInstructions() string
- func (m *UnitGameState) GetSkirmishersDeployed() int32
- func (m *UnitGameState) GetSupportingUnit() string
- func (*UnitGameState) ProtoMessage()
- func (m *UnitGameState) Reset()
- func (m *UnitGameState) String() string
- func (m *UnitGameState) XXX_DiscardUnknown()
- func (m *UnitGameState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UnitGameState) XXX_Merge(src proto.Message)
- func (m *UnitGameState) XXX_Size() int
- func (m *UnitGameState) XXX_Unmarshal(b []byte) error
- type UnitGrade
- type UnitType
- type Units
- func (*Units) Descriptor() ([]byte, []int)
- func (m *Units) GetCommands() []*Command
- func (*Units) ProtoMessage()
- func (m *Units) Reset()
- func (m *Units) String() string
- func (m *Units) XXX_DiscardUnknown()
- func (m *Units) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Units) XXX_Merge(src proto.Message)
- func (m *Units) XXX_Size() int
- func (m *Units) XXX_Unmarshal(b []byte) error
- type Waypoint
Constants ¶
This section is empty.
Variables ¶
var ActionType_name = map[int32]string{
0: "COMMENT",
1: "OPTIONAL",
2: "MUST_TICK",
}
var ActionType_value = map[string]int32{
"COMMENT": 0,
"OPTIONAL": 1,
"MUST_TICK": 2,
}
var Arm_name = map[int32]string{
0: "SUPPORT",
1: "INFANTRY",
2: "CAVALRY",
3: "ARTILLERY",
4: "COMMAND",
}
var Arm_value = map[string]int32{
"SUPPORT": 0,
"INFANTRY": 1,
"CAVALRY": 2,
"ARTILLERY": 3,
"COMMAND": 4,
}
var BattlefieldPosition_name = map[int32]string{
0: "REAR",
1: "LEFT",
2: "CENTRE",
3: "RIGHT",
4: "OFF_BOARD",
}
var BattlefieldPosition_value = map[string]int32{
"REAR": 0,
"LEFT": 1,
"CENTRE": 2,
"RIGHT": 3,
"OFF_BOARD": 4,
}
var CommandRating_name = map[int32]string{
0: "USELESS",
1: "CUMBERSOME",
2: "FUNCTIONAL",
3: "EFFICIENT",
}
var CommandRating_value = map[string]int32{
"USELESS": 0,
"CUMBERSOME": 1,
"FUNCTIONAL": 2,
"EFFICIENT": 3,
}
var Drill_name = map[int32]string{
0: "LINEAR",
1: "MASSED",
2: "RAPID",
}
var Drill_value = map[string]int32{
"LINEAR": 0,
"MASSED": 1,
"RAPID": 2,
}
var Formation_name = map[int32]string{
0: "RESERVE",
1: "MARCH_COLUMN",
2: "ATTACK_COLUMN",
3: "CLOSED_COLUMN",
4: "LINE",
5: "ECHELON",
6: "SUPPORTING_LINES",
7: "DEBANDE",
8: "FORTIFIED",
9: "COLUMN",
10: "DOUBLE_LINE",
}
var Formation_value = map[string]int32{
"RESERVE": 0,
"MARCH_COLUMN": 1,
"ATTACK_COLUMN": 2,
"CLOSED_COLUMN": 3,
"LINE": 4,
"ECHELON": 5,
"SUPPORTING_LINES": 6,
"DEBANDE": 7,
"FORTIFIED": 8,
"COLUMN": 9,
"DOUBLE_LINE": 10,
}
var MapSide_name = map[int32]string{
0: "FRONT",
1: "LEFT_FLANK",
2: "RIGHT_FLANK",
3: "TOP",
}
var MapSide_value = map[string]int32{
"FRONT": 0,
"LEFT_FLANK": 1,
"RIGHT_FLANK": 2,
"TOP": 3,
}
var MoraleState_name = map[int32]string{
0: "RESTING",
1: "GOOD",
2: "UNFORMED",
3: "RATTLED",
4: "SHAKEN",
5: "DEMORALISED",
}
var MoraleState_value = map[string]int32{
"RESTING": 0,
"GOOD": 1,
"UNFORMED": 2,
"RATTLED": 3,
"SHAKEN": 4,
"DEMORALISED": 5,
}
var Nationality_name = map[int32]string{
0: "ANY_NATION",
1: "FRENCH",
2: "BRITISH",
3: "RUSSIAN",
4: "PRUSSIAN",
6: "SPANISH",
7: "OTTOMAN",
8: "PERSIAN",
9: "AUSTRIAN",
10: "AMERICAN",
11: "INDIAN",
12: "ITALIAN",
13: "BAVARIAN",
14: "DUTCH",
15: "BELGIAN",
16: "NASSAU",
17: "SWISS",
18: "PAPAL_STATES",
19: "AFRICAN",
20: "NATIVE",
21: "COLONIAL",
22: "SWEDEN",
}
var Nationality_value = map[string]int32{
"ANY_NATION": 0,
"FRENCH": 1,
"BRITISH": 2,
"RUSSIAN": 3,
"PRUSSIAN": 4,
"SPANISH": 6,
"OTTOMAN": 7,
"PERSIAN": 8,
"AUSTRIAN": 9,
"AMERICAN": 10,
"INDIAN": 11,
"ITALIAN": 12,
"BAVARIAN": 13,
"DUTCH": 14,
"BELGIAN": 15,
"NASSAU": 16,
"SWISS": 17,
"PAPAL_STATES": 18,
"AFRICAN": 19,
"NATIVE": 20,
"COLONIAL": 21,
"SWEDEN": 22,
}
var Order_name = map[int32]string{
0: "NO_ORDERS",
1: "MARCH",
2: "MOVE",
3: "DEFEND",
4: "WITHDRAW",
5: "ATTACK",
6: "RALLY",
7: "ENGAGE",
8: "PURSUIT",
9: "ADVANCE",
10: "CHARGE",
11: "FIRE",
12: "RESTAGE",
}
var Order_value = map[string]int32{
"NO_ORDERS": 0,
"MARCH": 1,
"MOVE": 2,
"DEFEND": 3,
"WITHDRAW": 4,
"ATTACK": 5,
"RALLY": 6,
"ENGAGE": 7,
"PURSUIT": 8,
"ADVANCE": 9,
"CHARGE": 10,
"FIRE": 11,
"RESTAGE": 12,
}
var Phase_name = map[int32]string{
0: "PREGAME",
1: "LEADERS",
2: "MOVEMENT1",
3: "FIRING1",
4: "ASSAULT1",
5: "PANIC1",
6: "MOVEMENT2",
7: "FIRING2",
8: "ASSAULT2",
9: "PANIC2",
}
var Phase_value = map[string]int32{
"PREGAME": 0,
"LEADERS": 1,
"MOVEMENT1": 2,
"FIRING1": 3,
"ASSAULT1": 4,
"PANIC1": 5,
"MOVEMENT2": 6,
"FIRING2": 7,
"ASSAULT2": 8,
"PANIC2": 9,
}
var Rank_name = map[int32]string{
0: "BATTALION",
1: "BRIGADE",
2: "DIVISION",
3: "CORPS",
4: "WING",
5: "ARMY",
6: "NATIONAL_LEADER",
7: "ARTILLERY_DIV",
8: "CAVALRY_BDE",
9: "CAVALRY_DIV",
10: "BATTERY",
11: "GUN_PARK",
}
var Rank_value = map[string]int32{
"BATTALION": 0,
"BRIGADE": 1,
"DIVISION": 2,
"CORPS": 3,
"WING": 4,
"ARMY": 5,
"NATIONAL_LEADER": 6,
"ARTILLERY_DIV": 7,
"CAVALRY_BDE": 8,
"CAVALRY_DIV": 9,
"BATTERY": 10,
"GUN_PARK": 11,
}
var SkirmishRating_name = map[int32]string{
0: "POOR",
1: "ADEQUATE",
2: "CRACK_SHOT",
3: "EXCELLENT",
}
var SkirmishRating_value = map[string]int32{
"POOR": 0,
"ADEQUATE": 1,
"CRACK_SHOT": 2,
"EXCELLENT": 3,
}
var UnitGrade_name = map[int32]string{
0: "CIVILIAN",
1: "MILITIA",
2: "CONSCRIPT",
3: "REGULAR",
4: "VETERAN",
5: "ELITE",
6: "GUARD",
}
var UnitGrade_value = map[string]int32{
"CIVILIAN": 0,
"MILITIA": 1,
"CONSCRIPT": 2,
"REGULAR": 3,
"VETERAN": 4,
"ELITE": 5,
"GUARD": 6,
}
var UnitType_name = map[int32]string{
0: "SUPPORT_UNIT",
1: "INFANTRY_LINE",
2: "INFANTRY_LIGHT",
3: "INFANTRY_GRENADIER",
4: "INFANTRY_IRREGULAR",
5: "INFANTRY_RIFLES",
6: "CAVALRY_LIGHT",
7: "CAVALRY_HUSSAR",
8: "CAVALRY_DRAGOON",
9: "CAVALRY_CUIRASSIER",
10: "CAVALRY_COSSACK",
11: "CAVALRY_HEAVY",
12: "CAVALRY_MEDIUM",
13: "CAVALRY_LANCER",
14: "ARTILLERY_BN",
15: "ARTILLERY_LIGHT",
16: "ARTILLERY_MEDIUM",
17: "ARTILLERY_HEAVY",
18: "ARTILLERY_HORSE",
19: "ARTILLERY_LIGHT_HORSE",
}
var UnitType_value = map[string]int32{
"SUPPORT_UNIT": 0,
"INFANTRY_LINE": 1,
"INFANTRY_LIGHT": 2,
"INFANTRY_GRENADIER": 3,
"INFANTRY_IRREGULAR": 4,
"INFANTRY_RIFLES": 5,
"CAVALRY_LIGHT": 6,
"CAVALRY_HUSSAR": 7,
"CAVALRY_DRAGOON": 8,
"CAVALRY_CUIRASSIER": 9,
"CAVALRY_COSSACK": 10,
"CAVALRY_HEAVY": 11,
"CAVALRY_MEDIUM": 12,
"CAVALRY_LANCER": 13,
"ARTILLERY_BN": 14,
"ARTILLERY_LIGHT": 15,
"ARTILLERY_MEDIUM": 16,
"ARTILLERY_HEAVY": 17,
"ARTILLERY_HORSE": 18,
"ARTILLERY_LIGHT_HORSE": 19,
}
Functions ¶
func RegisterGameServiceHandler ¶
func RegisterGameServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGameServiceHandler registers the http handlers for service GameService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGameServiceHandlerClient ¶
func RegisterGameServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GameServiceClient) error
RegisterGameServiceHandlerClient registers the http handlers for service GameService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GameServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GameServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GameServiceClient" to call the correct interceptors.
func RegisterGameServiceHandlerFromEndpoint ¶
func RegisterGameServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGameServiceHandlerFromEndpoint is same as RegisterGameServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGameServiceServer ¶
func RegisterGameServiceServer(s *grpc.Server, srv GameServiceServer)
Types ¶
type Action ¶
type Action struct { Done bool `protobuf:"varint,1,opt,name=done,proto3" json:"done,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Type ActionType `protobuf:"varint,3,opt,name=type,proto3,enum=republique.ActionType" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Action) Descriptor ¶
func (*Action) GetDescription ¶
func (*Action) GetType ¶
func (m *Action) GetType() ActionType
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
func (*Action) XXX_DiscardUnknown ¶
func (m *Action) XXX_DiscardUnknown()
func (*Action) XXX_Marshal ¶
func (*Action) XXX_Unmarshal ¶
type ActionType ¶
type ActionType int32
const ( ActionType_COMMENT ActionType = 0 ActionType_OPTIONAL ActionType = 1 ActionType_MUST_TICK ActionType = 2 )
func (ActionType) EnumDescriptor ¶
func (ActionType) EnumDescriptor() ([]byte, []int)
func (ActionType) String ¶
func (x ActionType) String() string
type Arrival ¶
type Arrival struct { From int32 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` To int32 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` Percent int32 `protobuf:"varint,3,opt,name=percent,proto3" json:"percent,omitempty"` ComputedTurn int32 `protobuf:"varint,4,opt,name=computedTurn,proto3" json:"computedTurn,omitempty"` ActualArrival *timestamp.Timestamp `protobuf:"bytes,5,opt,name=actualArrival,proto3" json:"actualArrival,omitempty"` Position BattlefieldPosition `protobuf:"varint,6,opt,name=position,proto3,enum=republique.BattlefieldPosition" json:"position,omitempty"` Contact bool `protobuf:"varint,7,opt,name=contact,proto3" json:"contact,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Arrival) Descriptor ¶
func (*Arrival) GetActualArrival ¶
func (*Arrival) GetComputedTurn ¶
func (*Arrival) GetContact ¶
func (*Arrival) GetPercent ¶
func (*Arrival) GetPosition ¶
func (m *Arrival) GetPosition() BattlefieldPosition
func (*Arrival) ProtoMessage ¶
func (*Arrival) ProtoMessage()
func (*Arrival) XXX_DiscardUnknown ¶
func (m *Arrival) XXX_DiscardUnknown()
func (*Arrival) XXX_Marshal ¶
func (*Arrival) XXX_Unmarshal ¶
type BattlefieldPosition ¶
type BattlefieldPosition int32
const ( BattlefieldPosition_REAR BattlefieldPosition = 0 BattlefieldPosition_LEFT BattlefieldPosition = 1 BattlefieldPosition_CENTRE BattlefieldPosition = 2 BattlefieldPosition_RIGHT BattlefieldPosition = 3 BattlefieldPosition_OFF_BOARD BattlefieldPosition = 4 )
func (BattlefieldPosition) EnumDescriptor ¶
func (BattlefieldPosition) EnumDescriptor() ([]byte, []int)
func (BattlefieldPosition) String ¶
func (x BattlefieldPosition) String() string
type Command ¶
type Command struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` CommanderName string `protobuf:"bytes,2,opt,name=commanderName,proto3" json:"commanderName,omitempty"` CommandRating CommandRating `protobuf:"varint,3,opt,name=commandRating,proto3,enum=republique.CommandRating" json:"commandRating,omitempty"` Rank Rank `protobuf:"varint,4,opt,name=rank,proto3,enum=republique.Rank" json:"rank,omitempty"` Subcommands []*Command `protobuf:"bytes,5,rep,name=subcommands,proto3" json:"subcommands,omitempty"` Units []*Unit `protobuf:"bytes,6,rep,name=units,proto3" json:"units,omitempty"` CommanderBonus int32 `protobuf:"varint,7,opt,name=commanderBonus,proto3" json:"commanderBonus,omitempty"` Arm Arm `protobuf:"varint,8,opt,name=arm,proto3,enum=republique.Arm" json:"arm,omitempty"` Nationality Nationality `protobuf:"varint,9,opt,name=nationality,proto3,enum=republique.Nationality" json:"nationality,omitempty"` Grade UnitGrade `protobuf:"varint,10,opt,name=grade,proto3,enum=republique.UnitGrade" json:"grade,omitempty"` Drill Drill `protobuf:"varint,11,opt,name=drill,proto3,enum=republique.Drill" json:"drill,omitempty"` Notes string `protobuf:"bytes,12,opt,name=notes,proto3" json:"notes,omitempty"` Arrival *Arrival `protobuf:"bytes,13,opt,name=arrival,proto3" json:"arrival,omitempty"` GameState *CommandGameState `protobuf:"bytes,14,opt,name=gameState,proto3" json:"gameState,omitempty"` History []*CommandGameState `protobuf:"bytes,15,rep,name=history,proto3" json:"history,omitempty"` Reserve bool `protobuf:"varint,16,opt,name=reserve,proto3" json:"reserve,omitempty"` Id int32 `protobuf:"varint,17,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Command details that are static for a game
func (*Command) AddAction ¶
func (c *Command) AddAction(s string, done bool, t ActionType)
AddAction adds an action to a command
func (*Command) AddToObjective ¶
AddToObjective adds a grid to the path for the command order
func (*Command) BattleFormation ¶
BattleFormation returns the default battle formation for a command, based on its drill rating
func (*Command) ClearActions ¶
func (c *Command) ClearActions()
ClearActions clears the actions for a command
func (*Command) ClearOrder ¶
func (c *Command) ClearOrder()
ClearOrder clears the order and objective path for a command
func (*Command) Descriptor ¶
func (*Command) GetArrival ¶
func (*Command) GetCommandRating ¶
func (m *Command) GetCommandRating() CommandRating
func (*Command) GetCommandStrength ¶
func (c *Command) GetCommandStrength() CommandStrength
GetCommandStrength gets the strength of a command
func (*Command) GetCommandStrengthLabel ¶
GetCommandStrengthLabel gets the strength of a command as a string
func (*Command) GetCommanderBonus ¶
func (*Command) GetCommanderName ¶
func (*Command) GetGameState ¶
func (m *Command) GetGameState() *CommandGameState
func (*Command) GetHistory ¶
func (m *Command) GetHistory() []*CommandGameState
func (*Command) GetNationality ¶
func (m *Command) GetNationality() Nationality
func (*Command) GetReserve ¶
func (*Command) GetSubcommands ¶
func (*Command) LabelString ¶
LabelString returns a formatted string for rendering the whole command in the GUI app
func (*Command) LongDescription ¶
LongDescription returns a long description string for the command
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) SetObjective ¶
SetObjective sets the grid path
func (*Command) XXX_DiscardUnknown ¶
func (m *Command) XXX_DiscardUnknown()
func (*Command) XXX_Marshal ¶
func (*Command) XXX_Unmarshal ¶
type CommandGameState ¶
type CommandGameState struct { Turn int32 `protobuf:"varint,1,opt,name=turn,proto3" json:"turn,omitempty"` Grid *Grid `protobuf:"bytes,2,opt,name=grid,proto3" json:"grid,omitempty"` Position BattlefieldPosition `protobuf:"varint,3,opt,name=position,proto3,enum=republique.BattlefieldPosition" json:"position,omitempty"` Formation Formation `protobuf:"varint,4,opt,name=formation,proto3,enum=republique.Formation" json:"formation,omitempty"` PanicState int32 `protobuf:"varint,5,opt,name=panicState,proto3" json:"panicState,omitempty"` Injured bool `protobuf:"varint,6,opt,name=injured,proto3" json:"injured,omitempty"` ObjectiveName string `protobuf:"bytes,7,opt,name=objectiveName,proto3" json:"objectiveName,omitempty"` Orders Order `protobuf:"varint,8,opt,name=orders,proto3,enum=republique.Order" json:"orders,omitempty"` Objective []*Grid `protobuf:"bytes,9,rep,name=objective,proto3" json:"objective,omitempty"` AttachedTo string `protobuf:"bytes,10,opt,name=attachedTo,proto3" json:"attachedTo,omitempty"` Timestamp *timestamp.Timestamp `protobuf:"bytes,11,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Actions []*Action `protobuf:"bytes,12,rep,name=actions,proto3" json:"actions,omitempty"` Can *UnitAction `protobuf:"bytes,13,opt,name=can,proto3" json:"can,omitempty"` Has *UnitAction `protobuf:"bytes,14,opt,name=has,proto3" json:"has,omitempty"` Must *UnitAction `protobuf:"bytes,15,opt,name=must,proto3" json:"must,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Command details that can change from turn to turn
func (*CommandGameState) Descriptor ¶
func (*CommandGameState) Descriptor() ([]byte, []int)
func (*CommandGameState) GetActions ¶
func (m *CommandGameState) GetActions() []*Action
func (*CommandGameState) GetAttachedTo ¶
func (m *CommandGameState) GetAttachedTo() string
func (*CommandGameState) GetCan ¶
func (m *CommandGameState) GetCan() *UnitAction
func (*CommandGameState) GetFormation ¶
func (m *CommandGameState) GetFormation() Formation
func (*CommandGameState) GetGrid ¶
func (m *CommandGameState) GetGrid() *Grid
func (*CommandGameState) GetHas ¶
func (m *CommandGameState) GetHas() *UnitAction
func (*CommandGameState) GetInjured ¶
func (m *CommandGameState) GetInjured() bool
func (*CommandGameState) GetMust ¶
func (m *CommandGameState) GetMust() *UnitAction
func (*CommandGameState) GetObjective ¶
func (m *CommandGameState) GetObjective() []*Grid
func (*CommandGameState) GetObjectiveName ¶
func (m *CommandGameState) GetObjectiveName() string
func (*CommandGameState) GetOrders ¶
func (m *CommandGameState) GetOrders() Order
func (*CommandGameState) GetPanicState ¶
func (m *CommandGameState) GetPanicState() int32
func (*CommandGameState) GetPosition ¶
func (m *CommandGameState) GetPosition() BattlefieldPosition
func (*CommandGameState) GetTimestamp ¶
func (m *CommandGameState) GetTimestamp() *timestamp.Timestamp
func (*CommandGameState) GetTurn ¶
func (m *CommandGameState) GetTurn() int32
func (*CommandGameState) ProtoMessage ¶
func (*CommandGameState) ProtoMessage()
func (*CommandGameState) Reset ¶
func (m *CommandGameState) Reset()
func (*CommandGameState) String ¶
func (m *CommandGameState) String() string
func (*CommandGameState) XXX_DiscardUnknown ¶
func (m *CommandGameState) XXX_DiscardUnknown()
func (*CommandGameState) XXX_Marshal ¶
func (m *CommandGameState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CommandGameState) XXX_Merge ¶
func (m *CommandGameState) XXX_Merge(src proto.Message)
func (*CommandGameState) XXX_Size ¶
func (m *CommandGameState) XXX_Size() int
func (*CommandGameState) XXX_Unmarshal ¶
func (m *CommandGameState) XXX_Unmarshal(b []byte) error
type CommandRating ¶
type CommandRating int32
const ( CommandRating_USELESS CommandRating = 0 CommandRating_CUMBERSOME CommandRating = 1 CommandRating_FUNCTIONAL CommandRating = 2 CommandRating_EFFICIENT CommandRating = 3 )
func (CommandRating) EnumDescriptor ¶
func (CommandRating) EnumDescriptor() ([]byte, []int)
func (CommandRating) String ¶
func (x CommandRating) String() string
type CommandStrength ¶
CommandStrength is the number of troops in a command
type EmptyMessage ¶
type EmptyMessage struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EmptyMessage) Descriptor ¶
func (*EmptyMessage) Descriptor() ([]byte, []int)
func (*EmptyMessage) ProtoMessage ¶
func (*EmptyMessage) ProtoMessage()
func (*EmptyMessage) Reset ¶
func (m *EmptyMessage) Reset()
func (*EmptyMessage) String ¶
func (m *EmptyMessage) String() string
func (*EmptyMessage) XXX_DiscardUnknown ¶
func (m *EmptyMessage) XXX_DiscardUnknown()
func (*EmptyMessage) XXX_Marshal ¶
func (m *EmptyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EmptyMessage) XXX_Merge ¶
func (m *EmptyMessage) XXX_Merge(src proto.Message)
func (*EmptyMessage) XXX_Size ¶
func (m *EmptyMessage) XXX_Size() int
func (*EmptyMessage) XXX_Unmarshal ¶
func (m *EmptyMessage) XXX_Unmarshal(b []byte) error
type Formation ¶
type Formation int32
const ( Formation_RESERVE Formation = 0 Formation_MARCH_COLUMN Formation = 1 Formation_ATTACK_COLUMN Formation = 2 Formation_CLOSED_COLUMN Formation = 3 Formation_LINE Formation = 4 Formation_ECHELON Formation = 5 Formation_SUPPORTING_LINES Formation = 6 Formation_DEBANDE Formation = 7 Formation_FORTIFIED Formation = 8 Formation_COLUMN Formation = 9 Formation_DOUBLE_LINE Formation = 10 )
func (Formation) EnumDescriptor ¶
type Game ¶
type Game struct { Scenario *Scenario `protobuf:"bytes,1,opt,name=scenario,proto3" json:"scenario,omitempty"` TurnNumber int32 `protobuf:"varint,2,opt,name=turnNumber,proto3" json:"turnNumber,omitempty"` TableX int32 `protobuf:"varint,3,opt,name=tableX,proto3" json:"tableX,omitempty"` TableY int32 `protobuf:"varint,4,opt,name=tableY,proto3" json:"tableY,omitempty"` GameTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=gameTime,proto3" json:"gameTime,omitempty"` AdminAccess string `protobuf:"bytes,6,opt,name=adminAccess,proto3" json:"adminAccess,omitempty"` Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` Phase Phase `protobuf:"varint,8,opt,name=phase,proto3,enum=republique.Phase" json:"phase,omitempty"` TableLayout string `protobuf:"bytes,9,opt,name=tableLayout,proto3" json:"tableLayout,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Game) Descriptor ¶
func (*Game) GenerateIDs ¶
func (g *Game) GenerateIDs()
GenerateIDs loops through all the commanders and units in a game and stamps unique sequential IDs on each unit. This should only be used after compilation.
func (*Game) GetAdminAccess ¶
func (*Game) GetGameTime ¶
func (*Game) GetScenario ¶
func (*Game) GetTableLayout ¶
func (*Game) GetTurnNumber ¶
func (*Game) GetUnitCommander ¶
GetUnitCommander returns the command in charge of the given unit
func (*Game) InitGameState ¶
func (g *Game) InitGameState()
InitGameState will loop through the commanders and units in a game and set the GameState to defaults based upon the arrival data. This is only intended to be run on loading a game in the game server. It will return with no changes if the game has already started.
func (*Game) ProtoMessage ¶
func (*Game) ProtoMessage()
func (*Game) XXX_DiscardUnknown ¶
func (m *Game) XXX_DiscardUnknown()
func (*Game) XXX_Unmarshal ¶
type GameServiceClient ¶
type GameServiceClient interface { Version(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*StringMessage, error) Login(ctx context.Context, in *LoginMessage, opts ...grpc.CallOption) (*LoginResponse, error) GameTime(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*GameTimeResponse, error) GetUnits(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*Units, error) GetEnemy(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*Units, error) GetMap(ctx context.Context, in *TokenMessage, opts ...grpc.CallOption) (*MapData, error) }
GameServiceClient is the client API for GameService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGameServiceClient ¶
func NewGameServiceClient(cc *grpc.ClientConn) GameServiceClient
type GameServiceServer ¶
type GameServiceServer interface { Version(context.Context, *EmptyMessage) (*StringMessage, error) Login(context.Context, *LoginMessage) (*LoginResponse, error) GameTime(context.Context, *TokenMessage) (*GameTimeResponse, error) GetUnits(context.Context, *TokenMessage) (*Units, error) GetEnemy(context.Context, *TokenMessage) (*Units, error) GetMap(context.Context, *TokenMessage) (*MapData, error) }
GameServiceServer is the server API for GameService service.
type GameTimeResponse ¶
type GameTimeResponse struct { Phase Phase `protobuf:"varint,1,opt,name=phase,proto3,enum=republique.Phase" json:"phase,omitempty"` GameTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=gameTime,proto3" json:"gameTime,omitempty"` StopWatch int64 `protobuf:"varint,3,opt,name=stopWatch,proto3" json:"stopWatch,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GameTimeResponse) Descriptor ¶
func (*GameTimeResponse) Descriptor() ([]byte, []int)
func (*GameTimeResponse) GetGameTime ¶
func (m *GameTimeResponse) GetGameTime() *timestamp.Timestamp
func (*GameTimeResponse) GetPhase ¶
func (m *GameTimeResponse) GetPhase() Phase
func (*GameTimeResponse) GetStopWatch ¶
func (m *GameTimeResponse) GetStopWatch() int64
func (*GameTimeResponse) ProtoMessage ¶
func (*GameTimeResponse) ProtoMessage()
func (*GameTimeResponse) Reset ¶
func (m *GameTimeResponse) Reset()
func (*GameTimeResponse) String ¶
func (m *GameTimeResponse) String() string
func (*GameTimeResponse) XXX_DiscardUnknown ¶
func (m *GameTimeResponse) XXX_DiscardUnknown()
func (*GameTimeResponse) XXX_Marshal ¶
func (m *GameTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GameTimeResponse) XXX_Merge ¶
func (m *GameTimeResponse) XXX_Merge(src proto.Message)
func (*GameTimeResponse) XXX_Size ¶
func (m *GameTimeResponse) XXX_Size() int
func (*GameTimeResponse) XXX_Unmarshal ¶
func (m *GameTimeResponse) XXX_Unmarshal(b []byte) error
type Grid ¶
type Grid struct { X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` Cover bool `protobuf:"varint,3,opt,name=cover,proto3" json:"cover,omitempty"` Woods bool `protobuf:"varint,4,opt,name=woods,proto3" json:"woods,omitempty"` Bua bool `protobuf:"varint,5,opt,name=bua,proto3" json:"bua,omitempty"` Fort bool `protobuf:"varint,6,opt,name=fort,proto3" json:"fort,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
////////////////////////////////////////////////////////////////////////////////////////////////////////// Types
func (*Grid) Descriptor ¶
func (*Grid) ProtoMessage ¶
func (*Grid) ProtoMessage()
func (*Grid) XXX_DiscardUnknown ¶
func (m *Grid) XXX_DiscardUnknown()
func (*Grid) XXX_Unmarshal ¶
type LoginMessage ¶
type LoginMessage struct { Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` TeamCode string `protobuf:"bytes,2,opt,name=teamCode,proto3" json:"teamCode,omitempty"` PlayerCode string `protobuf:"bytes,3,opt,name=playerCode,proto3" json:"playerCode,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginMessage) Descriptor ¶
func (*LoginMessage) Descriptor() ([]byte, []int)
func (*LoginMessage) GetHash ¶
func (m *LoginMessage) GetHash() []byte
func (*LoginMessage) GetPlayerCode ¶
func (m *LoginMessage) GetPlayerCode() string
func (*LoginMessage) GetTeamCode ¶
func (m *LoginMessage) GetTeamCode() string
func (*LoginMessage) ProtoMessage ¶
func (*LoginMessage) ProtoMessage()
func (*LoginMessage) Reset ¶
func (m *LoginMessage) Reset()
func (*LoginMessage) String ¶
func (m *LoginMessage) String() string
func (*LoginMessage) XXX_DiscardUnknown ¶
func (m *LoginMessage) XXX_DiscardUnknown()
func (*LoginMessage) XXX_Marshal ¶
func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginMessage) XXX_Merge ¶
func (m *LoginMessage) XXX_Merge(src proto.Message)
func (*LoginMessage) XXX_Size ¶
func (m *LoginMessage) XXX_Size() int
func (*LoginMessage) XXX_Unmarshal ¶
func (m *LoginMessage) XXX_Unmarshal(b []byte) error
type LoginResponse ¶
type LoginResponse struct { Welcome string `protobuf:"bytes,2,opt,name=welcome,proto3" json:"welcome,omitempty"` Commanders []string `protobuf:"bytes,3,rep,name=commanders,proto3" json:"commanders,omitempty"` TeamName string `protobuf:"bytes,4,opt,name=teamName,proto3" json:"teamName,omitempty"` Briefing string `protobuf:"bytes,5,opt,name=briefing,proto3" json:"briefing,omitempty"` GameName string `protobuf:"bytes,6,opt,name=gameName,proto3" json:"gameName,omitempty"` Token *Token `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` GameTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=gameTime,proto3" json:"gameTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginResponse) Descriptor ¶
func (*LoginResponse) Descriptor() ([]byte, []int)
func (*LoginResponse) GetBriefing ¶
func (m *LoginResponse) GetBriefing() string
func (*LoginResponse) GetCommanders ¶
func (m *LoginResponse) GetCommanders() []string
func (*LoginResponse) GetGameName ¶
func (m *LoginResponse) GetGameName() string
func (*LoginResponse) GetGameTime ¶
func (m *LoginResponse) GetGameTime() *timestamp.Timestamp
func (*LoginResponse) GetTeamName ¶
func (m *LoginResponse) GetTeamName() string
func (*LoginResponse) GetToken ¶
func (m *LoginResponse) GetToken() *Token
func (*LoginResponse) GetWelcome ¶
func (m *LoginResponse) GetWelcome() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) Reset ¶
func (m *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (m *LoginResponse) String() string
func (*LoginResponse) XXX_DiscardUnknown ¶
func (m *LoginResponse) XXX_DiscardUnknown()
func (*LoginResponse) XXX_Marshal ¶
func (m *LoginResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoginResponse) XXX_Merge ¶
func (m *LoginResponse) XXX_Merge(src proto.Message)
func (*LoginResponse) XXX_Size ¶
func (m *LoginResponse) XXX_Size() int
func (*LoginResponse) XXX_Unmarshal ¶
func (m *LoginResponse) XXX_Unmarshal(b []byte) error
type MapData ¶
type MapData struct { X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` Side MapSide `protobuf:"varint,4,opt,name=side,proto3,enum=republique.MapSide" json:"side,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MapData) Descriptor ¶
func (*MapData) GetWaypoints ¶
GetWaypoints gets a slice of waypoints for a given command on this map
func (*MapData) ProtoMessage ¶
func (*MapData) ProtoMessage()
func (*MapData) XXX_DiscardUnknown ¶
func (m *MapData) XXX_DiscardUnknown()
func (*MapData) XXX_Marshal ¶
func (*MapData) XXX_Unmarshal ¶
type MoraleState ¶
type MoraleState int32
const ( MoraleState_RESTING MoraleState = 0 MoraleState_GOOD MoraleState = 1 MoraleState_UNFORMED MoraleState = 2 MoraleState_RATTLED MoraleState = 3 MoraleState_SHAKEN MoraleState = 4 MoraleState_DEMORALISED MoraleState = 5 )
func (MoraleState) EnumDescriptor ¶
func (MoraleState) EnumDescriptor() ([]byte, []int)
func (MoraleState) String ¶
func (x MoraleState) String() string
type Nationality ¶
type Nationality int32
const ( Nationality_ANY_NATION Nationality = 0 Nationality_FRENCH Nationality = 1 Nationality_BRITISH Nationality = 2 Nationality_RUSSIAN Nationality = 3 Nationality_PRUSSIAN Nationality = 4 Nationality_SPANISH Nationality = 6 Nationality_OTTOMAN Nationality = 7 Nationality_PERSIAN Nationality = 8 Nationality_AUSTRIAN Nationality = 9 Nationality_AMERICAN Nationality = 10 Nationality_INDIAN Nationality = 11 Nationality_ITALIAN Nationality = 12 Nationality_BAVARIAN Nationality = 13 Nationality_DUTCH Nationality = 14 Nationality_BELGIAN Nationality = 15 Nationality_NASSAU Nationality = 16 Nationality_SWISS Nationality = 17 Nationality_PAPAL_STATES Nationality = 18 Nationality_AFRICAN Nationality = 19 Nationality_NATIVE Nationality = 20 Nationality_COLONIAL Nationality = 21 Nationality_SWEDEN Nationality = 22 )
func (Nationality) EnumDescriptor ¶
func (Nationality) EnumDescriptor() ([]byte, []int)
func (Nationality) String ¶
func (x Nationality) String() string
type Order ¶
type Order int32
const ( Order_NO_ORDERS Order = 0 Order_MARCH Order = 1 Order_MOVE Order = 2 Order_DEFEND Order = 3 Order_WITHDRAW Order = 4 Order_ATTACK Order = 5 Order_RALLY Order = 6 Order_ENGAGE Order = 7 Order_PURSUIT Order = 8 Order_ADVANCE Order = 9 Order_CHARGE Order = 10 Order_FIRE Order = 11 Order_RESTAGE Order = 12 )
func (Order) EnumDescriptor ¶
type Player ¶
type Player struct { AccessCode string `protobuf:"bytes,1,opt,name=accessCode,proto3" json:"accessCode,omitempty"` Commanders []string `protobuf:"bytes,3,rep,name=commanders,proto3" json:"commanders,omitempty"` Points int32 `protobuf:"varint,4,opt,name=points,proto3" json:"points,omitempty"` Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TODO - add some public key enc / tokens to this
func (*Player) Descriptor ¶
func (*Player) GetAccessCode ¶
func (*Player) GetCommanders ¶
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
func (*Player) XXX_DiscardUnknown ¶
func (m *Player) XXX_DiscardUnknown()
func (*Player) XXX_Marshal ¶
func (*Player) XXX_Unmarshal ¶
type Scenario ¶
type Scenario struct { StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=startTime,proto3" json:"startTime,omitempty"` Teams map[string]*Team `` /* 151-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Scenario) Descriptor ¶
func (*Scenario) GetStartTime ¶
func (*Scenario) ProtoMessage ¶
func (*Scenario) ProtoMessage()
func (*Scenario) XXX_DiscardUnknown ¶
func (m *Scenario) XXX_DiscardUnknown()
func (*Scenario) XXX_Marshal ¶
func (*Scenario) XXX_Unmarshal ¶
type SkirmishRating ¶
type SkirmishRating int32
const ( SkirmishRating_POOR SkirmishRating = 0 SkirmishRating_ADEQUATE SkirmishRating = 1 SkirmishRating_CRACK_SHOT SkirmishRating = 2 SkirmishRating_EXCELLENT SkirmishRating = 3 )
func (SkirmishRating) Decrement ¶
func (x SkirmishRating) Decrement() SkirmishRating
Decrement drops the skirmish rating by 1 level, safely
func (SkirmishRating) EnumDescriptor ¶
func (SkirmishRating) EnumDescriptor() ([]byte, []int)
func (SkirmishRating) Increment ¶
func (x SkirmishRating) Increment() SkirmishRating
Increment raises the skirmish rating by 1 level, safely
func (SkirmishRating) String ¶
func (x SkirmishRating) String() string
type StringMessage ¶
type StringMessage struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
////////////////////////////////////////////////////////////////////////////////////////////////////////// Messages
func (*StringMessage) Descriptor ¶
func (*StringMessage) Descriptor() ([]byte, []int)
func (*StringMessage) GetValue ¶
func (m *StringMessage) GetValue() string
func (*StringMessage) ProtoMessage ¶
func (*StringMessage) ProtoMessage()
func (*StringMessage) Reset ¶
func (m *StringMessage) Reset()
func (*StringMessage) String ¶
func (m *StringMessage) String() string
func (*StringMessage) XXX_DiscardUnknown ¶
func (m *StringMessage) XXX_DiscardUnknown()
func (*StringMessage) XXX_Marshal ¶
func (m *StringMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StringMessage) XXX_Merge ¶
func (m *StringMessage) XXX_Merge(src proto.Message)
func (*StringMessage) XXX_Size ¶
func (m *StringMessage) XXX_Size() int
func (*StringMessage) XXX_Unmarshal ¶
func (m *StringMessage) XXX_Unmarshal(b []byte) error
type Team ¶
type Team struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Briefing string `protobuf:"bytes,2,opt,name=briefing,proto3" json:"briefing,omitempty"` Commands []*Command `protobuf:"bytes,3,rep,name=commands,proto3" json:"commands,omitempty"` AccessCode string `protobuf:"bytes,4,opt,name=accessCode,proto3" json:"accessCode,omitempty"` Players []*Player `protobuf:"bytes,5,rep,name=players,proto3" json:"players,omitempty"` GameName string `protobuf:"bytes,6,opt,name=gameName,proto3" json:"gameName,omitempty"` Side MapSide `protobuf:"varint,7,opt,name=side,proto3,enum=republique.MapSide" json:"side,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Team) Descriptor ¶
func (*Team) GetAccessCode ¶
func (*Team) GetBriefing ¶
func (*Team) GetCommandByCommanderName ¶
GetCommandByCommanderName gets the matching command by the name of the commander
func (*Team) GetCommandByID ¶
GetCommandByID gets the matching command by the ID of the unit
func (*Team) GetCommandByName ¶
GetCommandByName gets the matching command by the name of the unit
func (*Team) GetCommands ¶
func (*Team) GetGameName ¶
func (*Team) GetPlayers ¶
func (*Team) ProtoMessage ¶
func (*Team) ProtoMessage()
func (*Team) XXX_DiscardUnknown ¶
func (m *Team) XXX_DiscardUnknown()
func (*Team) XXX_Unmarshal ¶
type Token ¶
type Token struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Expires *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expires,proto3" json:"expires,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewToken ¶
func NewToken() *Token
NewToken returns a new token with a randomised UUID and a 24hr expiry period
func (*Token) Descriptor ¶
func (*Token) GetExpires ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) XXX_DiscardUnknown ¶
func (m *Token) XXX_DiscardUnknown()
func (*Token) XXX_Marshal ¶
func (*Token) XXX_Unmarshal ¶
type TokenMessage ¶
type TokenMessage struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TokenMessage) Descriptor ¶
func (*TokenMessage) Descriptor() ([]byte, []int)
func (*TokenMessage) GetId ¶
func (m *TokenMessage) GetId() string
func (*TokenMessage) ProtoMessage ¶
func (*TokenMessage) ProtoMessage()
func (*TokenMessage) Reset ¶
func (m *TokenMessage) Reset()
func (*TokenMessage) String ¶
func (m *TokenMessage) String() string
func (*TokenMessage) XXX_DiscardUnknown ¶
func (m *TokenMessage) XXX_DiscardUnknown()
func (*TokenMessage) XXX_Marshal ¶
func (m *TokenMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TokenMessage) XXX_Merge ¶
func (m *TokenMessage) XXX_Merge(src proto.Message)
func (*TokenMessage) XXX_Size ¶
func (m *TokenMessage) XXX_Size() int
func (*TokenMessage) XXX_Unmarshal ¶
func (m *TokenMessage) XXX_Unmarshal(b []byte) error
type UnimplementedGameServiceServer ¶
type UnimplementedGameServiceServer struct { }
UnimplementedGameServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedGameServiceServer) GameTime ¶
func (*UnimplementedGameServiceServer) GameTime(ctx context.Context, req *TokenMessage) (*GameTimeResponse, error)
func (*UnimplementedGameServiceServer) GetEnemy ¶
func (*UnimplementedGameServiceServer) GetEnemy(ctx context.Context, req *TokenMessage) (*Units, error)
func (*UnimplementedGameServiceServer) GetMap ¶
func (*UnimplementedGameServiceServer) GetMap(ctx context.Context, req *TokenMessage) (*MapData, error)
func (*UnimplementedGameServiceServer) GetUnits ¶
func (*UnimplementedGameServiceServer) GetUnits(ctx context.Context, req *TokenMessage) (*Units, error)
func (*UnimplementedGameServiceServer) Login ¶
func (*UnimplementedGameServiceServer) Login(ctx context.Context, req *LoginMessage) (*LoginResponse, error)
func (*UnimplementedGameServiceServer) Version ¶
func (*UnimplementedGameServiceServer) Version(ctx context.Context, req *EmptyMessage) (*StringMessage, error)
type Unit ¶
type Unit struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Arm Arm `protobuf:"varint,2,opt,name=arm,proto3,enum=republique.Arm" json:"arm,omitempty"` UnitType UnitType `protobuf:"varint,3,opt,name=unitType,proto3,enum=republique.UnitType" json:"unitType,omitempty"` Strength int32 `protobuf:"varint,4,opt,name=strength,proto3" json:"strength,omitempty"` Grade UnitGrade `protobuf:"varint,5,opt,name=grade,proto3,enum=republique.UnitGrade" json:"grade,omitempty"` SkirmishRating SkirmishRating `protobuf:"varint,6,opt,name=skirmishRating,proto3,enum=republique.SkirmishRating" json:"skirmishRating,omitempty"` SkirmisherMax int32 `protobuf:"varint,7,opt,name=skirmisherMax,proto3" json:"skirmisherMax,omitempty"` Notes string `protobuf:"bytes,8,opt,name=notes,proto3" json:"notes,omitempty"` BnGuns bool `protobuf:"varint,9,opt,name=bnGuns,proto3" json:"bnGuns,omitempty"` Nationality Nationality `protobuf:"varint,10,opt,name=nationality,proto3,enum=republique.Nationality" json:"nationality,omitempty"` Drill Drill `protobuf:"varint,11,opt,name=drill,proto3,enum=republique.Drill" json:"drill,omitempty"` CommandReserve bool `protobuf:"varint,12,opt,name=commandReserve,proto3" json:"commandReserve,omitempty"` GameState *UnitGameState `protobuf:"bytes,13,opt,name=gameState,proto3" json:"gameState,omitempty"` History []*UnitGameState `protobuf:"bytes,14,rep,name=history,proto3" json:"history,omitempty"` Id int32 `protobuf:"varint,15,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Unit details that are static for a game
func (*Unit) BattleFormation ¶
BattleFormation returns the default battle formation for a unit, based on its drill
func (*Unit) Descriptor ¶
func (*Unit) GetCommandReserve ¶
func (*Unit) GetGameState ¶
func (m *Unit) GetGameState() *UnitGameState
func (*Unit) GetHistory ¶
func (m *Unit) GetHistory() []*UnitGameState
func (*Unit) GetNationality ¶
func (m *Unit) GetNationality() Nationality
func (*Unit) GetSKLabel ¶
GetSKLabel returns a description of the unit skirmisher state
func (*Unit) GetSkirmishRating ¶
func (m *Unit) GetSkirmishRating() SkirmishRating
func (*Unit) GetSkirmisherMax ¶
func (*Unit) GetStrength ¶
func (*Unit) GetStrengthLabel ¶
GetStrengthLabel returns a description of the unit strength
func (*Unit) GetUnitType ¶
func (*Unit) LabelString ¶
LabelString returns a formatted string suitable for labelling the unit in the GUI
func (*Unit) ProtoMessage ¶
func (*Unit) ProtoMessage()
func (*Unit) ShortLabel ¶
ShortLabel returns a formatted string suitable for labelling the unit in the GUI
func (*Unit) XXX_DiscardUnknown ¶
func (m *Unit) XXX_DiscardUnknown()
func (*Unit) XXX_Unmarshal ¶
type UnitAction ¶
type UnitAction struct { GunFire bool `protobuf:"varint,1,opt,name=gunFire,proto3" json:"gunFire,omitempty"` GunLimber bool `protobuf:"varint,2,opt,name=gunLimber,proto3" json:"gunLimber,omitempty"` GunDeploy bool `protobuf:"varint,3,opt,name=gunDeploy,proto3" json:"gunDeploy,omitempty"` GunMove bool `protobuf:"varint,4,opt,name=gunMove,proto3" json:"gunMove,omitempty"` Move bool `protobuf:"varint,5,opt,name=move,proto3" json:"move,omitempty"` Assault bool `protobuf:"varint,6,opt,name=assault,proto3" json:"assault,omitempty"` ChangeFormation bool `protobuf:"varint,7,opt,name=changeFormation,proto3" json:"changeFormation,omitempty"` SkDeploy bool `protobuf:"varint,8,opt,name=skDeploy,proto3" json:"skDeploy,omitempty"` SkRetire bool `protobuf:"varint,9,opt,name=skRetire,proto3" json:"skRetire,omitempty"` SkAttack bool `protobuf:"varint,10,opt,name=skAttack,proto3" json:"skAttack,omitempty"` Fallback bool `protobuf:"varint,11,opt,name=fallback,proto3" json:"fallback,omitempty"` Withdraw bool `protobuf:"varint,12,opt,name=withdraw,proto3" json:"withdraw,omitempty"` Rout bool `protobuf:"varint,13,opt,name=rout,proto3" json:"rout,omitempty"` Rally bool `protobuf:"varint,14,opt,name=rally,proto3" json:"rally,omitempty"` Order bool `protobuf:"varint,15,opt,name=order,proto3" json:"order,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UnitAction) Descriptor ¶
func (*UnitAction) Descriptor() ([]byte, []int)
func (*UnitAction) GetAssault ¶
func (m *UnitAction) GetAssault() bool
func (*UnitAction) GetChangeFormation ¶
func (m *UnitAction) GetChangeFormation() bool
func (*UnitAction) GetFallback ¶
func (m *UnitAction) GetFallback() bool
func (*UnitAction) GetGunDeploy ¶
func (m *UnitAction) GetGunDeploy() bool
func (*UnitAction) GetGunFire ¶
func (m *UnitAction) GetGunFire() bool
func (*UnitAction) GetGunLimber ¶
func (m *UnitAction) GetGunLimber() bool
func (*UnitAction) GetGunMove ¶
func (m *UnitAction) GetGunMove() bool
func (*UnitAction) GetMove ¶
func (m *UnitAction) GetMove() bool
func (*UnitAction) GetOrder ¶
func (m *UnitAction) GetOrder() bool
func (*UnitAction) GetRally ¶
func (m *UnitAction) GetRally() bool
func (*UnitAction) GetRout ¶
func (m *UnitAction) GetRout() bool
func (*UnitAction) GetSkAttack ¶
func (m *UnitAction) GetSkAttack() bool
func (*UnitAction) GetSkDeploy ¶
func (m *UnitAction) GetSkDeploy() bool
func (*UnitAction) GetSkRetire ¶
func (m *UnitAction) GetSkRetire() bool
func (*UnitAction) GetWithdraw ¶
func (m *UnitAction) GetWithdraw() bool
func (*UnitAction) ProtoMessage ¶
func (*UnitAction) ProtoMessage()
func (*UnitAction) Reset ¶
func (m *UnitAction) Reset()
func (*UnitAction) String ¶
func (m *UnitAction) String() string
func (*UnitAction) XXX_DiscardUnknown ¶
func (m *UnitAction) XXX_DiscardUnknown()
func (*UnitAction) XXX_Marshal ¶
func (m *UnitAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UnitAction) XXX_Merge ¶
func (m *UnitAction) XXX_Merge(src proto.Message)
func (*UnitAction) XXX_Size ¶
func (m *UnitAction) XXX_Size() int
func (*UnitAction) XXX_Unmarshal ¶
func (m *UnitAction) XXX_Unmarshal(b []byte) error
type UnitGameState ¶
type UnitGameState struct { Hits int32 `protobuf:"varint,1,opt,name=hits,proto3" json:"hits,omitempty"` SkirmishersDeployed int32 `protobuf:"varint,2,opt,name=skirmishersDeployed,proto3" json:"skirmishersDeployed,omitempty"` Formation Formation `protobuf:"varint,3,opt,name=formation,proto3,enum=republique.Formation" json:"formation,omitempty"` MoraleState MoraleState `protobuf:"varint,4,opt,name=moraleState,proto3,enum=republique.MoraleState" json:"moraleState,omitempty"` GunsDamaged bool `protobuf:"varint,5,opt,name=gunsDamaged,proto3" json:"gunsDamaged,omitempty"` GunsDeployed bool `protobuf:"varint,6,opt,name=gunsDeployed,proto3" json:"gunsDeployed,omitempty"` GunsStocked bool `protobuf:"varint,7,opt,name=gunsStocked,proto3" json:"gunsStocked,omitempty"` Hidden bool `protobuf:"varint,8,opt,name=hidden,proto3" json:"hidden,omitempty"` HasFired bool `protobuf:"varint,9,opt,name=hasFired,proto3" json:"hasFired,omitempty"` Fatigue int32 `protobuf:"varint,10,opt,name=fatigue,proto3" json:"fatigue,omitempty"` LowAmmo bool `protobuf:"varint,11,opt,name=lowAmmo,proto3" json:"lowAmmo,omitempty"` Cover int32 `protobuf:"varint,12,opt,name=cover,proto3" json:"cover,omitempty"` Grid *Grid `protobuf:"bytes,13,opt,name=grid,proto3" json:"grid,omitempty"` PlayerInstructions string `protobuf:"bytes,14,opt,name=playerInstructions,proto3" json:"playerInstructions,omitempty"` ActionRequired bool `protobuf:"varint,15,opt,name=actionRequired,proto3" json:"actionRequired,omitempty"` Objective *Grid `protobuf:"bytes,16,opt,name=objective,proto3" json:"objective,omitempty"` MoveTo *Grid `protobuf:"bytes,17,opt,name=moveTo,proto3" json:"moveTo,omitempty"` GunTarget *Grid `protobuf:"bytes,18,opt,name=gunTarget,proto3" json:"gunTarget,omitempty"` SupportingUnit string `protobuf:"bytes,19,opt,name=supportingUnit,proto3" json:"supportingUnit,omitempty"` EngagedUnit string `protobuf:"bytes,20,opt,name=engagedUnit,proto3" json:"engagedUnit,omitempty"` Can *UnitAction `protobuf:"bytes,21,opt,name=can,proto3" json:"can,omitempty"` Has *UnitAction `protobuf:"bytes,22,opt,name=has,proto3" json:"has,omitempty"` Must *UnitAction `protobuf:"bytes,23,opt,name=must,proto3" json:"must,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Unit details that can change from turn to turn
func (*UnitGameState) Descriptor ¶
func (*UnitGameState) Descriptor() ([]byte, []int)
func (*UnitGameState) GetActionRequired ¶
func (m *UnitGameState) GetActionRequired() bool
func (*UnitGameState) GetCan ¶
func (m *UnitGameState) GetCan() *UnitAction
func (*UnitGameState) GetCover ¶
func (m *UnitGameState) GetCover() int32
func (*UnitGameState) GetEngagedUnit ¶
func (m *UnitGameState) GetEngagedUnit() string
func (*UnitGameState) GetFatigue ¶
func (m *UnitGameState) GetFatigue() int32
func (*UnitGameState) GetFormation ¶
func (m *UnitGameState) GetFormation() Formation
func (*UnitGameState) GetGrid ¶
func (m *UnitGameState) GetGrid() *Grid
func (*UnitGameState) GetGunTarget ¶
func (m *UnitGameState) GetGunTarget() *Grid
func (*UnitGameState) GetGunsDamaged ¶
func (m *UnitGameState) GetGunsDamaged() bool
func (*UnitGameState) GetGunsDeployed ¶
func (m *UnitGameState) GetGunsDeployed() bool
func (*UnitGameState) GetGunsStocked ¶
func (m *UnitGameState) GetGunsStocked() bool
func (*UnitGameState) GetHas ¶
func (m *UnitGameState) GetHas() *UnitAction
func (*UnitGameState) GetHasFired ¶
func (m *UnitGameState) GetHasFired() bool
func (*UnitGameState) GetHidden ¶
func (m *UnitGameState) GetHidden() bool
func (*UnitGameState) GetHits ¶
func (m *UnitGameState) GetHits() int32
func (*UnitGameState) GetLowAmmo ¶
func (m *UnitGameState) GetLowAmmo() bool
func (*UnitGameState) GetMoraleState ¶
func (m *UnitGameState) GetMoraleState() MoraleState
func (*UnitGameState) GetMoveTo ¶
func (m *UnitGameState) GetMoveTo() *Grid
func (*UnitGameState) GetMust ¶
func (m *UnitGameState) GetMust() *UnitAction
func (*UnitGameState) GetObjective ¶
func (m *UnitGameState) GetObjective() *Grid
func (*UnitGameState) GetPlayerInstructions ¶
func (m *UnitGameState) GetPlayerInstructions() string
func (*UnitGameState) GetSkirmishersDeployed ¶
func (m *UnitGameState) GetSkirmishersDeployed() int32
func (*UnitGameState) GetSupportingUnit ¶
func (m *UnitGameState) GetSupportingUnit() string
func (*UnitGameState) ProtoMessage ¶
func (*UnitGameState) ProtoMessage()
func (*UnitGameState) Reset ¶
func (m *UnitGameState) Reset()
func (*UnitGameState) String ¶
func (m *UnitGameState) String() string
func (*UnitGameState) XXX_DiscardUnknown ¶
func (m *UnitGameState) XXX_DiscardUnknown()
func (*UnitGameState) XXX_Marshal ¶
func (m *UnitGameState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UnitGameState) XXX_Merge ¶
func (m *UnitGameState) XXX_Merge(src proto.Message)
func (*UnitGameState) XXX_Size ¶
func (m *UnitGameState) XXX_Size() int
func (*UnitGameState) XXX_Unmarshal ¶
func (m *UnitGameState) XXX_Unmarshal(b []byte) error
type UnitType ¶
type UnitType int32
const ( UnitType_SUPPORT_UNIT UnitType = 0 UnitType_INFANTRY_LINE UnitType = 1 UnitType_INFANTRY_LIGHT UnitType = 2 UnitType_INFANTRY_GRENADIER UnitType = 3 UnitType_INFANTRY_IRREGULAR UnitType = 4 UnitType_INFANTRY_RIFLES UnitType = 5 UnitType_CAVALRY_LIGHT UnitType = 6 UnitType_CAVALRY_HUSSAR UnitType = 7 UnitType_CAVALRY_DRAGOON UnitType = 8 UnitType_CAVALRY_CUIRASSIER UnitType = 9 UnitType_CAVALRY_COSSACK UnitType = 10 UnitType_CAVALRY_HEAVY UnitType = 11 UnitType_CAVALRY_MEDIUM UnitType = 12 UnitType_CAVALRY_LANCER UnitType = 13 UnitType_ARTILLERY_BN UnitType = 14 UnitType_ARTILLERY_LIGHT UnitType = 15 UnitType_ARTILLERY_MEDIUM UnitType = 16 UnitType_ARTILLERY_HEAVY UnitType = 17 UnitType_ARTILLERY_HORSE UnitType = 18 UnitType_ARTILLERY_LIGHT_HORSE UnitType = 19 )
func (UnitType) EnumDescriptor ¶
type Units ¶
type Units struct { Commands []*Command `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Units) Descriptor ¶
func (*Units) GetCommands ¶
func (*Units) ProtoMessage ¶
func (*Units) ProtoMessage()
func (*Units) XXX_DiscardUnknown ¶
func (m *Units) XXX_DiscardUnknown()