51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using System.ComponentModel.DataAnnotations;
|
||
|
||
namespace TakeoutSaaS.Module.Storage.Options;
|
||
|
||
/// <summary>
|
||
/// 七牛云 Kodo S3 兼容网关配置。
|
||
/// </summary>
|
||
public sealed class QiniuKodoOptions
|
||
{
|
||
/// <summary>
|
||
/// AccessKey。
|
||
/// </summary>
|
||
[Required]
|
||
public string AccessKey { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// SecretKey。
|
||
/// </summary>
|
||
[Required]
|
||
public string SecretKey { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 绑定的空间名称。
|
||
/// </summary>
|
||
[Required]
|
||
public string Bucket { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 下载域名(CDN 域名或测试域名),用于生成访问链接。
|
||
/// </summary>
|
||
[Url]
|
||
public string? DownloadDomain { get; set; }
|
||
|
||
/// <summary>
|
||
/// S3 兼容网关 Endpoint(如 https://s3-cn-south-1.qiniucs.com),为空则使用官方默认。
|
||
/// </summary>
|
||
[Url]
|
||
public string? Endpoint { get; set; }
|
||
|
||
/// <summary>
|
||
/// 是否使用 HTTPS。
|
||
/// </summary>
|
||
public bool UseHttps { get; set; } = true;
|
||
|
||
/// <summary>
|
||
/// 直传或下载时默认有效期(分钟),未设置时使用全局安全配置。
|
||
/// </summary>
|
||
[Range(1, 24 * 60)]
|
||
public int? SignedUrlExpirationMinutes { get; set; }
|
||
}
|