-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
119 changed files
with
763 additions
and
686 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,4 +1,4 @@ | ||
namespace BaGet.Core.Configuration | ||
namespace BaGet.Core | ||
{ | ||
public class SearchOptions | ||
{ | ||
|
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,4 +1,4 @@ | ||
namespace BaGet.Core.Configuration | ||
namespace BaGet.Core | ||
{ | ||
public class StorageOptions | ||
{ | ||
|
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
This file was deleted.
Oops, something went wrong.
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,71 @@ | ||
using System.IO; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using BaGet.Protocol.Models; | ||
using NuGet.Versioning; | ||
|
||
namespace BaGet.Core.Content | ||
{ | ||
/// <summary> | ||
/// The Package Content resource, used to download NuGet packages and to fetch other metadata. | ||
/// | ||
/// See: https://docs.microsoft.com/en-us/nuget/api/package-base-address-resource | ||
/// </summary> | ||
public interface IPackageContentService | ||
{ | ||
/// <summary> | ||
/// Get a package's versions, or null if the package does not exist. | ||
/// See: https://docs.microsoft.com/en-us/nuget/api/package-base-address-resource#enumerate-package-versions | ||
/// </summary> | ||
/// <param name="packageId">The package ID.</param> | ||
/// <param name="cancellationToken">A token to cancel the task.</param> | ||
/// <returns>The package's versions, or null if the package does not exist.</returns> | ||
Task<PackageVersionsResponse> GetPackageVersionsOrNullAsync( | ||
string packageId, | ||
CancellationToken cancellationToken = default); | ||
|
||
/// <summary> | ||
/// Download a package, or null if the package does not exist. | ||
/// See: https://docs.microsoft.com/en-us/nuget/api/package-base-address-resource#download-package-content-nupkg | ||
/// </summary> | ||
/// <param name="packageId">The package ID.</param> | ||
/// <param name="packageVersion">The package's version.</param> | ||
/// <param name="cancellationToken">A token to cancel the task.</param> | ||
/// <returns> | ||
/// The package's content stream, or null if the package does not exist. The stream may not be seekable. | ||
/// </returns> | ||
Task<Stream> GetPackageContentStreamOrNullAsync( | ||
string packageId, | ||
NuGetVersion packageVersion, | ||
CancellationToken cancellationToken = default); | ||
|
||
/// <summary> | ||
/// Download a package's manifest (nuspec), or null if the package does not exist. | ||
/// See: https://docs.microsoft.com/en-us/nuget/api/package-base-address-resource#download-package-manifest-nuspec | ||
/// </summary> | ||
/// <param name="packageId">The package id.</param> | ||
/// <param name="packageVersion">The package's version.</param> | ||
/// <param name="cancellationToken">A token to cancel the task.</param> | ||
/// <returns> | ||
/// The package's manifest stream, or null if the package does not exist. The stream may not be seekable. | ||
/// </returns> | ||
Task<Stream> GetPackageManifestStreamOrNullAsync( | ||
string packageId, | ||
NuGetVersion packageVersion, | ||
CancellationToken cancellationToken = default); | ||
|
||
/// <summary> | ||
/// Download a package's readme, or null if the package or readme does not exist. | ||
/// </summary> | ||
/// <param name="id">The package id.</param> | ||
/// <param name="version">The package's version.</param> | ||
/// <param name="cancellationToken">A token to cancel the task.</param> | ||
/// <returns> | ||
/// The package's readme stream, or null if the package or readme does not exist. The stream may not be seekable. | ||
/// </returns> | ||
Task<Stream> GetPackageReadmeStreamOrNullAsync( | ||
string id, | ||
NuGetVersion version, | ||
CancellationToken cancellationToken = default); | ||
} | ||
} |
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
Oops, something went wrong.