api

package
v0.0.0-...-81339ea Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAvalonGame        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAvalonGame          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAvalonGame = fmt.Errorf("proto: unexpected end of group")
)
View Source
var GameSession_GameState_name = map[int32]string{
	0:   "GAME_CREATED",
	20:  "MISSION_TEAM_PICKING",
	25:  "MISSION_TEAM_VOTING",
	26:  "MISSION_SUCCESS_VOTING",
	30:  "MISSION_ENDED",
	100: "POST_MISSIONS_ACTIONS",
	150: "VIRTUOUS_TEAM_WON",
	155: "EVIL_TEAM_WON",
}
View Source
var GameSession_GameState_value = map[string]int32{
	"GAME_CREATED":           0,
	"MISSION_TEAM_PICKING":   20,
	"MISSION_TEAM_VOTING":    25,
	"MISSION_SUCCESS_VOTING": 26,
	"MISSION_ENDED":          30,
	"POST_MISSIONS_ACTIONS":  100,
	"VIRTUOUS_TEAM_WON":      150,
	"EVIL_TEAM_WON":          155,
}
View Source
var VoteContext_VoteOption_name = map[int32]string{
	0: "NEGATIVE",
	1: "POSITIVE",
}
View Source
var VoteContext_VoteOption_value = map[string]int32{
	"NEGATIVE": 0,
	"POSITIVE": 1,
}

Functions

func RegisterGameServiceServer

func RegisterGameServiceServer(s *grpc.Server, srv GameServiceServer)

Types

type AssassinationContext

type AssassinationContext struct {
	Session *GameSession `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty" bson:"session,omitempty"`
	Target  *Player      `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty" bson:"target,omitempty"`
}

func (*AssassinationContext) Descriptor

func (*AssassinationContext) Descriptor() ([]byte, []int)

func (*AssassinationContext) GetSession

func (m *AssassinationContext) GetSession() *GameSession

func (*AssassinationContext) GetTarget

func (m *AssassinationContext) GetTarget() *Player

func (*AssassinationContext) Marshal

func (m *AssassinationContext) Marshal() (dAtA []byte, err error)

func (*AssassinationContext) MarshalTo

func (m *AssassinationContext) MarshalTo(dAtA []byte) (int, error)

func (*AssassinationContext) MarshalToSizedBuffer

func (m *AssassinationContext) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AssassinationContext) ProtoMessage

func (*AssassinationContext) ProtoMessage()

func (*AssassinationContext) Reset

func (m *AssassinationContext) Reset()

func (*AssassinationContext) Size

func (m *AssassinationContext) Size() (n int)

func (*AssassinationContext) String

func (m *AssassinationContext) String() string

func (*AssassinationContext) Unmarshal

func (m *AssassinationContext) Unmarshal(dAtA []byte) error

func (*AssassinationContext) XXX_DiscardUnknown

func (m *AssassinationContext) XXX_DiscardUnknown()

func (*AssassinationContext) XXX_Marshal

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

func (*AssassinationContext) XXX_Merge

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

func (*AssassinationContext) XXX_Size

func (m *AssassinationContext) XXX_Size() int

func (*AssassinationContext) XXX_Unmarshal

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

type AssassinationOutcome

type AssassinationOutcome struct {
	Session         *GameSession `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty" bson:"session,omitempty"`
	MerlinWasKilled bool         `` /* 144-byte string literal not displayed */
}

func (*AssassinationOutcome) Descriptor

func (*AssassinationOutcome) Descriptor() ([]byte, []int)

func (*AssassinationOutcome) GetMerlinWasKilled

func (m *AssassinationOutcome) GetMerlinWasKilled() bool

func (*AssassinationOutcome) GetSession

func (m *AssassinationOutcome) GetSession() *GameSession

func (*AssassinationOutcome) Marshal

func (m *AssassinationOutcome) Marshal() (dAtA []byte, err error)

func (*AssassinationOutcome) MarshalTo

func (m *AssassinationOutcome) MarshalTo(dAtA []byte) (int, error)

func (*AssassinationOutcome) MarshalToSizedBuffer

func (m *AssassinationOutcome) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AssassinationOutcome) ProtoMessage

func (*AssassinationOutcome) ProtoMessage()

func (*AssassinationOutcome) Reset

func (m *AssassinationOutcome) Reset()

func (*AssassinationOutcome) Size

func (m *AssassinationOutcome) Size() (n int)

