2023-03-23 13:23:03 +00:00
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2023-03-23 11:47:25 +00:00
|
|
|
using static System.IO.File;
|
|
|
|
using static System.Text.Json.JsonSerializer;
|
|
|
|
|
2023-03-19 15:09:37 +00:00
|
|
|
namespace InnovEnergy.App.Backend.S3;
|
|
|
|
|
2023-03-23 13:23:03 +00:00
|
|
|
[SuppressMessage("Trimming", "IL2026:Members annotated with \'RequiresUnreferencedCodeAttribute\' require dynamic access otherwise can break functionality when trimming application code")]
|
2023-03-19 15:09:37 +00:00
|
|
|
public static class S3Access
|
|
|
|
{
|
2023-03-23 12:28:55 +00:00
|
|
|
public static S3Cmd ReadOnly => Deserialize<S3Cmd>(OpenRead("./Resources/s3ReadOnlyKey.json"))!;
|
|
|
|
public static S3Cmd ReadWrite => Deserialize<S3Cmd>(OpenRead("./Resources/s3ReadWriteKey.json"))!;
|
2023-07-13 14:17:58 +00:00
|
|
|
public static S3Cmd Admin => Deserialize<S3Cmd>(OpenRead("./Resources/s3AdminKey.json"))!;
|
2023-03-19 15:09:37 +00:00
|
|
|
}
|