pong

package
v0.0.0-...-c06bead Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: GPL-3.0 Imports: 5 Imported by: 3

Documentation

Overview

Package pong is a generated protocol buffer package.

It is generated from these files:

pong.proto

It has these top-level messages:

GetScoreRequest
GetScoreReply
SetPlayerPositionRequest
SetPlayerPositionReply
GetBallPositionRequest
GetBallPositionReply
IdentifyPlayerRequest
IdentifyPlayerReply
GetOpponentRequest
GetOpponentReply

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPongerServer

func RegisterPongerServer(s *grpc.Server, srv PongerServer)

Types

type GetBallPositionReply

type GetBallPositionReply struct {
	X int32 `protobuf:"varint,1,opt,name=X" json:"X,omitempty"`
	Y int32 `protobuf:"varint,2,opt,name=Y" json:"Y,omitempty"`
}

func (*GetBallPositionReply) Descriptor

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

func (*GetBallPositionReply) GetX

func (m *GetBallPositionReply) GetX() int32

func (*GetBallPositionReply) GetY

func (m *GetBallPositionReply) GetY() int32

func (*GetBallPositionReply) ProtoMessage

func (*GetBallPositionReply) ProtoMessage()

func (*GetBallPositionReply) Reset

func (m *GetBallPositionReply) Reset()

func (*GetBallPositionReply) String

func (m *GetBallPositionReply) String() string

type GetBallPositionRequest

type GetBallPositionRequest struct {
	Handshake string `protobuf:"bytes,1,opt,name=Handshake" json:"Handshake,omitempty"`
}

func (*GetBallPositionRequest) Descriptor

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

func (*GetBallPositionRequest) GetHandshake

func (m *GetBallPositionRequest) GetHandshake() string

func (*GetBallPositionRequest) ProtoMessage

func (*GetBallPositionRequest) ProtoMessage()

func (*GetBallPositionRequest) Reset

func (m *GetBallPositionRequest) Reset()

func (*GetBallPositionRequest) String

func (m *GetBallPositionRequest) String() string

type GetOpponentReply

type GetOpponentReply struct {
	PlayerNumber int32 `protobuf:"varint,1,opt,name=PlayerNumber" json:"PlayerNumber,omitempty"`
	X            int32 `protobuf:"varint,2,opt,name=X" json:"X,omitempty"`
	Y            int32 `protobuf:"varint,3,opt,name=Y" json:"Y,omitempty"`
}

func (*GetOpponentReply) Descriptor

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

func (*GetOpponentReply) GetPlayerNumber

func (m *GetOpponentReply) GetPlayerNumber() int32

func (*GetOpponentReply) GetX

func (m *GetOpponentReply) GetX() int32

func (*GetOpponentReply) GetY

func (m *GetOpponentReply) GetY() int32

func (*GetOpponentReply) ProtoMessage

func (*GetOpponentReply) ProtoMessage()

func (*GetOpponentReply) Reset

func (m *GetOpponentReply) Reset()

func (*GetOpponentReply) String

func (m *GetOpponentReply) String() string

type GetOpponentRequest

type GetOpponentRequest struct {
	PlayerNumber int32  `protobuf:"varint,1,opt,name=PlayerNumber" json:"PlayerNumber,omitempty"`
	Handshake    string `protobuf:"bytes,2,opt,name=Handshake" json:"Handshake,omitempty"`
}

func (*GetOpponentRequest) Descriptor

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

func (*GetOpponentRequest) GetHandshake

func (m *GetOpponentRequest) GetHandshake() string

func (*GetOpponentRequest) GetPlayerNumber

func (m *GetOpponentRequest) GetPlayerNumber() int32

func (*GetOpponentRequest) ProtoMessage

func (*GetOpponentRequest) ProtoMessage()

func (*GetOpponentRequest) Reset

func (m *GetOpponentRequest) Reset()

func (*GetOpponentRequest) String

func (m *GetOpponentRequest) String() string

type GetScoreReply

type GetScoreReply struct {
	Score0 int32 `protobuf:"varint,1,opt,name=Score0" json:"Score0,omitempty"`
	Score1 int32 `protobuf:"varint,2,opt,name=Score1" json:"Score1,omitempty"`
}

func (*GetScoreReply) Descriptor

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

func (*GetScoreReply) GetScore0

func (m *GetScoreReply) GetScore0() int32

func (*GetScoreReply) GetScore1

func (m *GetScoreReply) GetScore1() int32

func (*GetScoreReply) ProtoMessage

func (*GetScoreReply) ProtoMessage()

func (*GetScoreReply) Reset

func (m *GetScoreReply) Reset()

func (*GetScoreReply) String

func (m *GetScoreReply) String() string

type GetScoreRequest

type GetScoreRequest struct {
	Handshake string `protobuf:"bytes,1,opt,name=Handshake" json:"Handshake,omitempty"`
}

func (*GetScoreRequest) Descriptor

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

func (*GetScoreRequest) GetHandshake

func (m *GetScoreRequest) GetHandshake() string

func (*GetScoreRequest) ProtoMessage

func (*GetScoreRequest) ProtoMessage()

func (*GetScoreRequest) Reset

func (m *GetScoreRequest) Reset()

func (*GetScoreRequest) String

func (m *GetScoreRequest) String() string

type IdentifyPlayerReply

type IdentifyPlayerReply struct {
	PlayerNumber int32  `protobuf:"varint,1,opt,name=PlayerNumber" json:"PlayerNumber,omitempty"`
	Handshake    string `protobuf:"bytes,2,opt,name=Handshake" json:"Handshake,omitempty"`
}

