Files
TakeoutSaaS.AdminApi/src/Modules/TakeoutSaaS.Module.Storage/Options/AliyunOssOptions.cs

46 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.ComponentModel.DataAnnotations;
namespace TakeoutSaaS.Module.Storage.Options;
/// <summary>
/// 阿里云 OSS 访问配置。
/// </summary>
public sealed class AliyunOssOptions
{
/// <summary>
/// 访问密钥 ID。
/// </summary>
[Required]
public string AccessKeyId { get; set; } = string.Empty;
/// <summary>
/// 访问密钥 Secret。
/// </summary>
[Required]
public string AccessKeySecret { get; set; } = string.Empty;
/// <summary>
/// Endpoint如 https://oss-cn-hangzhou.aliyuncs.com。
/// </summary>
[Required]
[Url]
public string Endpoint { get; set; } = string.Empty;
/// <summary>
/// 目标存储桶名称。
/// </summary>
[Required]
public string Bucket { get; set; } = string.Empty;
/// <summary>
/// CDN 加速域名(可选)。
/// </summary>
[Url]
public string? CdnBaseUrl { get; set; }
/// <summary>
/// 是否默认使用 HTTPS。
/// </summary>
public bool UseHttps { get; set; } = true;
}