func (*AssassinationOutcome) String

func (m *AssassinationOutcome) String() string

func (*AssassinationOutcome) Unmarshal

func (m *AssassinationOutcome) Unmarshal(dAtA []byte) error

func (*AssassinationOutcome) XXX_DiscardUnknown

func (m *AssassinationOutcome) XXX_DiscardUnknown()

func (*AssassinationOutcome) XXX_Marshal

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

func (*AssassinationOutcome) XXX_Merge

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

func (*AssassinationOutcome) XXX_Size

func (m *AssassinationOutcome) XXX_Size() int

func (*AssassinationOutcome) XXX_Unmarshal

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

type AssignTeamContext

type AssignTeamContext struct {
	Session *GameSession `protobuf:"bytes,10,opt,name=session,proto3" json:"session,omitempty" bson:"session,omitempty"`
	Team    *MissionTeam `protobuf:"bytes,20,opt,name=team,proto3" json:"team,omitempty" bson:"team,omitempty"`
}

func (*AssignTeamContext) Descriptor

func (*AssignTeamContext) Descriptor() ([]byte, []int)

func (*AssignTeamContext) GetSession

func (m *AssignTeamContext) GetSession() *GameSession

func (*AssignTeamContext) GetTeam

func (m *AssignTeamContext) GetTeam() *MissionTeam

func (*AssignTeamContext) Marshal

func (m *AssignTeamContext) Marshal() (dAtA []byte, err error)

func (*AssignTeamContext) MarshalTo

func (m *AssignTeamContext) MarshalTo(dAtA []byte) (int, error)

func (*AssignTeamContext) MarshalToSizedBuffer

func (m *AssignTeamContext) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AssignTeamContext) ProtoMessage

func (*AssignTeamContext) ProtoMessage()

func (*AssignTeamContext) Reset

func (m *AssignTeamContext) Reset()

func (*AssignTeamContext) Size

func (m *AssignTeamContext) Size() (n int)

func (*AssignTeamContext) String

func (m *AssignTeamContext) String() string

func (*AssignTeamContext) Unmarshal

func (m *AssignTeamContext) Unmarshal(dAtA []byte) error

func (*AssignTeamContext) XXX_DiscardUnknown

func (m *AssignTeamContext) XXX_DiscardUnknown()

func (*AssignTeamContext) XXX_Marshal

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

func (*AssignTeamContext) XXX_Merge

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

func (*AssignTeamContext) XXX_Size

func (m *AssignTeamContext) XXX_Size() int

func (*AssignTeamContext) XXX_Unmarshal

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

type EvilTeam

type EvilTeam struct {
	Members  []*Player `protobuf:"bytes,10,rep,name=members,proto3" json:"members,omitempty" bson:"members,omitempty"`
	Assassin *Player   `protobuf:"bytes,20,opt,name=assassin,proto3" json:"assassin,omitempty" bson:"assassin,omitempty"`
	//Rest are ignored for now
	Oberon  *Player `protobuf:"bytes,30,opt,name=oberon,proto3" json:"oberon,omitempty" bson:"oberon,omitempty"`
	Morgana *Player `protobuf:"bytes,40,opt,name=morgana,proto3" json:"morgana,omitempty" bson:"morgana,omitempty"`
}

func (*EvilTeam) Descriptor

func (*EvilTeam) Descriptor() ([]byte, []int)

func (*EvilTeam) GetAssassin

func (m *EvilTeam) GetAssassin() *Player

func (*EvilTeam) GetMembers

func (m *EvilTeam) GetMembers() []*Player

func (*EvilTeam) GetMorgana

func (m *EvilTeam) GetMorgana() *Player

func (*EvilTeam) GetOberon

func (m *EvilTeam) GetOberon() *Player

func (*EvilTeam) Marshal

func (m *EvilTeam) Marshal() (dAtA []byte, err error)

func (*EvilTeam) MarshalTo

func (m *EvilTeam) MarshalTo(dAtA []byte) (int, error)

func (*EvilTeam) MarshalToSizedBuffer

func (m *EvilTeam) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EvilTeam) ProtoMessage

func (*EvilTeam) ProtoMessage()

func (*EvilTeam) Reset

func (m *EvilTeam) Reset()

func (*EvilTeam) Size

func (m *EvilTeam) Size() (n int)

func (*EvilTeam) String

func (m *EvilTeam) String() string

func (*EvilTeam) Unmarshal

