game_tracker

package
v0.0.0-...-5b44b94 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mode_name = map[int32]string{
		0: "TowerDefenceGame",
	}
	Mode_value = map[string]int32{
		"TowerDefenceGame": 0,
	}
)

Enum value maps for Mode.

View Source
var File_game_tracker_game_tracker_proto protoreflect.FileDescriptor
View Source
var GameTracker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "towerdefence.cc.service.game_tracker.GameTracker",
	HandlerType: (*GameTrackerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPlayerGameHistory",
			Handler:    _GameTracker_GetPlayerGameHistory_Handler,
		},
		{
			MethodName: "GetPlayerLiveGame",
			Handler:    _GameTracker_GetPlayerLiveGame_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "game_tracker/game_tracker.proto",
}

GameTracker_ServiceDesc is the grpc.ServiceDesc for GameTracker service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGameTrackerServer

func RegisterGameTrackerServer(s grpc.ServiceRegistrar, srv GameTrackerServer)

Types

type GameTrackerClient

type GameTrackerClient interface {
	GetPlayerGameHistory(ctx context.Context, in *PagedPlayerRequest, opts ...grpc.CallOption) (*PlayerGameHistoryResponse, error)
	GetPlayerLiveGame(ctx context.Context, in *PlayerRequest, opts ...grpc.CallOption) (*LiveGame, error)
}

GameTrackerClient is the client API for GameTracker service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type GameTrackerServer

type GameTrackerServer interface {
	GetPlayerGameHistory(context.Context, *PagedPlayerRequest) (*PlayerGameHistoryResponse, error)
	GetPlayerLiveGame(context.Context, *PlayerRequest) (*LiveGame, error)
	// contains filtered or unexported methods
}

GameTrackerServer is the server API for GameTracker service. All implementations must embed UnimplementedGameTrackerServer for forward compatibility

type HistoricGame

type HistoricGame struct {
	GameId string `protobuf:"bytes,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"`
	Mode   Mode   `protobuf:"varint,2,opt,name=mode,proto3,enum=towerdefence.cc.service.game_tracker.Mode" json:"mode,omitempty"`
	// Types that are assignable to GameType:
	//
	//	*HistoricGame_TowerDefence
	GameType isHistoricGame_GameType `protobuf_oneof:"game_type"`
	// contains filtered or unexported fields
}

func (*HistoricGame) Descriptor deprecated

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

Deprecated: Use HistoricGame.ProtoReflect.Descriptor instead.

func (*HistoricGame) GetGameId

func (x *HistoricGame) GetGameId() string

func (*HistoricGame) GetGameType

func (m *HistoricGame) GetGameType() isHistoricGame_GameType

func (*HistoricGame) GetMode

func (x *HistoricGame) GetMode() Mode

func (*HistoricGame) GetTowerDefence

func (x *HistoricGame) GetTowerDefence() *HistoricTowerDefenceGame

func (*HistoricGame) ProtoMessage

func (*HistoricGame) ProtoMessage()

func (*HistoricGame) ProtoReflect

func (x *HistoricGame) ProtoReflect() protoreflect.Message

func (*HistoricGame) Reset

func (x *HistoricGame) Reset()

func (*HistoricGame) String

func (x *HistoricGame) String() string

type HistoricGame_TowerDefence

type HistoricGame_TowerDefence struct {
	TowerDefence *HistoricTowerDefenceGame `protobuf:"bytes,3,opt,name=tower_defence,json=towerDefence,proto3,oneof"`
}

type HistoricTowerDefenceGame

