Move core to external libs, Starting terminal crossplatform client
This commit is contained in:
15
OpenSaveCloudCore/Models/Remote/AccessToken.cs
Normal file
15
OpenSaveCloudCore/Models/Remote/AccessToken.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class AccessToken
|
||||
{
|
||||
[JsonPropertyName("token")]
|
||||
public string Token { get; set; }
|
||||
}
|
||||
}
|
||||
17
OpenSaveCloudCore/Models/Remote/Credential.cs
Normal file
17
OpenSaveCloudCore/Models/Remote/Credential.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class Credential
|
||||
{
|
||||
[JsonPropertyName("username")]
|
||||
public string Username { get; set; }
|
||||
[JsonPropertyName("password")]
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
32
OpenSaveCloudCore/Models/Remote/Game.cs
Normal file
32
OpenSaveCloudCore/Models/Remote/Game.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class Game
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("rev")]
|
||||
public long Revision { get; set; }
|
||||
|
||||
[JsonPropertyName("hash")]
|
||||
public string Hash { get; set; }
|
||||
|
||||
[JsonPropertyName("last_update")]
|
||||
public string LastUpdate { get; set; }
|
||||
|
||||
[JsonPropertyName("available")]
|
||||
public bool Available { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
18
OpenSaveCloudCore/Models/Remote/GameUploadToken.cs
Normal file
18
OpenSaveCloudCore/Models/Remote/GameUploadToken.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class GameUploadToken
|
||||
{
|
||||
[JsonPropertyName("upload_token")]
|
||||
public string UploadToken { get; set; }
|
||||
[JsonPropertyName("expire")]
|
||||
public string Expire { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
23
OpenSaveCloudCore/Models/Remote/HttpError.cs
Normal file
23
OpenSaveCloudCore/Models/Remote/HttpError.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class HttpError
|
||||
{
|
||||
[JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
[JsonPropertyName("timestamp")]
|
||||
public string Timestamp { get; set; }
|
||||
[JsonPropertyName("error")]
|
||||
public string Error { get; set; }
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
||||
15
OpenSaveCloudCore/Models/Remote/LockError.cs
Normal file
15
OpenSaveCloudCore/Models/Remote/LockError.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class LockError
|
||||
{
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
15
OpenSaveCloudCore/Models/Remote/NewGameInfo.cs
Normal file
15
OpenSaveCloudCore/Models/Remote/NewGameInfo.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class NewGameInfo
|
||||
{
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
17
OpenSaveCloudCore/Models/Remote/NewPassword.cs
Normal file
17
OpenSaveCloudCore/Models/Remote/NewPassword.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class NewPassword
|
||||
{
|
||||
[JsonPropertyName("password")]
|
||||
public string Password { get; set; }
|
||||
[JsonPropertyName("verify_password")]
|
||||
public string VerifyPassword { get; set; }
|
||||
}
|
||||
}
|
||||
17
OpenSaveCloudCore/Models/Remote/Registration.cs
Normal file
17
OpenSaveCloudCore/Models/Remote/Registration.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class Registration
|
||||
{
|
||||
[JsonPropertyName("username")]
|
||||
public string Username { get; set; }
|
||||
[JsonPropertyName("password")]
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
30
OpenSaveCloudCore/Models/Remote/ServerInformation.cs
Normal file
30
OpenSaveCloudCore/Models/Remote/ServerInformation.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class ServerInformation
|
||||
{
|
||||
[JsonPropertyName("allow_register")]
|
||||
public bool AllowRegister { get; set; }
|
||||
|
||||
[JsonPropertyName("version")]
|
||||
public string Version { get; set; }
|
||||
|
||||
[JsonPropertyName("api_version")]
|
||||
public int ApiVersion { get; set; }
|
||||
|
||||
[JsonPropertyName("go_version")]
|
||||
public string GoVersion { get; set; }
|
||||
|
||||
[JsonPropertyName("os_name")]
|
||||
public string OsName { get; set; }
|
||||
|
||||
[JsonPropertyName("os_architecture")]
|
||||
public string OsArchitecture { get; set; }
|
||||
}
|
||||
}
|
||||
17
OpenSaveCloudCore/Models/Remote/TokenValidation.cs
Normal file
17
OpenSaveCloudCore/Models/Remote/TokenValidation.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class TokenValidation
|
||||
{
|
||||
|
||||
[JsonPropertyName("valid")]
|
||||
public bool Valid { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
17
OpenSaveCloudCore/Models/Remote/UpdateUsername.cs
Normal file
17
OpenSaveCloudCore/Models/Remote/UpdateUsername.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class UpdateUsername
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public long Id { get; set; }
|
||||
[JsonPropertyName("username")]
|
||||
public string Username { get; set; }
|
||||
}
|
||||
}
|
||||
15
OpenSaveCloudCore/Models/Remote/UploadGameInfo.cs
Normal file
15
OpenSaveCloudCore/Models/Remote/UploadGameInfo.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class UploadGameInfo
|
||||
{
|
||||
[JsonPropertyName("game_id")]
|
||||
public long GameId { get; set; }
|
||||
}
|
||||
}
|
||||
22
OpenSaveCloudCore/Models/Remote/User.cs
Normal file
22
OpenSaveCloudCore/Models/Remote/User.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudCore.Models.Remote
|
||||
{
|
||||
public class User
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public long Id { get; set; }
|
||||
[JsonPropertyName("username")]
|
||||
public string Username { get; set; }
|
||||
[JsonPropertyName("role")]
|
||||
public string Role { get; set; }
|
||||
[JsonPropertyName("is_admin")]
|
||||
public bool IsAdmin { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user