summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Storage/IStorageProvider.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Framework/Storage/IStorageProvider.cs')
-rw-r--r--src/SMAPI.Web/Framework/Storage/IStorageProvider.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/SMAPI.Web/Framework/Storage/IStorageProvider.cs b/src/SMAPI.Web/Framework/Storage/IStorageProvider.cs
new file mode 100644
index 00000000..96a34fbb
--- /dev/null
+++ b/src/SMAPI.Web/Framework/Storage/IStorageProvider.cs
@@ -0,0 +1,18 @@
+using System.Threading.Tasks;
+
+namespace StardewModdingAPI.Web.Framework.Storage
+{
+ /// <summary>Provides access to raw data storage.</summary>
+ internal interface IStorageProvider
+ {
+ /// <summary>Save a text file to storage.</summary>
+ /// <param name="content">The content to upload.</param>
+ /// <param name="compress">Whether to gzip the text.</param>
+ /// <returns>Returns metadata about the save attempt.</returns>
+ Task<UploadResult> SaveAsync(string content, bool compress = true);
+
+ /// <summary>Fetch raw text from storage.</summary>
+ /// <param name="id">The storage ID returned by <see cref="SaveAsync"/>.</param>
+ Task<StoredFileInfo> GetAsync(string id);
+ }
+}