func (*IdentifyPlayerReply) Descriptor

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

func (*IdentifyPlayerReply) GetHandshake

func (m *IdentifyPlayerReply) GetHandshake() string

func (*IdentifyPlayerReply) GetPlayerNumber

func (m *IdentifyPlayerReply) GetPlayerNumber() int32

func (*IdentifyPlayerReply) ProtoMessage

func (*IdentifyPlayerReply) ProtoMessage()

func (*IdentifyPlayerReply) Reset

func (m *IdentifyPlayerReply) Reset()

func (*IdentifyPlayerReply) String

func (m *IdentifyPlayerReply) String() string

type IdentifyPlayerRequest

type IdentifyPlayerRequest struct {
	Room string `protobuf:"bytes,1,opt,name=Room" json:"Room,omitempty"`
}

func (*IdentifyPlayerRequest) Descriptor

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

func (*IdentifyPlayerRequest) GetRoom

func (m *IdentifyPlayerRequest) GetRoom() string

func (*IdentifyPlayerRequest) ProtoMessage

func (*IdentifyPlayerRequest) ProtoMessage()

func (*IdentifyPlayerRequest) Reset

func (m *IdentifyPlayerRequest) Reset()

func (*IdentifyPlayerRequest) String

func (m *IdentifyPlayerRequest) String() string

type PongerClient

type PongerClient interface {
	// Sends a player position
	SetPlayerPosition(ctx context.Context, in *SetPlayerPositionRequest, opts ...grpc.CallOption) (*SetPlayerPositionReply, error)
	// Gets the ball position
	GetBallPosition(ctx context.Context, in *GetBallPositionRequest, opts ...grpc.CallOption) (*GetBallPositionReply, error)
	// Get opponent position
	GetOpponent(ctx context.Context, in *GetOpponentRequest, opts ...grpc.CallOption) (*GetOpponentReply, error)
	// Get Player number and the handshake which will be required in the other calls
	IdentifyPlayer(ctx context.Context, in *IdentifyPlayerRequest, opts ...grpc.CallOption) (*IdentifyPlayerReply, error)
	GetScore(ctx context.Context, in *GetScoreRequest, opts ...grpc.CallOption) (*GetScoreReply, error)
}

func NewPongerClient

func NewPongerClient(cc *grpc.ClientConn) PongerClient

type PongerServer

type PongerServer interface {
	// Sends a player position
	SetPlayerPosition(context.Context, *SetPlayerPositionRequest) (*SetPlayerPositionReply, error)
	// Gets the ball position
	GetBallPosition(context.Context, *GetBallPositionRequest) (*GetBallPositionReply, error)
	// Get opponent position
	GetOpponent(context.Context, *GetOpponentRequest) (*GetOpponentReply, error)
	// Get Player number and the handshake which will be required in the other calls
	IdentifyPlayer(context.Context, *IdentifyPlayerRequest) (*IdentifyPlayerReply, error)
	GetScore(context.Context, *GetScoreRequest) (*GetScoreReply, error)
}

type SetPlayerPositionReply

type SetPlayerPositionReply struct {
	PlayerNumber int32 `protobuf:"varint,1,opt,name=PlayerNumber" json:"PlayerNumber,omitempty"`
	X            int32 `protobuf:"varint,2,opt,name=X" json:"X,omitempty"`
	Y            int32 `protobuf:"varint,3,opt,name=Y" json:"Y,omitempty"`
}

func (*SetPlayerPositionReply) Descriptor

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

func (*SetPlayerPositionReply) GetPlayerNumber

func (m *SetPlayerPositionReply) GetPlayerNumber() int32

func (*SetPlayerPositionReply) GetX

func (m *SetPlayerPositionReply) GetX() int32

func (*SetPlayerPositionReply) GetY

func (m *SetPlayerPositionReply) GetY() int32

func (*SetPlayerPositionReply) ProtoMessage

func (*SetPlayerPositionReply) ProtoMessage()

func (*SetPlayerPositionReply) Reset

func (m *SetPlayerPositionReply) Reset()

func (*SetPlayerPositionReply) String

func (m *SetPlayerPositionReply) String() string

type SetPlayerPositionRequest

type SetPlayerPositionRequest struct {
	Handshake    string `protobuf:"bytes,1,opt,name=Handshake" json:"Handshake,omitempty"`
	PlayerNumber int32  `protobuf:"varint,2,opt,name=PlayerNumber" json:"PlayerNumber,omitempty"`
	X            int32  `protobuf:"varint,3,opt,name=X" json:"X,omitempty"`
	Y            int32  `protobuf:"varint,4,opt,name=Y" json:"Y,omitempty"`
}

func (*SetPlayerPositionRequest) Descriptor

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

func (*SetPlayerPositionRequest) GetHandshake

func (m *SetPlayerPositionRequest) GetHandshake() string

func (*SetPlayerPositionRequest) GetPlayerNumber

func (m *SetPlayerPositionRequest) GetPlayerNumber() int32

func (*SetPlayerPositionRequest) GetX

func (m *SetPlayerPositionRequest) GetX() int32

func (*SetPlayerPositionRequest) GetY

func (m *SetPlayerPositionRequest) GetY() int32

func (*SetPlayerPositionRequest) ProtoMessage

func (*SetPlayerPositionRequest) ProtoMessage()

func (*SetPlayerPositionRequest) Reset

func (m *SetPlayerPositionRequest) Reset()

func (*SetPlayerPositionRequest) String

func (m *SetPlayerPositionRequest) String() string

Jump to

Keyboard shortcuts

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