Files
GitJournal/lib/apis/githost.dart
Vishesh Handa ac5c2be05d Add a GitHost interface
GitLab and GitHost are two implementations of that interface.
2019-01-25 11:21:58 +01:00

23 lines
459 B
Dart

import 'dart:async';
abstract class GitHost {
void init(Function oAuthCallback);
Future launchOAuthScreen();
Future<List<GitRepo>> listRepos();
Future<GitRepo> createRepo(String name);
Future addDeployKey(String sshPublicKey, String repo);
}
class GitRepo {
String fullName;
String cloneUrl;
GitRepo({this.fullName, this.cloneUrl});
@override
String toString() {
return 'GitRepo{fulleName: $fullName, cloneUrl: $cloneUrl}';
}
}