player_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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_player_tracker_proto protoreflect.FileDescriptor
View Source
var PlayerTracker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "towerdefence.cc.service.player_tracker.PlayerTracker",
	HandlerType: (*PlayerTrackerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPlayerServer",
			Handler:    _PlayerTracker_GetPlayerServer_Handler,
		},
		{
			MethodName: "GetPlayerServers",
			Handler:    _PlayerTracker_GetPlayerServers_Handler,
		},
		{
			MethodName: "GetServerPlayers",
			Handler:    _PlayerTracker_GetServerPlayers_Handler,
		},
		{
			MethodName: "GetServerPlayerCount",
			Handler:    _PlayerTracker_GetServerPlayerCount_Handler,
		},
		{
			MethodName: "GetServerTypePlayerCount",
			Handler:    _PlayerTracker_GetServerTypePlayerCount_Handler,
		},
		{
			MethodName: "GetServerTypesPlayerCount",
			Handler:    _PlayerTracker_GetServerTypesPlayerCount_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "player_tracker.proto",
}

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

Functions

func RegisterPlayerTrackerServer

func RegisterPlayerTrackerServer(s grpc.ServiceRegistrar, srv PlayerTrackerServer)

Types

type GetPlayerServerResponse

type GetPlayerServerResponse struct {
	Server *OnlineServer `protobuf:"bytes,1,opt,name=server,proto3,oneof" json:"server,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayerServerResponse) Descriptor deprecated

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

Deprecated: Use GetPlayerServerResponse.ProtoReflect.Descriptor instead.

func (*GetPlayerServerResponse) GetServer

func (x *GetPlayerServerResponse) GetServer() *OnlineServer

func (*GetPlayerServerResponse) ProtoMessage

func (*GetPlayerServerResponse) ProtoMessage()

func (*GetPlayerServerResponse) ProtoReflect

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

func (*GetPlayerServerResponse) Reset

func (x *GetPlayerServerResponse) Reset()

func (*GetPlayerServerResponse) String

func (x *GetPlayerServerResponse) String() string

type GetPlayerServersResponse

type GetPlayerServersResponse struct {
	PlayerServers map[string]*OnlineServer `` // Is they are not online, they will not be included in the map.
	/* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetPlayerServersResponse) Descriptor deprecated

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

Deprecated: Use GetPlayerServersResponse.ProtoReflect.Descriptor instead.

func (*GetPlayerServersResponse) GetPlayerServers

func (x *GetPlayerServersResponse) GetPlayerServers() map[string]*OnlineServer

func (*GetPlayerServersResponse) ProtoMessage

func (*GetPlayerServersResponse) ProtoMessage()

func (*GetPlayerServersResponse) ProtoReflect

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

func (*GetPlayerServersResponse) Reset

func (x *GetPlayerServersResponse) Reset()

func (*GetPlayerServersResponse) String

func (x *GetPlayerServersResponse) String() string

type GetServerPlayerCountResponse

type GetServerPlayerCountResponse struct {
	PlayerCount uint32 `protobuf:"varint,1,opt,name=player_count,json=playerCount,proto3" json:"player_count,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServerPlayerCountResponse) Descriptor deprecated

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

Deprecated: Use GetServerPlayerCountResponse.ProtoReflect.Descriptor instead.

func (*GetServerPlayerCountResponse) GetPlayerCount

func (x *GetServerPlayerCountResponse) GetPlayerCount() uint32

func (*GetServerPlayerCountResponse) ProtoMessage

func (*GetServerPlayerCountResponse) ProtoMessage()

func (*GetServerPlayerCountResponse) ProtoReflect

func (*GetServerPlayerCountResponse) Reset

func (x *GetServerPlayerCountResponse) Reset()

func (*GetServerPlayerCountResponse) String

type GetServerPlayersResponse

type GetServerPlayersResponse struct {
	OnlinePlayers []*OnlinePlayer `protobuf:"bytes,1,rep,name=online_players,json=onlinePlayers,proto3" json:"online_players,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServerPlayersResponse) Descriptor deprecated

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

Deprecated: Use GetServerPlayersResponse.ProtoReflect.Descriptor instead.

func (*GetServerPlayersResponse) GetOnlinePlayers

func (x *GetServerPlayersResponse) GetOnlinePlayers() []*OnlinePlayer

func (*GetServerPlayersResponse) ProtoMessage

func (*GetServerPlayersResponse) ProtoMessage()

func (*GetServerPlayersResponse) ProtoReflect

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

func (*GetServerPlayersResponse) Reset

func (x *GetServerPlayersResponse) Reset()

func (*GetServerPlayersResponse) String

func (x *GetServerPlayersResponse) String() string

type OnlinePlayer

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

func (*OnlinePlayer) Descriptor deprecated

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

Deprecated: Use OnlinePlayer.ProtoReflect.Descriptor instead.

func (*OnlinePlayer) GetPlayerId

func (x *OnlinePlayer) GetPlayerId() string

func (*OnlinePlayer) GetUsername

func (x *OnlinePlayer) GetUsername() string

func (*OnlinePlayer) ProtoMessage

func (*OnlinePlayer) ProtoMessage()

func (*OnlinePlayer) ProtoReflect

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

func (*OnlinePlayer) Reset

func (x *OnlinePlayer) Reset()

func (*OnlinePlayer) String

func (x *OnlinePlayer) String() string

type OnlineServer

type OnlineServer struct {
	ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	ProxyId  string `protobuf:"bytes,2,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a server a player is online on, proxy and regular.

func (*OnlineServer) Descriptor deprecated

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

Deprecated: Use OnlineServer.ProtoReflect.Descriptor instead.

func (*OnlineServer) GetProxyId

func (x *OnlineServer) GetProxyId() string

func (*OnlineServer) GetServerId

func (x *OnlineServer) GetServerId() string

func (*OnlineServer) ProtoMessage

func (*OnlineServer) ProtoMessage()

func (*OnlineServer) ProtoReflect

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

func (*OnlineServer) Reset

func (x *OnlineServer) Reset()

func (*OnlineServer) String

func (x *OnlineServer) 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 PlayerTrackerClient

type PlayerTrackerClient interface {
	GetPlayerServer(ctx context.Context, in *PlayerRequest, opts ...grpc.CallOption) (*GetPlayerServerResponse, error)
	GetPlayerServers(ctx context.Context, in *PlayersRequest, opts ...grpc.CallOption) (*GetPlayerServersResponse, error)
	GetServerPlayers(ctx context.Context, in *ServerIdRequest, opts ...grpc.CallOption) (*GetServerPlayersResponse, error)
	GetServerPlayerCount(ctx context.Context, in *ServerIdRequest, opts ...grpc.CallOption) (*GetServerPlayerCountResponse, error)
	GetServerTypePlayerCount(ctx context.Context, in *ServerTypeRequest, opts ...grpc.CallOption) (*ServerTypePlayerCountResponse, error)
	GetServerTypesPlayerCount(ctx context.Context, in *ServerTypesRequest, opts ...grpc.CallOption) (*ServerTypesPlayerCountResponse, error)
}

PlayerTrackerClient is the client API for PlayerTracker 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 PlayerTrackerServer

type PlayerTrackerServer interface {
	GetPlayerServer(context.Context, *PlayerRequest) (*GetPlayerServerResponse, error)
	GetPlayerServers(context.Context, *PlayersRequest) (*GetPlayerServersResponse, error)
	GetServerPlayers(context.Context, *ServerIdRequest) (*GetServerPlayersResponse, error)
	GetServerPlayerCount(context.Context, *ServerIdRequest) (*GetServerPlayerCountResponse, error)
	GetServerTypePlayerCount(context.Context, *ServerTypeRequest) (*ServerTypePlayerCountResponse, error)
	GetServerTypesPlayerCount(context.Context, *ServerTypesRequest) (*ServerTypesPlayerCountResponse, error)
	// contains filtered or unexported methods
}

PlayerTrackerServer is the server API for PlayerTracker service. All implementations must embed UnimplementedPlayerTrackerServer for forward compatibility

type PlayersRequest

type PlayersRequest struct {
	PlayerIds []string `protobuf:"bytes,1,rep,name=player_ids,json=playerIds,proto3" json:"player_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayersRequest) Descriptor deprecated

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

Deprecated: Use PlayersRequest.ProtoReflect.Descriptor instead.

func (*PlayersRequest) GetPlayerIds

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

func (*PlayersRequest) ProtoMessage

func (*PlayersRequest) ProtoMessage()

func (*PlayersRequest) ProtoReflect

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

func (*PlayersRequest) Reset

func (x *PlayersRequest) Reset()

func (*PlayersRequest) String

func (x *PlayersRequest) String() string

type ServerIdRequest

type ServerIdRequest struct {
	ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerIdRequest) Descriptor deprecated

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

Deprecated: Use ServerIdRequest.ProtoReflect.Descriptor instead.

func (*ServerIdRequest) GetServerId

func (x *ServerIdRequest) GetServerId() string

func (*ServerIdRequest) ProtoMessage

func (*ServerIdRequest) ProtoMessage()

func (*ServerIdRequest) ProtoReflect

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

func (*ServerIdRequest) Reset

func (x *ServerIdRequest) Reset()

func (*ServerIdRequest) String

func (x *ServerIdRequest) String() string

type ServerTypePlayerCountResponse

type ServerTypePlayerCountResponse struct {
	PlayerCount uint32                 `protobuf:"varint,1,opt,name=player_count,json=playerCount,proto3" json:"player_count,omitempty"`
	LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerTypePlayerCountResponse) Descriptor deprecated

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

Deprecated: Use ServerTypePlayerCountResponse.ProtoReflect.Descriptor instead.

func (*ServerTypePlayerCountResponse) GetLastUpdated

func (*ServerTypePlayerCountResponse) GetPlayerCount

func (x *ServerTypePlayerCountResponse) GetPlayerCount() uint32

func (*ServerTypePlayerCountResponse) ProtoMessage

func (*ServerTypePlayerCountResponse) ProtoMessage()

func (*ServerTypePlayerCountResponse) ProtoReflect

func (*ServerTypePlayerCountResponse) Reset

func (x *ServerTypePlayerCountResponse) Reset()

func (*ServerTypePlayerCountResponse) String

type ServerTypeRequest

type ServerTypeRequest struct {
	ServerType common.ServerType `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ServerTypeRequest) Descriptor deprecated

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

Deprecated: Use ServerTypeRequest.ProtoReflect.Descriptor instead.

func (*ServerTypeRequest) GetServerType

func (x *ServerTypeRequest) GetServerType() common.ServerType

func (*ServerTypeRequest) ProtoMessage

func (*ServerTypeRequest) ProtoMessage()

func (*ServerTypeRequest) ProtoReflect

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

func (*ServerTypeRequest) Reset

func (x *ServerTypeRequest) Reset()

func (*ServerTypeRequest) String

func (x *ServerTypeRequest) String() string

type ServerTypesPlayerCountResponse

type ServerTypesPlayerCountResponse struct {
	PlayerCounts map[string]uint32      `` /* 186-byte string literal not displayed */
	LastUpdated  *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerTypesPlayerCountResponse) Descriptor deprecated

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

Deprecated: Use ServerTypesPlayerCountResponse.ProtoReflect.Descriptor instead.

func (*ServerTypesPlayerCountResponse) GetLastUpdated

func (*ServerTypesPlayerCountResponse) GetPlayerCounts

func (x *ServerTypesPlayerCountResponse) GetPlayerCounts() map[string]uint32

func (*ServerTypesPlayerCountResponse) ProtoMessage

func (*ServerTypesPlayerCountResponse) ProtoMessage()

func (*ServerTypesPlayerCountResponse) ProtoReflect

func (*ServerTypesPlayerCountResponse) Reset

func (x *ServerTypesPlayerCountResponse) Reset()

func (*ServerTypesPlayerCountResponse) String

type ServerTypesRequest

type ServerTypesRequest struct {
	ServerTypes []common.ServerType `` /* 136-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ServerTypesRequest) Descriptor deprecated

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

Deprecated: Use ServerTypesRequest.ProtoReflect.Descriptor instead.

func (*ServerTypesRequest) GetServerTypes

func (x *ServerTypesRequest) GetServerTypes() []common.ServerType

func (*ServerTypesRequest) ProtoMessage

func (*ServerTypesRequest) ProtoMessage()

func (*ServerTypesRequest) ProtoReflect

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

func (*ServerTypesRequest) Reset

func (x *ServerTypesRequest) Reset()

func (*ServerTypesRequest) String

func (x *ServerTypesRequest) String() string

type UnimplementedPlayerTrackerServer

type UnimplementedPlayerTrackerServer struct {
}

UnimplementedPlayerTrackerServer must be embedded to have forward compatible implementations.

func (UnimplementedPlayerTrackerServer) GetPlayerServer

func (UnimplementedPlayerTrackerServer) GetPlayerServers

func (UnimplementedPlayerTrackerServer) GetServerPlayerCount

func (UnimplementedPlayerTrackerServer) GetServerPlayers

func (UnimplementedPlayerTrackerServer) GetServerTypePlayerCount

func (UnimplementedPlayerTrackerServer) GetServerTypesPlayerCount

type UnsafePlayerTrackerServer

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

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

Jump to

Keyboard shortcuts

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