func (m *EvilTeam) Unmarshal(dAtA []byte) error

func (*EvilTeam) XXX_DiscardUnknown

func (m *EvilTeam) XXX_DiscardUnknown()

func (*EvilTeam) XXX_Marshal

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

func (*EvilTeam) XXX_Merge

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

func (*EvilTeam) XXX_Size

func (m *EvilTeam) XXX_Size() int

func (*EvilTeam) XXX_Unmarshal

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

type GameConfig

type GameConfig struct {
	GoodTeam   *VirtuousTeam   `protobuf:"bytes,10,opt,name=good_team,json=goodTeam,proto3" json:"good_team,omitempty" bson:"good_team,omitempty"`
	EvilTeam   *EvilTeam       `protobuf:"bytes,20,opt,name=evil_team,json=evilTeam,proto3" json:"evil_team,omitempty" bson:"evil_team,omitempty"`
	Extensions *GameExtensions `protobuf:"bytes,100,opt,name=extensions,proto3" json:"extensions,omitempty" bson:"extensions,omitempty"`
}

GameConfig holds data about teams and session configuration to create session with

func (*GameConfig) Descriptor

func (*GameConfig) Descriptor() ([]byte, []int)

func (*GameConfig) GetEvilTeam

func (m *GameConfig) GetEvilTeam() *EvilTeam

func (*GameConfig) GetExtensions

func (m *GameConfig) GetExtensions() *GameExtensions

func (*GameConfig) GetGoodTeam

func (m *GameConfig) GetGoodTeam() *VirtuousTeam

func (*GameConfig) Marshal

func (m *GameConfig) Marshal() (dAtA []byte, err error)

func (*GameConfig) MarshalTo

func (m *GameConfig) MarshalTo(dAtA []byte) (int, error)

func (*GameConfig) MarshalToSizedBuffer

func (m *GameConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GameConfig) ProtoMessage

func (*GameConfig) ProtoMessage()

func (*GameConfig) Reset

func (m *GameConfig) Reset()

func (*GameConfig) Size

func (m *GameConfig) Size() (n int)

func (*GameConfig) String

func (m *GameConfig) String() string

func (*GameConfig) Unmarshal

func (m *GameConfig) Unmarshal(dAtA []byte) error

func (*GameConfig) XXX_DiscardUnknown

func (m *GameConfig) XXX_DiscardUnknown()

func (*GameConfig) XXX_Marshal

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

func (*GameConfig) XXX_Merge

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

func (*GameConfig) XXX_Size

func (m *GameConfig) XXX_Size() int

func (*GameConfig) XXX_Unmarshal

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

type GameExtensions

type GameExtensions struct {
	//Merlin and assassin are always in game
	PercivalAndMorgana bool `` /* 156-byte string literal not displayed */
	Oberon             bool `protobuf:"varint,2,opt,name=oberon,proto3" json:"oberon,omitempty" bson:"oberon,omitempty"`
	Mordred            bool `protobuf:"varint,3,opt,name=mordred,proto3" json:"mordred,omitempty" bson:"mordred,omitempty"`
}

GameExtensions holds flags specifying additional player roles and rules to be used during game session

func (*GameExtensions) Descriptor

func (*GameExtensions) Descriptor() ([]byte, []int)

func (*GameExtensions) GetMordred

func (m *GameExtensions) GetMordred() bool

func (*GameExtensions) GetOberon

func (m *GameExtensions) GetOberon() bool

func (*GameExtensions) GetPercivalAndMorgana

func (m *GameExtensions) GetPercivalAndMorgana() bool

func (*GameExtensions) Marshal

func (m *GameExtensions) Marshal() (dAtA []byte, err error)

func (*GameExtensions) MarshalTo

func (m *GameExtensions) MarshalTo(dAtA []byte) (int, error)

func (*GameExtensions) MarshalToSizedBuffer

func (m *GameExtensions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GameExtensions) ProtoMessage

func (*GameExtensions) ProtoMessage()

func (*GameExtensions) Reset

func (m *GameExtensions) Reset()

func (*GameExtensions) Size

func (m *GameExtensions) Size() (n int)

func (*GameExtensions) String

func (m *GameExtensions) String() string

func (*GameExtensions) Unmarshal

func (m *GameExtensions) Unmarshal(dAtA []byte) error

func (*GameExtensions) XXX_DiscardUnknown

func (m *GameExtensions) XXX_DiscardUnknown()

func (*GameExtensions) XXX_Marshal

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

