diff --git a/src/Bindle/BindleClient.cs b/src/Bindle/BindleClient.cs index 8bc74c3..c53999c 100644 --- a/src/Bindle/BindleClient.cs +++ b/src/Bindle/BindleClient.cs @@ -10,7 +10,7 @@ namespace Deislabs.Bindle; -public class BindleClient +public class BindleClient: IBindleClient { public BindleClient(string connectionString) : this(new ConnectionInfo(connectionString)) { } diff --git a/src/Bindle/IBindleClient.cs b/src/Bindle/IBindleClient.cs new file mode 100644 index 0000000..a1a9650 --- /dev/null +++ b/src/Bindle/IBindleClient.cs @@ -0,0 +1,20 @@ +using System.IO; +using System.Net.Http; +using System.Threading.Tasks; + +namespace Deislabs.Bindle +{ + public interface IBindleClient + { + Task 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 GetInvoice(string invoiceId, GetInvoiceOptions options = GetInvoiceOptions.None); + Task GetParcel(string invoiceId, string parcelId); + Task ListMissingParcels(string invoiceId); + Task QueryInvoices(string? queryString = null, ulong? offset = null, long? limit = null, bool? strict = null, string? semVer = null, bool? yanked = null); + Task YankInvoice(string invoiceId); + } +} \ No newline at end of file