Files
tiku-backend.net/Tiku.Infrastructure/Storage/AliyunOssOptions.cs
xiong c497a3ca8d
Some checks failed
ci / release-gate (push) Has been cancelled
清理代码
2026-08-03 12:31:39 +08:00

26 lines
897 B
C#

namespace Tiku.Infrastructure.Storage;
public sealed class AliyunOssOptions
{
public const string SectionName = "Storage:AliyunOss";
public string? Region { get; set; }
public string? Endpoint { get; set; }
public string? AccessKeyId { get; set; }
public string? AccessKeySecret { get; set; }
public string? SecurityToken { get; set; }
public bool UseInternalEndpoint { get; set; }
public bool UsePathStyle { get; set; }
public bool UseCName { get; set; }
public int PresignDefaultMinutes { get; set; } = 15;
public bool IsConfigured =>
(!string.IsNullOrWhiteSpace(Region) || !string.IsNullOrWhiteSpace(Endpoint)) &&
!string.IsNullOrWhiteSpace(AccessKeyId) &&
!string.IsNullOrWhiteSpace(AccessKeySecret);
public static bool BeValid(AliyunOssOptions options)
{
return options.PresignDefaultMinutes > 0;
}
}