func (*GameExtensions) XXX_Merge

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

func (*GameExtensions) XXX_Size

func (m *GameExtensions) XXX_Size() int

func (*GameExtensions) XXX_Unmarshal

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

type GameServiceClient

type GameServiceClient interface {
	//CreateSession with specified players and options.
	//Should be called first to obtain a handle for created game,
	//that will be used in most other parts of API.
	CreateSession(ctx context.Context, in *GameConfig, opts ...grpc.CallOption) (*GameSession, error)
	//TerminateSession end current game session, freeing it's UUID and other resources
	TerminateSession(ctx context.Context, in *GameSession, opts ...grpc.CallOption) (*types.Empty, error)
	//GetSession returns in-progress game session data
	GetSession(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*GameSession, error)
	//GetEvilTeam returns information about the bad boys in the game session
	GetEvilTeam(ctx context.Context, in *GameSession, opts ...grpc.CallOption) (*EvilTeam, error)
	//GetVirtuousTeam returns information about the good guys in the game session
	GetVirtuousTeam(ctx context.Context, in *GameSession, opts ...grpc.CallOption) (*VirtuousTeam, error)
	//PushGameState proceeds game to the next state, returns updated session data
	PushGameState(ctx context.Context, in *GameSession, opts ...grpc.CallOption) (*GameSession, error)
	//GetPendingMission returns current mission in progress
	GetPendingMission(ctx context.Context, in *GameSession, opts ...grpc.CallOption) (*PendingMission, error)
	//AssignMissionTeam proposes a set of players, picked by leader, to be voted for sending them on a mission.
	//Returns null if there is no mission pending.
	AssignMissionTeam(ctx context.Context, in *AssignTeamContext, opts ...grpc.CallOption) (*types.Empty, error)
	//GetMissionTeam returns a team, assigned for pending mission, if any.
	//Returns null if there is no team assigned yet.
	GetMissionTeam(ctx context.Context, in *GameSession, opts ...grpc.CallOption) (*MissionTeam, error)
	//Votes are only accepted for games in MISSION_*_VOTING states
	//Call PushGameState AFTER ALL players voted!
	VoteForMissionTeam(ctx context.Context, in *VoteContext, opts ...grpc.CallOption) (*types.Empty, error)
	VoteForMissionSuccess(ctx context.Context, in *VoteContext, opts ...grpc.CallOption) (*types.Empty, error)
	//AssassinateAllegedMerlin is only used in a POST_MISSIONS_ACTIONS state when good team are winning
	//Its the last chance for evil team to win, if they can guess merlin's identity
	//Returns an AssassinationOutcome, that reports if killed player was merlin.
	//GameState in response is determining which team won the game, will ether be VIRTUOUS_TEAM_WON or EVIL_TEAM_WON
	AssassinateAllegedMerlin(ctx context.Context, in *AssassinationContext, opts ...grpc.CallOption) (*AssassinationOutcome, 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 {
	//CreateSession with specified players and options.
	//Should be called first to obtain a handle for created game,
	//that will be used in most other parts of API.
	CreateSession(context.Context, *GameConfig) (*GameSession, error)
	//TerminateSession end current game session, freeing it's UUID and other resources
	TerminateSession(context.Context, *GameSession) (*types.Empty, error)
	//GetSession returns in-progress game session data
	GetSession(context.Context, *UUID) (*GameSession, error)
	//GetEvilTeam returns information about the bad boys in the game session
	GetEvilTeam(context.Context, *GameSession) (*EvilTeam, error)
	//GetVirtuousTeam returns information about the good guys in the game session
	GetVirtuousTeam(context.Context, *GameSession) (*VirtuousTeam, error)
	//PushGameState proceeds game to the next state, returns updated session data
	PushGameState(context.Context, *GameSession) (*GameSession, error)
	//GetPendingMission returns current mission in progress
	GetPendingMission(context.Context, *GameSession) (*PendingMission, error)
	//AssignMissionTeam proposes a set of players, picked by leader, to be voted for sending them on a mission.
	//Returns null if there is no mission pending.
	AssignMissionTeam(context.Context, *AssignTeamContext) (*types.Empty, error)
	//GetMissionTeam returns a team, assigned for pending mission, if any.
	//Returns null if there is no team assigned yet.
	GetMissionTeam(context.Context, *GameSession) (*MissionTeam, error)
	//Votes are only accepted for games in MISSION_*_VOTING states
	//Call PushGameState AFTER ALL players voted!
	VoteForMissionTeam(context.Context, *VoteContext) (*types.Empty, error)
	VoteForMissionSuccess(context.Context, *VoteContext) (*types.Empty, error)
	//AssassinateAllegedMerlin is only used in a POST_MISSIONS_ACTIONS state when good team are winning
	//Its the last chance for evil team to win, if they can guess merlin's identity
	//Returns an AssassinationOutcome, that reports if killed player was merlin.
	//GameState in response is determining which team won the game, will ether be VIRTUOUS_TEAM_WON or EVIL_TEAM_WON
	AssassinateAllegedMerlin(context.Context, *AssassinationContext) (*AssassinationOutcome, error)
}

GameServiceServer is the server API for GameService service.

type GameSession

type GameSession struct {
	GameId            *UUID                 `protobuf:"bytes,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty" bson:"game_id,omitempty"`
	State             GameSession_GameState `protobuf:"varint,10,opt,name=state,proto3,enum=proto.GameSession_GameState" json:"state,omitempty" bson:"state,omitempty"`
	EndgameReason     string                `` /* 133-byte string literal not displayed */
	Leader            *Player               `protobuf:"bytes,20,opt,name=leader,proto3" json:"leader,omitempty" bson:"leader,omitempty"`
	LastMissionResult *MissionResult        `` /* 152-byte string literal not displayed */
	MissionsPassed    int32                 `` /* 138-byte string literal not displayed */
	MissionsFailed    int32                 `` /* 138-byte string literal not displayed */
}

GameSession describes the game in progress Used in most parts of the API specifying exact session to perform actions on

func (*GameSession) Descriptor

func (*GameSession) Descriptor() ([]byte, []int)

func (*GameSession) GetEndgameReason

func (m *GameSession) GetEndgameReason() string

func (*GameSession) GetGameId

func (m *GameSession) GetGameId() *UUID

func (*GameSession) GetLastMissionResult

func (m *GameSession) GetLastMissionResult() *MissionResult

func (*GameSession) GetLeader

func (m *GameSession) GetLeader() *Player

func (*GameSession) GetMissionsFailed

func (m *GameSession) GetMissionsFailed() int32

func (*GameSession) GetMissionsPassed

func (m *GameSession) GetMissionsPassed() int32

func (*GameSession) GetState

func (m *GameSession) GetState() GameSession_GameState

func (*GameSession) Marshal

func (m *GameSession) Marshal() (dAtA []byte, err error)

func (*GameSession) MarshalTo

func (m *GameSession) MarshalTo(dAtA []byte) (int, error)

func (*GameSession) MarshalToSizedBuffer

func (m *GameSession) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GameSession) ProtoMessage

func (*GameSession) ProtoMessage()

func (*GameSession) Reset

func (m *GameSession) Reset()

func (*GameSession) Size

func (m *GameSession) Size() (n int)

func (*GameSession) String

func (m *GameSession) String() string

func (*GameSession) Unmarshal

func (m *GameSession) Unmarshal(dAtA []byte) error

func (*GameSession) XXX_DiscardUnknown

func (m *GameSession) XXX_DiscardUnknown()

func (*GameSession) XXX_Marshal

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

func (*GameSession) XXX_Merge

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

func (*GameSession) XXX_Size

func (m *GameSession) XXX_Size() int

func (*GameSession) XXX_Unmarshal

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

type GameSession_GameState

type GameSession_GameState int32
const (
	GameSession_GAME_CREATED GameSession_GameState = 0
	//MISSION_STARTED = 10;
	GameSession_MISSION_TEAM_PICKING   GameSession_GameState = 20
	GameSession_MISSION_TEAM_VOTING    GameSession_GameState = 25
	GameSession_MISSION_SUCCESS_VOTING GameSession_GameState = 26
	GameSession_MISSION_ENDED          GameSession_GameState = 30
	GameSession_POST_MISSIONS_ACTIONS  GameSession_GameState = 100
	GameSession_VIRTUOUS_TEAM_WON      GameSession_GameState = 150
	GameSession_EVIL_TEAM_WON          GameSession_GameState = 155
)

func (GameSession_GameState) EnumDescriptor

func (GameSession_GameState) EnumDescriptor() ([]byte, []int)

func (GameSession_GameState) String

func (x GameSession_GameState) String() string

type MissionResult

type MissionResult struct {
	Failed bool `protobuf:"varint,10,opt,name=failed,proto3" json:"failed,omitempty" bson:"failed,omitempty"`
	//TODO: There must be a better way, than just 2 lists
	PositiveVotes int32 `` /* 134-byte string literal not displayed */
	NegativeVotes int32 `` /* 134-byte string literal not displayed */
}

func (*MissionResult) Descriptor

func (*MissionResult) Descriptor() ([]byte, []int)

func (*MissionResult) GetFailed

func (m *MissionResult) GetFailed() bool

func (*MissionResult) GetNegativeVotes

func (m *MissionResult) GetNegativeVotes() int32

func (*MissionResult) GetPositiveVotes

func (m *MissionResult) GetPositiveVotes() int32

func (*MissionResult) Marshal

func (m *MissionResult) Marshal() (dAtA []byte, err error)

func (*MissionResult) MarshalTo

func (m *MissionResult) MarshalTo(dAtA []byte) (int, error)

func (*MissionResult) MarshalToSizedBuffer

func (m *MissionResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MissionResult) ProtoMessage

func (*MissionResult) ProtoMessage()

func (*MissionResult) Reset

func (m *MissionResult) Reset()

func (*MissionResult) Size

func (m *MissionResult) Size() (n int)

func (*MissionResult) String

func (m *MissionResult) String() string

func (*MissionResult) Unmarshal

func (m *MissionResult) Unmarshal(dAtA []byte) error

func (*MissionResult) XXX_DiscardUnknown

func (m *MissionResult) XXX_DiscardUnknown()

func (*MissionResult) XXX_Marshal

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

func (*MissionResult) XXX_Merge

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

func (*MissionResult) XXX_Size

func (m *MissionResult) XXX_Size() int

func (*MissionResult) XXX_Unmarshal

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

type MissionTeam

type MissionTeam struct {
	Members []*Player `protobuf:"bytes,10,rep,name=members,proto3" json:"members,omitempty" bson:"members,omitempty"`
}

func (*MissionTeam) Descriptor

func (*MissionTeam) Descriptor() ([]byte, []int)

func (*MissionTeam) GetMembers

func (m *MissionTeam) GetMembers() []*Player

func (*MissionTeam) Marshal

func (m *MissionTeam) Marshal() (dAtA []byte, err error)

func (*MissionTeam) MarshalTo

func (m *MissionTeam) MarshalTo(dAtA []byte) (int, error)

func (*MissionTeam) MarshalToSizedBuffer

func (m *MissionTeam) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MissionTeam) ProtoMessage