type HistoricTowerDefenceGame struct {
	RedHealth  uint32   `protobuf:"varint,1,opt,name=red_health,json=redHealth,proto3" json:"red_health,omitempty"`
	BlueHealth uint32   `protobuf:"varint,2,opt,name=blue_health,json=blueHealth,proto3" json:"blue_health,omitempty"`
	PlayerIds  []string `protobuf:"bytes,3,rep,name=player_ids,json=playerIds,proto3" json:"player_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*HistoricTowerDefenceGame) Descriptor deprecated

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

Deprecated: Use HistoricTowerDefenceGame.ProtoReflect.Descriptor instead.

func (*HistoricTowerDefenceGame) GetBlueHealth

func (x *HistoricTowerDefenceGame) GetBlueHealth() uint32

func (*HistoricTowerDefenceGame) GetPlayerIds

func (x *HistoricTowerDefenceGame) GetPlayerIds() []string

func (*HistoricTowerDefenceGame) GetRedHealth

func (x *HistoricTowerDefenceGame) GetRedHealth() uint32

func (*HistoricTowerDefenceGame) ProtoMessage

func (*HistoricTowerDefenceGame) ProtoMessage()

func (*HistoricTowerDefenceGame) ProtoReflect

func (x *HistoricTowerDefenceGame) ProtoReflect() protoreflect.Message

func (*HistoricTowerDefenceGame) Reset

func (x *HistoricTowerDefenceGame) Reset()

func (*HistoricTowerDefenceGame) String

func (x *HistoricTowerDefenceGame) String() string

type LiveGame

type LiveGame struct {
	GameId string `protobuf:"bytes,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"`
	Mode   Mode   `protobuf:"varint,2,opt,name=mode,proto3,enum=towerdefence.cc.service.game_tracker.Mode" json:"mode,omitempty"`
	// Types that are assignable to GameType:
	//
	//	*LiveGame_TowerDefence
	GameType isLiveGame_GameType `protobuf_oneof:"game_type"`
	// contains filtered or unexported fields
}

func (*LiveGame) Descriptor deprecated

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

Deprecated: Use LiveGame.ProtoReflect.Descriptor instead.

func (*LiveGame) GetGameId

func (x *LiveGame) GetGameId() string

func (*LiveGame) GetGameType

func (m *LiveGame) GetGameType() isLiveGame_GameType

func (*LiveGame) GetMode

func (x *LiveGame) GetMode() Mode

func (*LiveGame) GetTowerDefence

func (x *LiveGame) GetTowerDefence() *LiveTowerDefenceGame

func (*LiveGame) ProtoMessage

func (*LiveGame) ProtoMessage()

func (*LiveGame) ProtoReflect

func (x *LiveGame) ProtoReflect() protoreflect.Message

func (*LiveGame) Reset

func (x *LiveGame) Reset()

func (*LiveGame) String

func (x *LiveGame) String() string

type LiveGame_TowerDefence

type LiveGame_TowerDefence struct {
	TowerDefence *LiveTowerDefenceGame `protobuf:"bytes,3,opt,name=tower_defence,json=towerDefence,proto3,oneof"`
}

type LiveTowerDefenceGame

type LiveTowerDefenceGame struct {
	RedHealth  uint32   `protobuf:"varint,1,opt,name=red_health,json=redHealth,proto3" json:"red_health,omitempty"`
	BlueHealth uint32   `protobuf:"varint,2,opt,name=blue_health,json=blueHealth,proto3" json:"blue_health,omitempty"`
	PlayerIds  []string `protobuf:"bytes,3,rep,name=player_ids,json=playerIds,proto3" json:"player_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*LiveTowerDefenceGame) Descriptor deprecated

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

Deprecated: Use LiveTowerDefenceGame.ProtoReflect.Descriptor instead.

func (*LiveTowerDefenceGame) GetBlueHealth

func (x *LiveTowerDefenceGame) GetBlueHealth() uint32

func (*LiveTowerDefenceGame) GetPlayerIds

func (x *LiveTowerDefenceGame) GetPlayerIds() []string

func (*LiveTowerDefenceGame) GetRedHealth

func (x *LiveTowerDefenceGame) GetRedHealth() uint32

func (*LiveTowerDefenceGame) ProtoMessage

func (*LiveTowerDefenceGame) ProtoMessage()

func (*LiveTowerDefenceGame) ProtoReflect

func (x *LiveTowerDefenceGame) ProtoReflect() protoreflect.Message

func (*LiveTowerDefenceGame) Reset

func (x *LiveTowerDefenceGame) Reset()

func (*LiveTowerDefenceGame) String

func (x *LiveTowerDefenceGame) String() string

type Mode

type Mode int32
const (
	Mode_TowerDefenceGame Mode = 0
)

func (Mode) Descriptor

func (Mode) Descriptor() protoreflect.EnumDescriptor

func (Mode) Enum

func (x Mode) Enum() *Mode

func (Mode) EnumDescriptor deprecated

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

Deprecated: Use Mode.Descriptor instead.

func (Mode) Number

func (x Mode) Number() protoreflect.EnumNumber

func (Mode) String

func (x Mode) String() string

func (Mode) Type

func (Mode) Type() protoreflect.EnumType

type PagedPlayerRequest

type PagedPlayerRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	Page     uint32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
	PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*PagedPlayerRequest) Descriptor deprecated

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

Deprecated: Use PagedPlayerRequest.ProtoReflect.Descriptor instead.

func (*PagedPlayerRequest) GetPage

func (x *PagedPlayerRequest) GetPage() uint32

func (*PagedPlayerRequest) GetPageSize

func (x *PagedPlayerRequest) GetPageSize() uint32

func (*PagedPlayerRequest) GetPlayerId

func (x *PagedPlayerRequest) GetPlayerId() string

func (*PagedPlayerRequest) ProtoMessage

func (*PagedPlayerRequest) ProtoMessage()

func (*PagedPlayerRequest) ProtoReflect

func (x *PagedPlayerRequest) ProtoReflect() protoreflect.Message

func (*PagedPlayerRequest) Reset

func (x *PagedPlayerRequest) Reset()

func (*PagedPlayerRequest) String

func (x *PagedPlayerRequest) String() string

type PlayerGameHistoryResponse

type PlayerGameHistoryResponse struct {
	Page          uint32          `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	PageSize      uint32          `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	TotalPages    uint32          `protobuf:"varint,3,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	TotalElements uint32          `protobuf:"varint,4,opt,name=total_elements,json=totalElements,proto3" json:"total_elements,omitempty"`
	Games         []*HistoricGame `protobuf:"bytes,5,rep,name=games,proto3" json:"games,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerGameHistoryResponse) Descriptor deprecated

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

Deprecated: Use PlayerGameHistoryResponse.ProtoReflect.Descriptor instead.

func (*PlayerGameHistoryResponse) GetGames

func (x *PlayerGameHistoryResponse) GetGames() []*HistoricGame

func (*PlayerGameHistoryResponse) GetPage

func (x *PlayerGameHistoryResponse) GetPage() uint32

func (*PlayerGameHistoryResponse) GetPageSize

func (x *PlayerGameHistoryResponse) GetPageSize() uint32

func (*PlayerGameHistoryResponse) GetTotalElements

func (x *PlayerGameHistoryResponse) GetTotalElements() uint32

func (*PlayerGameHistoryResponse) GetTotalPages

func (x *PlayerGameHistoryResponse) GetTotalPages() uint32

func (*PlayerGameHistoryResponse) ProtoMessage

func (*PlayerGameHistoryResponse) ProtoMessage()

func (*PlayerGameHistoryResponse) ProtoReflect

func (*PlayerGameHistoryResponse) Reset

func (x *PlayerGameHistoryResponse) Reset()

func (*PlayerGameHistoryResponse) String

func (x *PlayerGameHistoryResponse) String() string

type PlayerRequest

type PlayerRequest struct {
	PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerRequest) Descriptor deprecated

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

Deprecated: Use PlayerRequest.ProtoReflect.Descriptor instead.

func (*PlayerRequest) GetPlayerId

func (x *PlayerRequest) GetPlayerId() string

func (*PlayerRequest) ProtoMessage

func (*PlayerRequest) ProtoMessage()

func (*PlayerRequest) ProtoReflect

func (x *PlayerRequest) ProtoReflect() protoreflect.Message

func (*PlayerRequest) Reset

func (x *PlayerRequest) Reset()

func (*PlayerRequest) String

func (x *PlayerRequest) String() string

type UnimplementedGameTrackerServer

type UnimplementedGameTrackerServer struct {
}

UnimplementedGameTrackerServer must be embedded to have forward compatible implementations.

func (UnimplementedGameTrackerServer) GetPlayerGameHistory

func (UnimplementedGameTrackerServer) GetPlayerLiveGame

type UnsafeGameTrackerServer

type UnsafeGameTrackerServer interface {
	// contains filtered or unexported methods
}

UnsafeGameTrackerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GameTrackerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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