mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00
26 lines
359 B
Dart
26 lines
359 B
Dart
import 'githost.dart';
|
|
import 'github.dart';
|
|
import 'gitlab.dart';
|
|
|
|
export 'githost.dart';
|
|
|
|
enum GitHostType {
|
|
Unknown,
|
|
GitHub,
|
|
GitLab,
|
|
Custom,
|
|
}
|
|
|
|
GitHost createGitHost(GitHostType type) {
|
|
switch (type) {
|
|
case GitHostType.GitHub:
|
|
return GitHub();
|
|
|
|
case GitHostType.GitLab:
|
|
return GitLab();
|
|
|
|
default:
|
|
return null;
|
|
}
|
|
}
|