// Copyright Epic Games, Inc. All Rights Reserved.
using System.Threading;
using System.Threading.Tasks;
namespace EpicGames.Horde.Secrets
{
///
/// Collection of secrets
///
public interface ISecretCollection
{
///
/// Resolve a secret to concrete values
///
/// Identifier for the secret
/// Cancellation token for the operation
Task GetAsync(SecretId secretId, CancellationToken cancellationToken = default);
///
/// Resolve a secret to concrete values
///
/// Identifier for the secret
/// A SecretsConfig object
/// Cancellation token for the operation
/// The method should only be used when the config cannot be retrieved from global config object, for example when it as not initialized during a config load
Task GetAsync(SecretId secretId, object config, CancellationToken cancellationToken = default);
///
/// Converts the string representation of a secret and property to a concrete value
/// The format of the string is 'horde:secret:secret-id.property-name'
///
/// A string that contains a secret ID and property name
/// Cancellation token for the operation
Task ResolveAsync(string value, CancellationToken cancellationToken = default);
}
}