bsr

package
v0.0.0-...-f64367c Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BsrV1 = 1
View Source
const (
	Bsr_JoinGame_FullMethodName = "/bsr.Bsr/JoinGame"
)

Variables

View Source
var Bsr_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bsr.Bsr",
	HandlerType: (*BsrServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "JoinGame",
			Handler:    _Bsr_JoinGame_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "bsr.proto",
}

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

Functions

func RegisterBsrServer

func RegisterBsrServer(s grpc.ServiceRegistrar, srv BsrServer)

Types

type BsrClient

type BsrClient interface {
	JoinGame(ctx context.Context, in *JoinGameRequest, opts ...grpc.CallOption) (*JoinGameResponse, error)
}

BsrClient is the client API for Bsr 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.

func NewBsrClient

func NewBsrClient(cc grpc.ClientConnInterface) BsrClient

type BsrServer

type BsrServer interface {
	JoinGame(context.Context, *JoinGameRequest) (*JoinGameResponse, error)
	// contains filtered or unexported methods
}

BsrServer is the server API for Bsr service. All implementations must embed UnimplementedBsrServer for forward compatibility.

type GameItem

type GameItem struct {
	Id   uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GameItem) Descriptor deprecated

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

Deprecated: Use GameItem.ProtoReflect.Descriptor instead.

func (*GameItem) GetId

func (x *GameItem) GetId() uint32

func (*GameItem) GetName

func (x *GameItem) GetName() string

func (*GameItem) ProtoMessage

func (*GameItem) ProtoMessage()

func (*GameItem) ProtoReflect

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

func (*GameItem) Reset

func (x *GameItem) Reset()

func (*GameItem) String

func (x *GameItem) String() string

type GameState

type GameState struct {
	Round   uint32             `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"`
	Shotgun *Shotgun           `protobuf:"bytes,2,opt,name=shotgun,proto3" json:"shotgun,omitempty"`
	Players map[string]*Player `` /* 155-byte string literal not displayed */
	Done    bool               `protobuf:"varint,123,opt,name=done,proto3" json:"done,omitempty"`
	// contains filtered or unexported fields
}

func (*GameState) Descriptor deprecated

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

Deprecated: Use GameState.ProtoReflect.Descriptor instead.

func (*GameState) GetDone

func (x *GameState) GetDone() bool

func (*GameState) GetPlayers

func (x *GameState) GetPlayers() map[string]*Player

func (*GameState) GetRound

func (x *GameState) GetRound() uint32

func (*GameState) GetShotgun

func (x *GameState) GetShotgun() *Shotgun

func (*GameState) ProtoMessage

func (*GameState) ProtoMessage()

func (*GameState) ProtoReflect

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

func (*GameState) Reset

func (x *GameState) Reset()

func (*GameState) String

func (x *GameState) String() string

type JoinGameRequest

type JoinGameRequest struct {
	Version        uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	GameUuid       string `protobuf:"bytes,2,opt,name=game_uuid,json=gameUuid,proto3" json:"game_uuid,omitempty"`
	PlayerName     string `protobuf:"bytes,4,opt,name=player_name,json=playerName,proto3" json:"player_name,omitempty"`
	MaxPlayerCount uint32 `protobuf:"varint,5,opt,name=max_player_count,json=maxPlayerCount,proto3" json:"max_player_count,omitempty"`
	// contains filtered or unexported fields
}

func (*JoinGameRequest) Descriptor deprecated

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

Deprecated: Use JoinGameRequest.ProtoReflect.Descriptor instead.

func (*JoinGameRequest) GetGameUuid

func (x *JoinGameRequest) GetGameUuid() string

func (*JoinGameRequest) GetMaxPlayerCount

func (x *JoinGameRequest) GetMaxPlayerCount() uint32

func (*JoinGameRequest) GetPlayerName

func (x *JoinGameRequest) GetPlayerName() string

func (*JoinGameRequest) GetVersion

func (x *JoinGameRequest) GetVersion() uint32

func (*JoinGameRequest) ProtoMessage

func (*JoinGameRequest) ProtoMessage()

func (*JoinGameRequest) ProtoReflect

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

func (*JoinGameRequest) Reset

func (x *JoinGameRequest) Reset()

func (*JoinGameRequest) String

func (x *JoinGameRequest) String() string

type JoinGameResponse

type JoinGameResponse struct {
	GameUuid    string     `protobuf:"bytes,2,opt,name=game_uuid,json=gameUuid,proto3" json:"game_uuid,omitempty"`
	PlayerUuid  string     `protobuf:"bytes,3,opt,name=player_uuid,json=playerUuid,proto3" json:"player_uuid,omitempty"`
	GameStarted bool       `protobuf:"varint,4,opt,name=game_started,json=gameStarted,proto3" json:"game_started,omitempty"`
	GameState   *GameState `protobuf:"bytes,5,opt,name=game_state,json=gameState,proto3,oneof" json:"game_state,omitempty"`
	// contains filtered or unexported fields
}

func (*JoinGameResponse) Descriptor deprecated

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

Deprecated: Use JoinGameResponse.ProtoReflect.Descriptor instead.

func (*JoinGameResponse) GetGameStarted

func (x *JoinGameResponse) GetGameStarted() bool

func (*JoinGameResponse) GetGameState

func (x *JoinGameResponse) GetGameState() *GameState

func (*JoinGameResponse) GetGameUuid

func (x *JoinGameResponse) GetGameUuid() string

func (*JoinGameResponse) GetPlayerUuid

func (x *JoinGameResponse) GetPlayerUuid() string

func (*JoinGameResponse) ProtoMessage

func (*JoinGameResponse) ProtoMessage()

func (*JoinGameResponse) ProtoReflect

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

func (*JoinGameResponse) Reset

func (x *JoinGameResponse) Reset()

func (*JoinGameResponse) String

func (x *JoinGameResponse) String() string

type Player

type Player struct {
	Health uint32      `protobuf:"varint,1,opt,name=health,proto3" json:"health,omitempty"`
	Items  []*GameItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*Player) Descriptor deprecated

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

Deprecated: Use Player.ProtoReflect.Descriptor instead.

func (*Player) GetHealth

func (x *Player) GetHealth() uint32

func (*Player) GetItems

func (x *Player) GetItems() []*GameItem

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) ProtoReflect

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

func (*Player) Reset

func (x *Player) Reset()

func (*Player) String

func (x *Player) String() string

type Shotgun

type Shotgun struct {
	ShellsLeft uint32 `protobuf:"varint,1,opt,name=shells_left,json=shellsLeft,proto3" json:"shells_left,omitempty"`
	Dmg        uint32 `protobuf:"varint,2,opt,name=dmg,proto3" json:"dmg,omitempty"`
	// contains filtered or unexported fields
}

func (*Shotgun) Descriptor deprecated

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

Deprecated: Use Shotgun.ProtoReflect.Descriptor instead.

func (*Shotgun) GetDmg

func (x *Shotgun) GetDmg() uint32

func (*Shotgun) GetShellsLeft

func (x *Shotgun) GetShellsLeft() uint32

func (*Shotgun) ProtoMessage

func (*Shotgun) ProtoMessage()

func (*Shotgun) ProtoReflect

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

func (*Shotgun) Reset

func (x *Shotgun) Reset()

func (*Shotgun) String

func (x *Shotgun) String() string

type UnimplementedBsrServer

type UnimplementedBsrServer struct{}

UnimplementedBsrServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedBsrServer) JoinGame

type UnsafeBsrServer

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

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

Jump to

Keyboard shortcuts

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