Merge branch 'master' of https://github.com/worldbeater/Camelotia
This commit is contained in:
Коммит
caf9361f8f
30
README.md
30
README.md
|
@ -13,3 +13,33 @@ dotnet run
|
|||
|
||||
On Windows, run the `./run.bat` file.
|
||||
|
||||
### Adding Custom Providers
|
||||
|
||||
File system providers are located at `./Camelotia.Services/Providers/`. To add a custom file system provider, you need to create a separate class and implement the [IProvider](https://github.com/worldbeater/Camelotia/blob/master/Camelotia.Services/Interfaces/IProvider.cs) interface. It'll get integrated into the UI automagically.
|
||||
|
||||
```cs
|
||||
public interface IProvider
|
||||
{
|
||||
string Size { get; }
|
||||
|
||||
string Name { get; }
|
||||
|
||||
string Description { get; }
|
||||
|
||||
Task<IEnumerable<FileModel>> Get(string path);
|
||||
|
||||
Task DownloadFile(string from, Stream to);
|
||||
|
||||
Task UploadFile(string to, Stream from);
|
||||
|
||||
IObservable<bool> IsAuthorized { get; }
|
||||
|
||||
bool SupportsDirectAuth { get; }
|
||||
|
||||
bool SupportsOAuth { get; }
|
||||
|
||||
Task DirectAuth(string login, string password);
|
||||
|
||||
Task OAuth();
|
||||
}
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче