Skip to content

Commit

Permalink
Remove unnecessary internal interfaces (milvus-io#14)
Browse files Browse the repository at this point in the history
The IGrpcRequest, IRestRequest, and IValidatable interfaces don't seem to be serving a purpose.  They're implemented but never consumed.
  • Loading branch information
stephentoub authored Jul 2, 2023
1 parent 8f863f2 commit 11019b7
Show file tree
Hide file tree
Showing 44 changed files with 41 additions and 188 deletions.
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/AlterAliasRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Alter an alias
/// </summary>
internal sealed class AlterAliasRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.AlterAliasRequest>
internal sealed class AlterAliasRequest
{
[JsonPropertyName("alias")]
public string Alias { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/CalcDistanceRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class CalcDistanceRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.CalcDistanceRequest>
internal sealed class CalcDistanceRequest
{
private readonly MilvusMetricType _milvusMetricType;

Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/CreateAliasRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Create an alias for a collection name
/// </summary>
internal sealed class CreateAliasRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.CreateAliasRequest>
internal sealed class CreateAliasRequest
{
[JsonPropertyName("alias")]
public string Alias { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/CreateCollectionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Create a collection
/// </summary>
internal sealed class CreateCollectionRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.CreateCollectionRequest>
internal sealed class CreateCollectionRequest
{
#region Properties
/// <summary>
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/CreateCredentialRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Create a new user and password
/// </summary>
internal sealed class CreateCredentialRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.CreateCredentialRequest>
internal sealed class CreateCredentialRequest
{
/// <summary>
/// UTC timestamps
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/CreateIndexRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class CreateIndexRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.CreateIndexRequest>
internal sealed class CreateIndexRequest
{
[JsonPropertyName("collection_name")]
public string CollectionName { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/CreatePartitionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Create a partition.
/// </summary>
internal sealed class CreatePartitionRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.CreatePartitionRequest>
internal sealed class CreatePartitionRequest
{
/// <summary>
/// Collection name.
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DeleteCredentialRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Delete a Credential
/// </summary>
internal sealed class DeleteCredentialRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.DeleteCredentialRequest>
internal sealed class DeleteCredentialRequest
{
/// <summary>
/// Not useful for now
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DeleteRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Delete rows of data entities from a collection by given expression
/// </summary>
internal sealed class DeleteRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.DeleteRequest>
internal sealed class DeleteRequest
{
/// <summary>
/// Collection name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DescribeCollectionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Describe a collection
/// </summary>
internal sealed class DescribeCollectionRequest:
IRestRequest,
IGrpcRequest<Grpc.DescribeCollectionRequest>,
IValidatable
internal sealed class DescribeCollectionRequest
{
/// <summary>
/// Collection Name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DescribeIndexRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class DescribeIndexRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.DescribeIndexRequest>
internal sealed class DescribeIndexRequest
{
[JsonPropertyName("collection_name")]
public string CollectionName { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DropAliasRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Delete an Alias
/// </summary>
internal sealed class DropAliasRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.DropAliasRequest>
internal sealed class DropAliasRequest
{
[JsonPropertyName("alias")]
public string Alias { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DropCollectionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Drop a collection
/// </summary>
internal sealed class DropCollectionRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.DropCollectionRequest>
internal sealed class DropCollectionRequest
{
/// <summary>
/// Collection Name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DropIndexRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class DropIndexRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.DropIndexRequest>
internal sealed class DropIndexRequest
{
[JsonPropertyName("collection_name")]
public string CollectionName { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/DropPartitionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Delete a partition
/// </summary>
internal sealed class DropPartitionRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.DropPartitionRequest>
internal sealed class DropPartitionRequest
{
/// <summary>
/// Collection name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/FlushRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ namespace IO.Milvus.ApiSchema;
/// Flush is only required when you want to get up to date entities numbers in statistics due to some internal mechanism.
/// It will be removed in the future.
/// </remarks>
internal sealed class FlushRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.FlushRequest>
internal sealed class FlushRequest
{
/// <summary>
/// Collection names
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetCollectionStatisticsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Get a collection's statistics
/// </summary>
internal sealed class GetCollectionStatisticsRequest:
IRestRequest,
IGrpcRequest<Grpc.GetCollectionStatisticsRequest>,
IValidatable
internal sealed class GetCollectionStatisticsRequest
{
/// <summary>
/// Collection Name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetCompactionPlansRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class GetCompactionPlansRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetCompactionPlansRequest>
internal sealed class GetCompactionPlansRequest
{
[JsonPropertyName("compactionID")]
public long CompactionId { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetCompactionStateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Get the state of a compaction
/// </summary>
internal sealed class GetCompactionStateRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetCompactionStateRequest>
internal sealed class GetCompactionStateRequest
{
/// <summary>
/// Compaction ID
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetFlushStateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Get the flush state of multiple segments
/// </summary>
internal sealed class GetFlushStateRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetFlushStateRequest>
internal sealed class GetFlushStateRequest
{
/// <summary>
/// Segment ids
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetIndexBuildProgressRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class GetIndexBuildProgressRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetIndexBuildProgressRequest>
internal sealed class GetIndexBuildProgressRequest
{
[JsonPropertyName("collection_name")]
public string CollectionName { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetIndexStateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class GetIndexStateRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetIndexStateRequest>
internal sealed class GetIndexStateRequest
{
[JsonPropertyName("collection_name")]
public string CollectionName { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetLoadingProgressRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class GetLoadingProgressRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetLoadingProgressRequest>
internal sealed class GetLoadingProgressRequest
{
[JsonPropertyName("collection_name")]
public string CollectionName { get; set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetMetricsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

namespace IO.Milvus.ApiSchema;

internal sealed class GetMetricsRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetMetricsRequest>
internal sealed class GetMetricsRequest
{
[JsonPropertyName("request")]
public string Request { get;set; }
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetPartitionStatisticsRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Get a partition's statistics
/// </summary>
internal sealed class GetPartitionStatisticsRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetPartitionStatisticsRequest>
internal sealed class GetPartitionStatisticsRequest
{
/// <summary>
/// The collection name in milvus
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetPersistentSegmentInfoRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Returns sealed segment information of a collection
/// </summary>
internal sealed class GetPersistentSegmentInfoRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetPersistentSegmentInfoRequest>
internal sealed class GetPersistentSegmentInfoRequest
{
/// <summary>
/// Collection name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/GetQuerySegmentInfoRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Returns growing segments's information of a collection
/// </summary>
internal sealed class GetQuerySegmentInfoRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.GetQuerySegmentInfoRequest>
internal sealed class GetQuerySegmentInfoRequest
{
/// <summary>
/// Collection name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/HasCollectionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Get if a collection's existence
/// </summary>
internal sealed class HasCollectionRequest:
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.HasCollectionRequest>
internal sealed class HasCollectionRequest
{
/// <summary>
/// Collection Name
Expand Down
5 changes: 1 addition & 4 deletions src/IO.Milvus/ApiSchema/HasPartitionRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Get if a partition exists
/// </summary>
internal sealed class HasPartitionRequest :
IValidatable,
IRestRequest,
IGrpcRequest<Grpc.HasPartitionRequest>
internal sealed class HasPartitionRequest
{
/// <summary>
/// Collection name
Expand Down
14 changes: 0 additions & 14 deletions src/IO.Milvus/ApiSchema/IGrpcRequest.cs

This file was deleted.

8 changes: 0 additions & 8 deletions src/IO.Milvus/ApiSchema/IRestRequest.cs

This file was deleted.

6 changes: 0 additions & 6 deletions src/IO.Milvus/ApiSchema/IValidatable.cs

This file was deleted.

4 changes: 1 addition & 3 deletions src/IO.Milvus/ApiSchema/InsertRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ namespace IO.Milvus.ApiSchema;
/// <summary>
/// Insert rows of data entities into a collection
/// </summary>
internal class InsertRequest:
IValidatable,
IRestRequest
internal class InsertRequest
{
/// <summary>
/// Collection name
Expand Down
Loading

0 comments on commit 11019b7

Please sign in to comment.