Add flagsmith
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
namespace Managing.Application.Abstractions.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for Flagsmith feature flag service
|
||||
/// </summary>
|
||||
public interface IFlagsmithService
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets flags for a specific user identity
|
||||
/// </summary>
|
||||
/// <param name="identity">The user identity identifier</param>
|
||||
/// <returns>Flags object for the identity</returns>
|
||||
Task<IFlagsmithFlags> GetIdentityFlagsAsync(string identity);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a feature is enabled for a specific identity
|
||||
/// </summary>
|
||||
/// <param name="identity">The user identity identifier</param>
|
||||
/// <param name="featureName">The name of the feature flag</param>
|
||||
/// <returns>True if the feature is enabled</returns>
|
||||
Task<bool> IsFeatureEnabledAsync(string identity, string featureName);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the feature value for a specific identity
|
||||
/// </summary>
|
||||
/// <param name="identity">The user identity identifier</param>
|
||||
/// <param name="featureName">The name of the feature flag</param>
|
||||
/// <returns>The feature value as string</returns>
|
||||
Task<string?> GetFeatureValueAsync(string identity, string featureName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper interface for Flagsmith flags to enable testing
|
||||
/// </summary>
|
||||
public interface IFlagsmithFlags
|
||||
{
|
||||
Task<bool> IsFeatureEnabled(string featureName);
|
||||
Task<string?> GetFeatureValue(string featureName);
|
||||
}
|
||||
Reference in New Issue
Block a user