Documentation
¶
Index ¶
- type GameViewPresenterServer
- type GameViewerPageClient
- func (c *GameViewerPageClient) ClearHighlights(ctx context.Context, req *v1models.ClearHighlightsRequest) (*v1models.ClearHighlightsResponse, error)
- func (c *GameViewerPageClient) ClearPaths(ctx context.Context, req *v1models.ClearPathsRequest) (*v1models.ClearPathsResponse, error)
- func (c *GameViewerPageClient) LogMessage(ctx context.Context, req *v1models.LogMessageRequest) (*v1models.LogMessageResponse, error)
- func (c *GameViewerPageClient) MoveUnit(ctx context.Context, req *v1models.MoveUnitRequest) (*v1models.MoveUnitResponse, error)
- func (c *GameViewerPageClient) RemoveTileAt(ctx context.Context, req *v1models.RemoveTileAtRequest) (*v1models.RemoveTileAtResponse, error)
- func (c *GameViewerPageClient) RemoveUnitAt(ctx context.Context, req *v1models.RemoveUnitAtRequest) (*v1models.RemoveUnitAtResponse, error)
- func (c *GameViewerPageClient) SetAllowedPanels(ctx context.Context, req *v1models.SetAllowedPanelsRequest) (*v1models.SetAllowedPanelsResponse, error)
- func (c *GameViewerPageClient) SetCompactSummaryCard(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
- func (c *GameViewerPageClient) SetDamageDistributionContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
- func (c *GameViewerPageClient) SetGameState(ctx context.Context, req *v1models.SetGameStateRequest) (*v1models.SetGameStateResponse, error)
- func (c *GameViewerPageClient) SetTerrainStatsContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
- func (c *GameViewerPageClient) SetTileAt(ctx context.Context, req *v1models.SetTileAtRequest) (*v1models.SetTileAtResponse, error)
- func (c *GameViewerPageClient) SetTurnOptionsContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
- func (c *GameViewerPageClient) SetUnitAt(ctx context.Context, req *v1models.SetUnitAtRequest) (*v1models.SetUnitAtResponse, error)
- func (c *GameViewerPageClient) SetUnitStatsContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
- func (c *GameViewerPageClient) ShowAttackEffect(ctx context.Context, req *v1models.ShowAttackEffectRequest) (*v1models.ShowAttackEffectResponse, error)
- func (c *GameViewerPageClient) ShowBuildOptions(ctx context.Context, req *v1models.ShowBuildOptionsRequest) (*v1models.ShowBuildOptionsResponse, error)
- func (c *GameViewerPageClient) ShowCaptureEffect(ctx context.Context, req *v1models.ShowCaptureEffectRequest) (*v1models.ShowCaptureEffectResponse, error)
- func (c *GameViewerPageClient) ShowHealEffect(ctx context.Context, req *v1models.ShowHealEffectRequest) (*v1models.ShowHealEffectResponse, error)
- func (c *GameViewerPageClient) ShowHighlights(ctx context.Context, req *v1models.ShowHighlightsRequest) (*v1models.ShowHighlightsResponse, error)
- func (c *GameViewerPageClient) ShowPath(ctx context.Context, req *v1models.ShowPathRequest) (*v1models.ShowPathResponse, error)
- func (c *GameViewerPageClient) UpdateGameStatus(ctx context.Context, req *v1models.UpdateGameStatusRequest) (*v1models.UpdateGameStatusResponse, error)
- type GamesServiceServer
- type IndexerServiceServer
- type SingletonInitializerServiceServer
- type UsersServiceServer
- type Weewar_v1ServicesExports
- type WorldsServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GameViewPresenterServer ¶
type GameViewPresenterServer interface {
/** *
Called on first init based on the game and world data */
InitializeGame(context.Context, *v1models.InitializeGameRequest) (*v1models.InitializeGameResponse, error)
/** *
This is called when the user clicks a tile on the Game Scene
The tile can have a unit or just be a plain tile. It is upto the presenter to
change the various view states */
SceneClicked(context.Context, *v1models.SceneClickedRequest) (*v1models.SceneClickedResponse, error)
/** *
Called when a particular turn option is clicked in the TurnOptionsPanel
Note how we have a strong coupling between what the page elements do and which
presenter elements they call */
TurnOptionClicked(context.Context, *v1models.TurnOptionClickedRequest) (*v1models.TurnOptionClickedResponse, error)
/** *
Called when user clicked the EndTurn button */
EndTurnButtonClicked(context.Context, *v1models.EndTurnButtonClickedRequest) (*v1models.EndTurnButtonClickedResponse, error)
/** *
Called when a build option is clicked in the BuildOptionsModal */
BuildOptionClicked(context.Context, *v1models.BuildOptionClickedRequest) (*v1models.BuildOptionClickedResponse, error)
}
GameViewPresenterServer is the server API for GameViewPresenter service (WASM version without gRPC embedding).
type GameViewerPageClient ¶
type GameViewerPageClient struct {
// contains filtered or unexported fields
}
GameViewerPageClient is a client for the browser-provided GameViewerPage service
func NewGameViewerPageClient ¶
func NewGameViewerPageClient() *GameViewerPageClient
NewGameViewerPageClient creates a new client for the browser-provided GameViewerPage service
func (*GameViewerPageClient) ClearHighlights ¶
func (c *GameViewerPageClient) ClearHighlights(ctx context.Context, req *v1models.ClearHighlightsRequest) (*v1models.ClearHighlightsResponse, error)
ClearHighlights calls the browser-provided ClearHighlights method
func (*GameViewerPageClient) ClearPaths ¶
func (c *GameViewerPageClient) ClearPaths(ctx context.Context, req *v1models.ClearPathsRequest) (*v1models.ClearPathsResponse, error)
ClearPaths calls the browser-provided ClearPaths method
func (*GameViewerPageClient) LogMessage ¶
func (c *GameViewerPageClient) LogMessage(ctx context.Context, req *v1models.LogMessageRequest) (*v1models.LogMessageResponse, error)
LogMessage calls the browser-provided LogMessage method
func (*GameViewerPageClient) MoveUnit ¶
func (c *GameViewerPageClient) MoveUnit(ctx context.Context, req *v1models.MoveUnitRequest) (*v1models.MoveUnitResponse, error)
MoveUnit calls the browser-provided MoveUnit method
func (*GameViewerPageClient) RemoveTileAt ¶
func (c *GameViewerPageClient) RemoveTileAt(ctx context.Context, req *v1models.RemoveTileAtRequest) (*v1models.RemoveTileAtResponse, error)
RemoveTileAt calls the browser-provided RemoveTileAt method
func (*GameViewerPageClient) RemoveUnitAt ¶
func (c *GameViewerPageClient) RemoveUnitAt(ctx context.Context, req *v1models.RemoveUnitAtRequest) (*v1models.RemoveUnitAtResponse, error)
RemoveUnitAt calls the browser-provided RemoveUnitAt method
func (*GameViewerPageClient) SetAllowedPanels ¶
func (c *GameViewerPageClient) SetAllowedPanels(ctx context.Context, req *v1models.SetAllowedPanelsRequest) (*v1models.SetAllowedPanelsResponse, error)
SetAllowedPanels calls the browser-provided SetAllowedPanels method
func (*GameViewerPageClient) SetCompactSummaryCard ¶
func (c *GameViewerPageClient) SetCompactSummaryCard(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
SetCompactSummaryCard calls the browser-provided SetCompactSummaryCard method
func (*GameViewerPageClient) SetDamageDistributionContent ¶
func (c *GameViewerPageClient) SetDamageDistributionContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
SetDamageDistributionContent calls the browser-provided SetDamageDistributionContent method
func (*GameViewerPageClient) SetGameState ¶
func (c *GameViewerPageClient) SetGameState(ctx context.Context, req *v1models.SetGameStateRequest) (*v1models.SetGameStateResponse, error)
SetGameState calls the browser-provided SetGameState method
func (*GameViewerPageClient) SetTerrainStatsContent ¶
func (c *GameViewerPageClient) SetTerrainStatsContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
SetTerrainStatsContent calls the browser-provided SetTerrainStatsContent method
func (*GameViewerPageClient) SetTileAt ¶
func (c *GameViewerPageClient) SetTileAt(ctx context.Context, req *v1models.SetTileAtRequest) (*v1models.SetTileAtResponse, error)
SetTileAt calls the browser-provided SetTileAt method
func (*GameViewerPageClient) SetTurnOptionsContent ¶
func (c *GameViewerPageClient) SetTurnOptionsContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
SetTurnOptionsContent calls the browser-provided SetTurnOptionsContent method
func (*GameViewerPageClient) SetUnitAt ¶
func (c *GameViewerPageClient) SetUnitAt(ctx context.Context, req *v1models.SetUnitAtRequest) (*v1models.SetUnitAtResponse, error)
SetUnitAt calls the browser-provided SetUnitAt method
func (*GameViewerPageClient) SetUnitStatsContent ¶
func (c *GameViewerPageClient) SetUnitStatsContent(ctx context.Context, req *v1models.SetContentRequest) (*v1models.SetContentResponse, error)
SetUnitStatsContent calls the browser-provided SetUnitStatsContent method
func (*GameViewerPageClient) ShowAttackEffect ¶
func (c *GameViewerPageClient) ShowAttackEffect(ctx context.Context, req *v1models.ShowAttackEffectRequest) (*v1models.ShowAttackEffectResponse, error)
ShowAttackEffect calls the browser-provided ShowAttackEffect method
func (*GameViewerPageClient) ShowBuildOptions ¶
func (c *GameViewerPageClient) ShowBuildOptions(ctx context.Context, req *v1models.ShowBuildOptionsRequest) (*v1models.ShowBuildOptionsResponse, error)
ShowBuildOptions calls the browser-provided ShowBuildOptions method
func (*GameViewerPageClient) ShowCaptureEffect ¶
func (c *GameViewerPageClient) ShowCaptureEffect(ctx context.Context, req *v1models.ShowCaptureEffectRequest) (*v1models.ShowCaptureEffectResponse, error)
ShowCaptureEffect calls the browser-provided ShowCaptureEffect method
func (*GameViewerPageClient) ShowHealEffect ¶
func (c *GameViewerPageClient) ShowHealEffect(ctx context.Context, req *v1models.ShowHealEffectRequest) (*v1models.ShowHealEffectResponse, error)
ShowHealEffect calls the browser-provided ShowHealEffect method
func (*GameViewerPageClient) ShowHighlights ¶
func (c *GameViewerPageClient) ShowHighlights(ctx context.Context, req *v1models.ShowHighlightsRequest) (*v1models.ShowHighlightsResponse, error)
ShowHighlights calls the browser-provided ShowHighlights method
func (*GameViewerPageClient) ShowPath ¶
func (c *GameViewerPageClient) ShowPath(ctx context.Context, req *v1models.ShowPathRequest) (*v1models.ShowPathResponse, error)
ShowPath calls the browser-provided ShowPath method
func (*GameViewerPageClient) UpdateGameStatus ¶
func (c *GameViewerPageClient) UpdateGameStatus(ctx context.Context, req *v1models.UpdateGameStatusRequest) (*v1models.UpdateGameStatusResponse, error)
UpdateGameStatus calls the browser-provided UpdateGameStatus method
type GamesServiceServer ¶
type GamesServiceServer interface {
/** *
Create a new game */
CreateGame(context.Context, *v1models.CreateGameRequest) (*v1models.CreateGameResponse, error)
/** *
Batch get multiple games by ID */
GetGames(context.Context, *v1models.GetGamesRequest) (*v1models.GetGamesResponse, error)
/** ListGames returns all available games */
ListGames(context.Context, *v1models.ListGamesRequest) (*v1models.ListGamesResponse, error)
/** GetGame returns a specific game with metadata */
GetGame(context.Context, *v1models.GetGameRequest) (*v1models.GetGameResponse, error)
/** *
Delete a particular game */
DeleteGame(context.Context, *v1models.DeleteGameRequest) (*v1models.DeleteGameResponse, error)
/** GetGame returns a specific game with metadata */
UpdateGame(context.Context, *v1models.UpdateGameRequest) (*v1models.UpdateGameResponse, error)
/** Gets the latest game state */
GetGameState(context.Context, *v1models.GetGameStateRequest) (*v1models.GetGameStateResponse, error)
/** List the moves for a game */
ListMoves(context.Context, *v1models.ListMovesRequest) (*v1models.ListMovesResponse, error)
ProcessMoves(context.Context, *v1models.ProcessMovesRequest) (*v1models.ProcessMovesResponse, error)
GetOptionsAt(context.Context, *v1models.GetOptionsAtRequest) (*v1models.GetOptionsAtResponse, error)
/** *
Simulates combat between two units to generate damage distributions
This is a stateless utility method that doesn't require game state */
SimulateAttack(context.Context, *v1models.SimulateAttackRequest) (*v1models.SimulateAttackResponse, error)
}
GamesServiceServer is the server API for GamesService service (WASM version without gRPC embedding).
type IndexerServiceServer ¶
type IndexerServiceServer interface {
/** *
Create a LRO for indexing records */
CreateIndexRecordsLRO(context.Context, *v1models.CreateIndexRecordsLRORequest) (*v1models.CreateIndexRecordsLROResponse, error)
/** *
Get the details of a LRO operation */
GetIndexRecordsLRO(context.Context, *v1models.GetIndexRecordsLRORequest) (*v1models.GetIndexRecordsLROResponse, error)
/** *
Update an LRO operation - internal usage */
UpdateIndexRecordsLRO(context.Context, *v1models.UpdateIndexRecordsLRORequest) (*v1models.UpdateIndexRecordsLROResponse, error)
/** *
Batch get multiple entity index states */
GetIndexStates(context.Context, *v1models.GetIndexStatesRequest) (*v1models.GetIndexStatesResponse, error)
/** *
List index entity states by filtering */
ListIndexStates(context.Context, *v1models.ListIndexStatesRequest) (*v1models.ListIndexStatesResponse, error)
DeleteIndexStates(context.Context, *v1models.DeleteIndexStatesRequest) (*v1models.DeleteIndexStatesResponse, error)
}
IndexerServiceServer is the server API for IndexerService service (WASM version without gRPC embedding).
type SingletonInitializerServiceServer ¶
type SingletonInitializerServiceServer interface {
InitializeSingleton(context.Context, *v1models.InitializeSingletonRequest) (*v1models.InitializeSingletonResponse, error)
}
SingletonInitializerServiceServer is the server API for SingletonInitializerService service (WASM version without gRPC embedding).
type UsersServiceServer ¶
type UsersServiceServer interface {
/** *
Create a new user */
CreateUser(context.Context, *v1models.CreateUserRequest) (*v1models.CreateUserResponse, error)
/** *
Batch get multiple users by ID */
GetUsers(context.Context, *v1models.GetUsersRequest) (*v1models.GetUsersResponse, error)
/** ListUsers returns all available users */
ListUsers(context.Context, *v1models.ListUsersRequest) (*v1models.ListUsersResponse, error)
/** GetUser returns a specific user with metadata */
GetUser(context.Context, *v1models.GetUserRequest) (*v1models.GetUserResponse, error)
/** *
Delete a particular user */
DeleteUser(context.Context, *v1models.DeleteUserRequest) (*v1models.DeleteUserResponse, error)
/** GetUser returns a specific user with metadata */
UpdateUser(context.Context, *v1models.UpdateUserRequest) (*v1models.UpdateUserResponse, error)
}
UsersServiceServer is the server API for UsersService service (WASM version without gRPC embedding).
type Weewar_v1ServicesExports ¶
type Weewar_v1ServicesExports struct {
GamesService GamesServiceServer
IndexerService IndexerServiceServer
SingletonInitializerService SingletonInitializerServiceServer
GameViewPresenter GameViewPresenterServer
UsersService UsersServiceServer
WorldsService WorldsServiceServer
// Browser-provided services (clients)
GameViewerPage *GameViewerPageClient
}
Weewar_v1ServicesExports provides WASM exports for dependency injection
func (*Weewar_v1ServicesExports) RegisterAPI ¶
func (exports *Weewar_v1ServicesExports) RegisterAPI()
RegisterAPI registers the services with the JavaScript global namespace
type WorldsServiceServer ¶
type WorldsServiceServer interface {
/** *
Create a new world */
CreateWorld(context.Context, *v1models.CreateWorldRequest) (*v1models.CreateWorldResponse, error)
/** *
Batch get multiple worlds by ID */
GetWorlds(context.Context, *v1models.GetWorldsRequest) (*v1models.GetWorldsResponse, error)
/** ListWorlds returns all available worlds */
ListWorlds(context.Context, *v1models.ListWorldsRequest) (*v1models.ListWorldsResponse, error)
/** GetWorld returns a specific world with metadata */
GetWorld(context.Context, *v1models.GetWorldRequest) (*v1models.GetWorldResponse, error)
/** *
Delete a particular world */
DeleteWorld(context.Context, *v1models.DeleteWorldRequest) (*v1models.DeleteWorldResponse, error)
/** GetWorld returns a specific world with metadata */
UpdateWorld(context.Context, *v1models.UpdateWorldRequest) (*v1models.UpdateWorldResponse, error)
}
WorldsServiceServer is the server API for WorldsService service (WASM version without gRPC embedding).