api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JankenHand_name = map[int32]string{
		0: "JANKEN_HAND_UNSPECIFIED",
		1: "JANKEN_HAND_ROCK",
		2: "JANKEN_HAND_SCISSORS",
		3: "JANKEN_HAND_PAPER",
	}
	JankenHand_value = map[string]int32{
		"JANKEN_HAND_UNSPECIFIED": 0,
		"JANKEN_HAND_ROCK":        1,
		"JANKEN_HAND_SCISSORS":    2,
		"JANKEN_HAND_PAPER":       3,
	}
)

Enum value maps for JankenHand.

View Source
var File_api_game_proto protoreflect.FileDescriptor
View Source
var File_api_janken_proto protoreflect.FileDescriptor

Functions

func NewGameServiceHandler

func NewGameServiceHandler(handler gamebox_GameServiceHandler, adv advice.Advice) gamebox_GameServiceHandlerImpl

func NewJankenServiceHandler

func NewJankenServiceHandler(handler gamebox_JankenServiceHandler, adv advice.Advice) gamebox_JankenServiceHandlerImpl

Types

type GameServiceGetSessionV1Errors

type GameServiceGetSessionV1Errors struct {
	// The session does not exist.
	RESOURCE_NOT_FOUND *advice.MethodErrDefinition
	// contains filtered or unexported fields
}

func (*GameServiceGetSessionV1Errors) Map

type GameServiceGetSessionV1Request

type GameServiceGetSessionV1Request struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GameServiceGetSessionV1Request) Descriptor deprecated

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

Deprecated: Use GameServiceGetSessionV1Request.ProtoReflect.Descriptor instead.

func (*GameServiceGetSessionV1Request) GetSessionId

func (x *GameServiceGetSessionV1Request) GetSessionId() string

func (*GameServiceGetSessionV1Request) ProtoMessage

func (*GameServiceGetSessionV1Request) ProtoMessage()

func (*GameServiceGetSessionV1Request) ProtoReflect

func (*GameServiceGetSessionV1Request) Reset

func (x *GameServiceGetSessionV1Request) Reset()

func (*GameServiceGetSessionV1Request) String

type GameServiceGetSessionV1Response

type GameServiceGetSessionV1Response struct {
	Session *resource.GameSession `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*GameServiceGetSessionV1Response) Descriptor deprecated

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

Deprecated: Use GameServiceGetSessionV1Response.ProtoReflect.Descriptor instead.

func (*GameServiceGetSessionV1Response) GetSession

func (*GameServiceGetSessionV1Response) ProtoMessage

func (*GameServiceGetSessionV1Response) ProtoMessage()

func (*GameServiceGetSessionV1Response) ProtoReflect

func (*GameServiceGetSessionV1Response) Reset

func (*GameServiceGetSessionV1Response) String

type GameServiceListPlayingSessionsV1Request

type GameServiceListPlayingSessionsV1Request struct {
	// contains filtered or unexported fields
}

func (*GameServiceListPlayingSessionsV1Request) Descriptor deprecated

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

Deprecated: Use GameServiceListPlayingSessionsV1Request.ProtoReflect.Descriptor instead.

func (*GameServiceListPlayingSessionsV1Request) ProtoMessage

func (*GameServiceListPlayingSessionsV1Request) ProtoReflect

func (*GameServiceListPlayingSessionsV1Request) Reset

func (*GameServiceListPlayingSessionsV1Request) String

type GameServiceListPlayingSessionsV1Response

type GameServiceListPlayingSessionsV1Response struct {
	Sessions []*resource.GameSession `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
	// contains filtered or unexported fields
}

func (*GameServiceListPlayingSessionsV1Response) Descriptor deprecated

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

Deprecated: Use GameServiceListPlayingSessionsV1Response.ProtoReflect.Descriptor instead.

func (*GameServiceListPlayingSessionsV1Response) GetSessions

func (*GameServiceListPlayingSessionsV1Response) ProtoMessage

func (*GameServiceListPlayingSessionsV1Response) ProtoReflect

func (*GameServiceListPlayingSessionsV1Response) Reset

func (*GameServiceListPlayingSessionsV1Response) String

type GameServiceStartPlayingV1Errors

type GameServiceStartPlayingV1Errors struct {
	// The wager must be greater than 0.
	ILLEGAL_ARGUMENT *advice.MethodErrDefinition
	// The game does not exist.
	RESOURCE_NOT_FOUND *advice.MethodErrDefinition
	// The game is already being played.
	RESOURCE_CONFLICT *advice.MethodErrDefinition
	// contains filtered or unexported fields
}

func (*GameServiceStartPlayingV1Errors) Map

type GameServiceStartPlayingV1Request

