Files
finance_tjia/OssOptions.cs
T
2026-10-29 11:52:09 +08:00

59 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OssTJiaUploaderService;
namespace OssZipUploaderService
{
public class OssOptions
{
public string Endpoint { get; set; } = "";
public string Bucket { get; set; } = "";
public string AccessKeyId { get; set; } = "";
public string AccessKeySecret { get; set; } = "";
/// <summary>非空时,使用上述 RAM 用户凭据调用 STS 扮演此角色。</summary>
public string RoleArn { get; set; } = "";
public string RoleSessionName { get; set; } = "tjia-backup";
public string StsRegionId { get; set; } = "cn-chengdu";
public string StsEndpoint { get; set; } = "sts.cn-chengdu.aliyuncs.com";
public int StsDurationSeconds { get; set; } = 3600;
//private string _accessKeyId;
//public string AccessKeyId
//{
// get => CryptoHelper.Decrypt(_accessKeyId);
// set => _accessKeyId = value;
//}
//private string _accessKeySecret;
//public string AccessKeySecret
//{
// get => CryptoHelper.Decrypt(_accessKeySecret);
// set => _accessKeySecret = value;
//}
//其他相关配置
public string backupFolderPath { get; set; } = "";
public string logFile { get; set; } = "";
/// <summary>开始上传尝试的小时</summary>
public int BgTime { get; set; }
/// <summary>结束上传尝试的小时</summary>
public int EdTime { get; set; }
/// <summary>
/// 运行周期:1=每分钟,2=每小时
/// </summary>
public int TimeSpanType { get; set; }
public string WebhookUrl { get; set; }
public string Text { get; set; }
}
}