Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an interface to the BindleClient #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Bindle/BindleClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Deislabs.Bindle;

public class BindleClient
public class BindleClient: IBindleClient
{
public BindleClient(string connectionString) : this(new ConnectionInfo(connectionString)) { }

Expand Down
20 changes: 20 additions & 0 deletions src/Bindle/IBindleClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;

namespace Deislabs.Bindle
{
public interface IBindleClient
{
Task<CreateInvoiceResult> CreateInvoice(Invoice invoice);
Task CreateParcel(string invoiceId, string parcelId, byte[] content);
Task CreateParcel(string invoiceId, string parcelId, HttpContent content);
Task CreateParcel(string invoiceId, string parcelId, Stream content);
Task CreateParcel(string invoiceId, string parcelId, string content);
Task<Invoice> GetInvoice(string invoiceId, GetInvoiceOptions options = GetInvoiceOptions.None);
Task<HttpContent> GetParcel(string invoiceId, string parcelId);
Task<MissingParcelsResponse> ListMissingParcels(string invoiceId);
Task<Matches> QueryInvoices(string? queryString = null, ulong? offset = null, long? limit = null, bool? strict = null, string? semVer = null, bool? yanked = null);
Task YankInvoice(string invoiceId);
}
}