type GameServiceStartPlayingV1Request struct {
	GameId string `protobuf:"bytes,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"`
	Wager  int64  `protobuf:"varint,2,opt,name=wager,proto3" json:"wager,omitempty"`
	// contains filtered or unexported fields
}

func (*GameServiceStartPlayingV1Request) Descriptor deprecated

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

Deprecated: Use GameServiceStartPlayingV1Request.ProtoReflect.Descriptor instead.

func (*GameServiceStartPlayingV1Request) GetGameId

func (*GameServiceStartPlayingV1Request) GetWager

func (*GameServiceStartPlayingV1Request) ProtoMessage

func (*GameServiceStartPlayingV1Request) ProtoMessage()

func (*GameServiceStartPlayingV1Request) ProtoReflect

func (*GameServiceStartPlayingV1Request) Reset

func (*GameServiceStartPlayingV1Request) String

type GameServiceStartPlayingV1Response

type GameServiceStartPlayingV1Response struct {
	Session *resource.GameSession `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func (*GameServiceStartPlayingV1Response) Descriptor deprecated

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

Deprecated: Use GameServiceStartPlayingV1Response.ProtoReflect.Descriptor instead.

func (*GameServiceStartPlayingV1Response) GetSession

func (*GameServiceStartPlayingV1Response) ProtoMessage

func (*GameServiceStartPlayingV1Response) ProtoMessage()

func (*GameServiceStartPlayingV1Response) ProtoReflect

func (*GameServiceStartPlayingV1Response) Reset

func (*GameServiceStartPlayingV1Response) String

type JankenHand

type JankenHand int32
const (
	JankenHand_JANKEN_HAND_UNSPECIFIED JankenHand = 0
	JankenHand_JANKEN_HAND_ROCK        JankenHand = 1
	JankenHand_JANKEN_HAND_SCISSORS    JankenHand = 2
	JankenHand_JANKEN_HAND_PAPER       JankenHand = 3
)

func (JankenHand) Descriptor

func (JankenHand) Descriptor() protoreflect.EnumDescriptor

func (JankenHand) Enum

func (x JankenHand) Enum() *JankenHand

func (JankenHand) EnumDescriptor deprecated

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

Deprecated: Use JankenHand.Descriptor instead.

func (JankenHand) Number

func (x JankenHand) Number() protoreflect.EnumNumber

func (JankenHand) String

func (x JankenHand) String() string

func (JankenHand) Type

type JankenServiceChooseHandV1Errors

type JankenServiceChooseHandV1Errors struct {
	// The session does not exist.
	RESOURCE_NOT_FOUND *advice.MethodErrDefinition
	// contains filtered or unexported fields
}

func (*JankenServiceChooseHandV1Errors) Map

type JankenServiceChooseHandV1Request

type JankenServiceChooseHandV1Request struct {
	SessionId string     `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Hand      JankenHand `protobuf:"varint,2,opt,name=hand,proto3,enum=api.JankenHand" json:"hand,omitempty"`
	// contains filtered or unexported fields
}

func (*JankenServiceChooseHandV1Request) Descriptor deprecated

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

Deprecated: Use JankenServiceChooseHandV1Request.ProtoReflect.Descriptor instead.

func (*JankenServiceChooseHandV1Request) GetHand

func (*JankenServiceChooseHandV1Request) GetSessionId

func (x *JankenServiceChooseHandV1Request) GetSessionId() string

func (*JankenServiceChooseHandV1Request) ProtoMessage

func (*JankenServiceChooseHandV1Request) ProtoMessage()

func (*JankenServiceChooseHandV1Request) ProtoReflect

func (*JankenServiceChooseHandV1Request) Reset

func (*JankenServiceChooseHandV1Request) String

type JankenServiceChooseHandV1Response

type JankenServiceChooseHandV1Response struct {
	Session      *resource.GameSession `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	OpponentHand JankenHand            `protobuf:"varint,2,opt,name=opponent_hand,json=opponentHand,proto3,enum=api.JankenHand" json:"opponent_hand,omitempty"`
	// contains filtered or unexported fields
}

func (*JankenServiceChooseHandV1Response) Descriptor deprecated

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

Deprecated: Use JankenServiceChooseHandV1Response.ProtoReflect.Descriptor instead.

func (*JankenServiceChooseHandV1Response) GetOpponentHand

func (x *JankenServiceChooseHandV1Response) GetOpponentHand() JankenHand

func (*JankenServiceChooseHandV1Response) GetSession

func (*JankenServiceChooseHandV1Response) ProtoMessage

func (*JankenServiceChooseHandV1Response) ProtoMessage()

func (*JankenServiceChooseHandV1Response) ProtoReflect

func (*JankenServiceChooseHandV1Response) Reset

func (*JankenServiceChooseHandV1Response) String

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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