func (*MissionTeam) ProtoMessage()

func (*MissionTeam) Reset

func (m *MissionTeam) Reset()

func (*MissionTeam) Size

func (m *MissionTeam) Size() (n int)

func (*MissionTeam) String

func (m *MissionTeam) String() string

func (*MissionTeam) Unmarshal

func (m *MissionTeam) Unmarshal(dAtA []byte) error

func (*MissionTeam) XXX_DiscardUnknown

func (m *MissionTeam) XXX_DiscardUnknown()

func (*MissionTeam) XXX_Marshal

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

func (*MissionTeam) XXX_Merge

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

func (*MissionTeam) XXX_Size

func (m *MissionTeam) XXX_Size() int

func (*MissionTeam) XXX_Unmarshal

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

type PendingMission

type PendingMission struct {
	MissionNumber       uint32 `` /* 134-byte string literal not displayed */
	TeamPickingAttempts uint32 `` /* 161-byte string literal not displayed */
}

func (*PendingMission) Descriptor

func (*PendingMission) Descriptor() ([]byte, []int)

func (*PendingMission) GetMissionNumber

func (m *PendingMission) GetMissionNumber() uint32

func (*PendingMission) GetTeamPickingAttempts

func (m *PendingMission) GetTeamPickingAttempts() uint32

