loader logic revised
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user