loader logic revised

This commit is contained in:
IliaDenisov
2026-03-16 15:48:00 +02:00
parent cc7ecf6667
commit e6c6970947
13 changed files with 530 additions and 82 deletions
+11 -2
View File
@@ -18,6 +18,15 @@ type Client interface {
// OnConnection receives an event when connection with client's server may be established (true) or connectivity lost (false).
OnConnection(bool)
// OnConnectionError receives an event when background process catches an error related to the server connectivity.
OnConnectionError(error)
// OnStorageError receives an event when background process catches an error related to the app's local Storage.
OnStorageError(error)
// OnServiceError receives an event when background process catches an unexpected processing error.
OnServiceError(error)
}
type GameID string
@@ -30,8 +39,8 @@ type State struct {
// TODO: store user's login key
ClientCurrentVersion string `json:"clientCurrentVersion"`
ClientNextVersion *string `json:"clientNextVersion,omitempty"`
GameState []GameState `json:"gameState"`
ActiveGameID GameID `json:"activeGameId"`
GameState []GameState `json:"gameState,omitempty"`
ActiveGameID *GameID `json:"activeGameId,omitempty"`
}
type GameState struct {