func (*PendingMission) Marshal

func (m *PendingMission) Marshal() (dAtA []byte, err error)

func (*PendingMission) MarshalTo

func (m *PendingMission) MarshalTo(dAtA []byte) (int, error)

func (*PendingMission) MarshalToSizedBuffer

func (m *PendingMission) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PendingMission) ProtoMessage

func (*PendingMission) ProtoMessage()

func (*PendingMission) Reset

func (m *PendingMission) Reset()

func (*PendingMission) Size

func (m *PendingMission) Size() (n int)

func (*PendingMission) String

func (m *PendingMission) String() string

func (*PendingMission) Unmarshal

func (m *PendingMission) Unmarshal(dAtA []byte) error

func (*PendingMission) XXX_DiscardUnknown

func (m *PendingMission) XXX_DiscardUnknown()

func (*PendingMission) XXX_Marshal

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

func (*PendingMission) XXX_Merge

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

func (*PendingMission) XXX_Size

func (m *PendingMission) XXX_Size() int

func (*PendingMission) XXX_Unmarshal

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

type Player

type Player struct {
	Id       uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" bson:"id,omitempty"`
	UserName string `protobuf:"bytes,10,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty" bson:"user_name,omitempty"`
}

func (*Player) Descriptor

func (*Player) Descriptor() ([]byte, []int)

