-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from ilabutin/issue-105-import-via-api
Added API import functionality to Importer
- Loading branch information
Showing
4 changed files
with
108 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.2</TargetFramework> | ||
<LangVersion>latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\DotNetRuServer.Comon.BL\DotNetRuServer.Comon.BL.csproj" /> | ||
<ProjectReference Include="..\DotNetRuServer.Meetups.BL\DotNetRuServer.Meetups.BL.csproj" /> | ||
<ProjectReference Include="..\DotNetRuServer.Meetups.DAL\DotNetRuServer.Meetups.DAL.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.1" /> | ||
<PackageReference Include="Octokit" Version="0.32.0" /> | ||
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0006" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.2</TargetFramework> | ||
<LangVersion>latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\DotNetRuServer.Comon.BL\DotNetRuServer.Comon.BL.csproj" /> | ||
<ProjectReference Include="..\DotNetRuServer.Meetups.BL\DotNetRuServer.Meetups.BL.csproj" /> | ||
<ProjectReference Include="..\DotNetRuServer.Meetups.DAL\DotNetRuServer.Meetups.DAL.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="CommandLineParser" Version="2.6.0" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.1" /> | ||
<PackageReference Include="Octokit" Version="0.32.0" /> | ||
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0006" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using CommandLine; | ||
|
||
namespace DotNetRuServer.Importer | ||
{ | ||
/// <summary> | ||
/// Set of options required to import data from github Audit repo to | ||
/// Server via API | ||
/// </summary> | ||
[Verb("importViaApi", HelpText = "Imports Audit data from Github repo to the Server using API.")] | ||
public class ImportViaApiOptions | ||
{ | ||
/// <summary> | ||
/// Server URL | ||
/// </summary> | ||
[Option("serverUrl", Required = true, HelpText = "Server URL. Example: https://server-dotnetru.azurewebsites.net/.")] | ||
public string ServerUrl { get; set; } | ||
|
||
/// <summary> | ||
/// Github token | ||
/// </summary> | ||
[Option("githubToken", Required = true, HelpText = "Github token.")] | ||
public string GithubToken { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using CommandLine; | ||
|
||
namespace DotNetRuServer.Importer | ||
{ | ||
/// <summary> | ||
/// Set of options required to import data from github Audit repo to | ||
/// Server via API | ||
/// </summary> | ||
[Verb("importViaDatabase", HelpText = "Imports Audit data from Github repo to the Server using direct database connection.")] | ||
public class ImportViaDatabaseOptions | ||
{ | ||
/// <summary> | ||
/// Server URL | ||
/// </summary> | ||
[Option("dbConnection", Required = true, HelpText = "Database connection string.")] | ||
public string DatabaseConnection { get; set; } | ||
|
||
/// <summary> | ||
/// Github token | ||
/// </summary> | ||
[Option("githubToken", Required = true, HelpText = "Github token.")] | ||
public string GithubToken { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters