From 4d3bbae18a0de276d50d162a9555621fb9f9dc20 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 3 Jun 2021 14:39:46 +0100 Subject: [PATCH] remove batch save endpoint --- file/proto/file.pb.go | 20 +++++++------------- file/proto/file.pb.micro.go | 17 ----------------- file/proto/file.proto | 1 - file/publicapi.json | 1 - 4 files changed, 7 insertions(+), 32 deletions(-) diff --git a/file/proto/file.pb.go b/file/proto/file.pb.go index fef7903..f71d8aa 100644 --- a/file/proto/file.pb.go +++ b/file/proto/file.pb.go @@ -644,7 +644,7 @@ var file_proto_file_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0x90, 0x02, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x04, + 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x01, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, @@ -657,10 +657,6 @@ var file_proto_file_proto_rawDesc = []byte{ 0x35, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x61, 0x76, 0x65, 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x66, 0x69, - 0x6c, 0x65, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x66, 0x69, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -702,14 +698,12 @@ var file_proto_file_proto_depIdxs = []int32{ 7, // 6: file.File.List:input_type -> file.ListRequest 5, // 7: file.File.Save:input_type -> file.SaveRequest 9, // 8: file.File.Delete:input_type -> file.DeleteRequest - 1, // 9: file.File.BatchSave:input_type -> file.BatchSaveRequest - 4, // 10: file.File.Read:output_type -> file.ReadResponse - 8, // 11: file.File.List:output_type -> file.ListResponse - 6, // 12: file.File.Save:output_type -> file.SaveResponse - 10, // 13: file.File.Delete:output_type -> file.DeleteResponse - 2, // 14: file.File.BatchSave:output_type -> file.BatchSaveResponse - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type + 4, // 9: file.File.Read:output_type -> file.ReadResponse + 8, // 10: file.File.List:output_type -> file.ListResponse + 6, // 11: file.File.Save:output_type -> file.SaveResponse + 10, // 12: file.File.Delete:output_type -> file.DeleteResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name diff --git a/file/proto/file.pb.micro.go b/file/proto/file.pb.micro.go index cfdf956..962332f 100644 --- a/file/proto/file.pb.micro.go +++ b/file/proto/file.pb.micro.go @@ -46,7 +46,6 @@ type FileService interface { List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error) Save(ctx context.Context, in *SaveRequest, opts ...client.CallOption) (*SaveResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) - BatchSave(ctx context.Context, in *BatchSaveRequest, opts ...client.CallOption) (*BatchSaveResponse, error) } type fileService struct { @@ -101,16 +100,6 @@ func (c *fileService) Delete(ctx context.Context, in *DeleteRequest, opts ...cli return out, nil } -func (c *fileService) BatchSave(ctx context.Context, in *BatchSaveRequest, opts ...client.CallOption) (*BatchSaveResponse, error) { - req := c.c.NewRequest(c.name, "File.BatchSave", in) - out := new(BatchSaveResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // Server API for File service type FileHandler interface { @@ -118,7 +107,6 @@ type FileHandler interface { List(context.Context, *ListRequest, *ListResponse) error Save(context.Context, *SaveRequest, *SaveResponse) error Delete(context.Context, *DeleteRequest, *DeleteResponse) error - BatchSave(context.Context, *BatchSaveRequest, *BatchSaveResponse) error } func RegisterFileHandler(s server.Server, hdlr FileHandler, opts ...server.HandlerOption) error { @@ -127,7 +115,6 @@ func RegisterFileHandler(s server.Server, hdlr FileHandler, opts ...server.Handl List(ctx context.Context, in *ListRequest, out *ListResponse) error Save(ctx context.Context, in *SaveRequest, out *SaveResponse) error Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error - BatchSave(ctx context.Context, in *BatchSaveRequest, out *BatchSaveResponse) error } type File struct { file @@ -155,7 +142,3 @@ func (h *fileHandler) Save(ctx context.Context, in *SaveRequest, out *SaveRespon func (h *fileHandler) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error { return h.FileHandler.Delete(ctx, in, out) } - -func (h *fileHandler) BatchSave(ctx context.Context, in *BatchSaveRequest, out *BatchSaveResponse) error { - return h.FileHandler.BatchSave(ctx, in, out) -} diff --git a/file/proto/file.proto b/file/proto/file.proto index b714548..9f3f588 100644 --- a/file/proto/file.proto +++ b/file/proto/file.proto @@ -9,7 +9,6 @@ service File { rpc List(ListRequest) returns (ListResponse) {} rpc Save(SaveRequest) returns (SaveResponse) {} rpc Delete(DeleteRequest) returns (DeleteResponse) {} - rpc BatchSave(BatchSaveRequest) returns (BatchSaveResponse) {} } message Record { diff --git a/file/publicapi.json b/file/publicapi.json index 04e8896..b938449 100644 --- a/file/publicapi.json +++ b/file/publicapi.json @@ -3,7 +3,6 @@ "icon": "📁", "category": "storage", "pricing": { - "File.BatchSave": 100, "File.List": 100, "File.Read": 100, "File.Save": 100,