func (*Player) GetId

func (m *Player) GetId() uint64

func (*Player) GetUserName

func (m *Player) GetUserName() string

func (*Player) Marshal

func (m *Player) Marshal() (dAtA []byte, err error)

func (*Player) MarshalTo

func (m *Player) MarshalTo(dAtA []byte) (int, error)

func (*Player) MarshalToSizedBuffer

func (m *Player) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) Reset

func (m *Player) Reset()

func (*Player) Size

func (m *Player) Size() (n int)

func (*Player) String

func (m *Player) String() string

func (*Player) Unmarshal

func (m *Player) Unmarshal(dAtA []byte) error

func (*Player) XXX_DiscardUnknown

func (m *Player) XXX_DiscardUnknown()

func (*Player) XXX_Marshal

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

func (*Player) XXX_Merge

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

func (*Player) XXX_Size

func (m *Player) XXX_Size() int

func (*Player) XXX_Unmarshal

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

type UUID

type UUID struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" bson:"value,omitempty"`
}

UUID v4 as in RFC 4122 for identifying game sessions

func (*UUID) Descriptor

func (*UUID) Descriptor() ([]byte, []int)

func (*UUID) GetValue

func (m *UUID) GetValue() string

func (*UUID) Marshal

func (m *UUID) Marshal() (dAtA []byte, err error)

func (*UUID) MarshalTo

func (m *UUID) MarshalTo(dAtA []byte) (int, error)

func (*UUID) MarshalToSizedBuffer

func (m *UUID) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UUID) ProtoMessage

func (*UUID) ProtoMessage()

func (*UUID) Reset

func (m *UUID) Reset()

func (*UUID) Size

func (m *UUID) Size() (n int)

func (*UUID) String

func (m *UUID) String() string

func (*UUID) Unmarshal

func (m *UUID) Unmarshal(dAtA []byte) error

func (*UUID) XXX_DiscardUnknown

func (m *UUID) XXX_DiscardUnknown()

func (*UUID) XXX_Marshal

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

func (*UUID) XXX_Merge

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

func (*UUID) XXX_Size

func (m *UUID) XXX_Size() int

func (*UUID) XXX_Unmarshal

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

type UnimplementedGameServiceServer

type UnimplementedGameServiceServer struct {
}

UnimplementedGameServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedGameServiceServer) AssassinateAllegedMerlin

func (*UnimplementedGameServiceServer) AssignMissionTeam

func (*UnimplementedGameServiceServer) CreateSession

func (*UnimplementedGameServiceServer) GetEvilTeam

func (*UnimplementedGameServiceServer) GetMissionTeam

func (*UnimplementedGameServiceServer) GetPendingMission

func (*UnimplementedGameServiceServer) GetSession

func (*UnimplementedGameServiceServer) GetVirtuousTeam

func (*UnimplementedGameServiceServer) PushGameState

func (*UnimplementedGameServiceServer) TerminateSession

func (*UnimplementedGameServiceServer) TerminateSession(ctx context.Context, req *GameSession) (*types.Empty, error)

func (*UnimplementedGameServiceServer) VoteForMissionSuccess

func (*UnimplementedGameServiceServer) VoteForMissionSuccess(ctx context.Context, req *VoteContext) (*types.Empty, error)

func (*UnimplementedGameServiceServer) VoteForMissionTeam

func (*UnimplementedGameServiceServer) VoteForMissionTeam(ctx context.Context, req *VoteContext) (*types.Empty, error)

type VirtuousTeam

