mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-07-09 22:41:44 +08:00
Initial commit
This commit is contained in:
19
Services/Interface/IConfigService.cs
Normal file
19
Services/Interface/IConfigService.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Foxel.Models.DataBase;
|
||||
|
||||
namespace Foxel.Services.Interface;
|
||||
|
||||
public interface IConfigService
|
||||
{
|
||||
string this[string key] { get; }
|
||||
|
||||
Task<string?> GetValueAsync(string key);
|
||||
Task<T?> GetValueAsync<T>(string key, T? defaultValue = default);
|
||||
Task<Config?> GetConfigAsync(string key);
|
||||
Task<List<Config>> GetAllConfigsAsync();
|
||||
|
||||
Task<Config> SetConfigAsync(string key, string value, string? description = null);
|
||||
|
||||
Task<bool> DeleteConfigAsync(string key);
|
||||
|
||||
Task<bool> ExistsAsync(string key);
|
||||
}
|
||||
Reference in New Issue
Block a user