type VirtuousTeam struct {
	Members  []*Player `protobuf:"bytes,10,rep,name=members,proto3" json:"members,omitempty" bson:"members,omitempty"`
	Merlin   *Player   `protobuf:"bytes,20,opt,name=merlin,proto3" json:"merlin,omitempty" bson:"merlin,omitempty"`
	Percival *Player   `protobuf:"bytes,30,opt,name=percival,proto3" json:"percival,omitempty" bson:"percival,omitempty"`
}

func (*VirtuousTeam) Descriptor

func (*VirtuousTeam) Descriptor() ([]byte, []int)

func (*VirtuousTeam) GetMembers

func (m *VirtuousTeam) GetMembers() []*Player

func (*VirtuousTeam) GetMerlin

func (m *VirtuousTeam) GetMerlin() *Player

func (*VirtuousTeam) GetPercival

func (m *VirtuousTeam) GetPercival() *Player

func (*VirtuousTeam) Marshal

func (m *VirtuousTeam) Marshal() (dAtA []byte, err error)

func (*VirtuousTeam) MarshalTo

func (m *VirtuousTeam) MarshalTo(dAtA []byte) (int, error)

func (*VirtuousTeam) MarshalToSizedBuffer

func (m *VirtuousTeam) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VirtuousTeam) ProtoMessage

func (*VirtuousTeam) ProtoMessage()

func (*VirtuousTeam) Reset

func (m *VirtuousTeam) Reset()

func (*VirtuousTeam) Size

func (m *VirtuousTeam) Size() (n int)

func (*VirtuousTeam) String

func (m *VirtuousTeam) String() string

func (*VirtuousTeam) Unmarshal

func (m *VirtuousTeam) Unmarshal(dAtA []byte) error

func (*VirtuousTeam) XXX_DiscardUnknown

func (m *VirtuousTeam) XXX_DiscardUnknown()

func (*VirtuousTeam) XXX_Marshal

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

func (*VirtuousTeam) XXX_Merge

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

func (*VirtuousTeam) XXX_Size

func (m *VirtuousTeam) XXX_Size() int

func (*VirtuousTeam) XXX_Unmarshal

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

type VoteContext

type VoteContext struct {
	Session *GameSession           `protobuf:"bytes,10,opt,name=session,proto3" json:"session,omitempty" bson:"session,omitempty"`
	Voter   *Player                `protobuf:"bytes,20,opt,name=voter,proto3" json:"voter,omitempty" bson:"voter,omitempty"`
	Vote    VoteContext_VoteOption `protobuf:"varint,30,opt,name=vote,proto3,enum=proto.VoteContext_VoteOption" json:"vote,omitempty" bson:"vote,omitempty"`
}

func (*VoteContext) Descriptor

func (*VoteContext) Descriptor() ([]byte, []int)

func (*VoteContext) GetSession

func (m *VoteContext) GetSession() *GameSession

func (*VoteContext) GetVote

func (m *VoteContext) GetVote() VoteContext_VoteOption

func (*VoteContext) GetVoter

func (m *VoteContext) GetVoter() *Player

func (*VoteContext) Marshal

func (m *VoteContext) Marshal() (dAtA []byte, err error)

func (*VoteContext) MarshalTo

func (m *VoteContext) MarshalTo(dAtA []byte) (int, error)

func (*VoteContext) MarshalToSizedBuffer

func (m *VoteContext) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VoteContext) ProtoMessage

func (*VoteContext) ProtoMessage()

func (*VoteContext) Reset

func (m *VoteContext) Reset()

func (*VoteContext) Size

func (m *VoteContext) Size() (n int)

func (*VoteContext) String

func (m *VoteContext) String() string

func (*VoteContext) Unmarshal

func (m *VoteContext) Unmarshal(dAtA []byte) error

func (*VoteContext) XXX_DiscardUnknown

func (m *VoteContext) XXX_DiscardUnknown()

func (*VoteContext) XXX_Marshal

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

func (*VoteContext) XXX_Merge

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

func (*VoteContext) XXX_Size

func (m *VoteContext) XXX_Size() int

func (*VoteContext) XXX_Unmarshal

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

type VoteContext_VoteOption

type VoteContext_VoteOption int32
const (
	VoteContext_NEGATIVE VoteContext_VoteOption = 0
	VoteContext_POSITIVE VoteContext_VoteOption = 1
)

func (VoteContext_VoteOption) EnumDescriptor

func (VoteContext_VoteOption) EnumDescriptor() ([]byte, []int)

func (VoteContext_VoteOption) String

func (x VoteContext_VoteOption) String() string

Jump to

Keyboard shortcuts

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