Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: batch create sheets (#16197)

Danny Xuc6b126b51c95
diff --git a/backend/api/v1/release_service.go b/backend/api/v1/release_service.go
index 3c5ef9e7ab..893b973b9b 100644
--- a/backend/api/v1/release_service.go
+++ b/backend/api/v1/release_service.go
@@ -90,7 +90,7 @@ func (s *ReleaseService) CreateRelease(ctx context.Context, request *v1pb.Create
// Batch create sheets if needed.
if len(sheetsToCreate) > 0 {
- createdSheets, err := s.sheetManager.BatchCreateSheet(ctx, sheetsToCreate, project.ResourceID, user.ID)
+ createdSheets, err := s.sheetManager.BatchCreateSheets(ctx, sheetsToCreate, project.ResourceID, user.ID)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to create sheets, err: %v", err)
}
diff --git a/backend/api/v1/sheet_service.go b/backend/api/v1/sheet_service.go
index bb8d2b3103..40b21b6750 100644
--- a/backend/api/v1/sheet_service.go
+++ b/backend/api/v1/sheet_service.go
@@ -81,7 +81,7 @@ func (s *SheetService) CreateSheet(ctx context.Context, request *v1pb.CreateShee
return v1pbSheet, nil
}
-func (s *SheetService) BatchCreateSheet(ctx context.Context, request *v1pb.BatchCreateSheetRequest) (*v1pb.BatchCreateSheetResponse, error) {
+func (s *SheetService) BatchCreateSheets(ctx context.Context, request *v1pb.BatchCreateSheetsRequest) (*v1pb.BatchCreateSheetsResponse, error) {
if len(request.Requests) == 0 {
return nil, status.Errorf(codes.InvalidArgument, "requests must be set")
}
@@ -110,7 +110,7 @@ func (s *SheetService) BatchCreateSheet(ctx context.Context, request *v1pb.Batch
var sheetCreates []*store.SheetMessage
for _, r := range request.Requests {
if r.Parent != "" && r.Parent != request.Parent {
- return nil, status.Errorf(codes.InvalidArgument, "Sheet Parent %q does not match BatchCreateSheetRequest.Parent %q", r.Parent, request.Parent)
+ return nil, status.Errorf(codes.InvalidArgument, "Sheet Parent %q does not match BatchCreateSheetsRequest.Parent %q", r.Parent, request.Parent)
}
storeSheetCreate, err := convertToStoreSheetMessage(project.ResourceID, user.ID, r.Sheet)
@@ -121,11 +121,11 @@ func (s *SheetService) BatchCreateSheet(ctx context.Context, request *v1pb.Batch
sheetCreates = append(sheetCreates, storeSheetCreate)
}
- sheets, err := s.sheetManager.BatchCreateSheet(ctx, sheetCreates, project.ResourceID, user.ID)
+ sheets, err := s.sheetManager.BatchCreateSheets(ctx, sheetCreates, project.ResourceID, user.ID)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to create sheet: %v", err)
}
- response := &v1pb.BatchCreateSheetResponse{}
+ response := &v1pb.BatchCreateSheetsResponse{}
for _, sheet := range sheets {
v1pbSheet, err := s.convertToAPISheetMessage(ctx, sheet)
if err != nil {
diff --git a/backend/component/sheet/sheet.go b/backend/component/sheet/sheet.go
index e047767174..9d25ca7363 100644
--- a/backend/component/sheet/sheet.go
+++ b/backend/component/sheet/sheet.go
@@ -72,7 +72,7 @@ func (sm *Manager) CreateSheet(ctx context.Context, sheet *store.SheetMessage) (
return sm.store.CreateSheet(ctx, sheet)
}
-func (sm *Manager) BatchCreateSheet(ctx context.Context, sheets []*store.SheetMessage, projectID string, creatorUID int) ([]*store.SheetMessage, error) {
+func (sm *Manager) BatchCreateSheets(ctx context.Context, sheets []*store.SheetMessage, projectID string, creatorUID int) ([]*store.SheetMessage, error) {
for _, sheet := range sheets {
if sheet.Payload == nil {
sheet.Payload = &storepb.SheetPayload{}
diff --git a/frontend/src/types/proto/v1/sheet_service.ts b/frontend/src/types/proto/v1/sheet_service.ts
index f5002efc52..c07531d2c8 100644
--- a/frontend/src/types/proto/v1/sheet_service.ts
+++ b/frontend/src/types/proto/v1/sheet_service.ts
@@ -23,7 +23,7 @@ export interface CreateSheetRequest {
sheet: Sheet | undefined;
}
-export interface BatchCreateSheetRequest {
+export interface BatchCreateSheetsRequest {
/**
* The parent resource where all sheets will be created.
* Format: projects/{project}
@@ -32,7 +32,7 @@ export interface BatchCreateSheetRequest {
requests: CreateSheetRequest[];
}
-export interface BatchCreateSheetResponse {
+export interface BatchCreateSheetsResponse {
sheets: Sheet[];
}
@@ -233,12 +233,12 @@ export const CreateSheetRequest: MessageFns<CreateSheetRequest> = {
},
};
-function createBaseBatchCreateSheetRequest(): BatchCreateSheetRequest {
+function createBaseBatchCreateSheetsRequest(): BatchCreateSheetsRequest {
return { parent: "", requests: [] };
}
-export const BatchCreateSheetRequest: MessageFns<BatchCreateSheetRequest> = {
- encode(message: BatchCreateSheetRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+export const BatchCreateSheetsRequest: MessageFns<BatchCreateSheetsRequest> = {
+ encode(message: BatchCreateSheetsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.parent !== "") {
writer.uint32(10).string(message.parent);
}
@@ -248,10 +248,10 @@ export const BatchCreateSheetRequest: MessageFns<BatchCreateSheetRequest> = {
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): BatchCreateSheetRequest {
+ decode(input: BinaryReader | Uint8Array, length?: number): BatchCreateSheetsRequest {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseBatchCreateSheetRequest();
+ const message = createBaseBatchCreateSheetsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -280,7 +280,7 @@ export const BatchCreateSheetRequest: MessageFns<BatchCreateSheetRequest> = {
return message;
},
- fromJSON(object: any): BatchCreateSheetRequest {
+ fromJSON(object: any): BatchCreateSheetsRequest {
return {
parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
requests: globalThis.Array.isArray(object?.requests)
@@ -289,7 +289,7 @@ export const BatchCreateSheetRequest: MessageFns<BatchCreateSheetRequest> = {
};
},
- toJSON(message: BatchCreateSheetRequest): unknown {
+ toJSON(message: BatchCreateSheetsRequest): unknown {
const obj: any = {};
if (message.parent !== "") {
obj.parent = message.parent;
@@ -300,33 +300,33 @@ export const BatchCreateSheetRequest: MessageFns<BatchCreateSheetRequest> = {
return obj;
},
- create(base?: DeepPartial<BatchCreateSheetRequest>): BatchCreateSheetRequest {
- return BatchCreateSheetRequest.fromPartial(base ?? {});
+ create(base?: DeepPartial<BatchCreateSheetsRequest>): BatchCreateSheetsRequest {
+ return BatchCreateSheetsRequest.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<BatchCreateSheetRequest>): BatchCreateSheetRequest {
- const message = createBaseBatchCreateSheetRequest();
+ fromPartial(object: DeepPartial<BatchCreateSheetsRequest>): BatchCreateSheetsRequest {
+ const message = createBaseBatchCreateSheetsRequest();
message.parent = object.parent ?? "";
message.requests = object.requests?.map((e) => CreateSheetRequest.fromPartial(e)) || [];
return message;
},
};
-function createBaseBatchCreateSheetResponse(): BatchCreateSheetResponse {
+function createBaseBatchCreateSheetsResponse(): BatchCreateSheetsResponse {
return { sheets: [] };
}
-export const BatchCreateSheetResponse: MessageFns<BatchCreateSheetResponse> = {
- encode(message: BatchCreateSheetResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+export const BatchCreateSheetsResponse: MessageFns<BatchCreateSheetsResponse> = {
+ encode(message: BatchCreateSheetsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
for (const v of message.sheets) {
Sheet.encode(v!, writer.uint32(10).fork()).join();
}
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): BatchCreateSheetResponse {
+ decode(input: BinaryReader | Uint8Array, length?: number): BatchCreateSheetsResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseBatchCreateSheetResponse();
+ const message = createBaseBatchCreateSheetsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -347,11 +347,11 @@ export const BatchCreateSheetResponse: MessageFns<BatchCreateSheetResponse> = {
return message;
},
- fromJSON(object: any): BatchCreateSheetResponse {
+ fromJSON(object: any): BatchCreateSheetsResponse {
return { sheets: globalThis.Array.isArray(object?.sheets) ? object.sheets.map((e: any) => Sheet.fromJSON(e)) : [] };
},
- toJSON(message: BatchCreateSheetResponse): unknown {
+ toJSON(message: BatchCreateSheetsResponse): unknown {
const obj: any = {};
if (message.sheets?.length) {
obj.sheets = message.sheets.map((e) => Sheet.toJSON(e));
@@ -359,11 +359,11 @@ export const BatchCreateSheetResponse: MessageFns<BatchCreateSheetResponse> = {
return obj;
},
- create(base?: DeepPartial<BatchCreateSheetResponse>): BatchCreateSheetResponse {
- return BatchCreateSheetResponse.fromPartial(base ?? {});
+ create(base?: DeepPartial<BatchCreateSheetsResponse>): BatchCreateSheetsResponse {
+ return BatchCreateSheetsResponse.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<BatchCreateSheetResponse>): BatchCreateSheetResponse {
- const message = createBaseBatchCreateSheetResponse();
+ fromPartial(object: DeepPartial<BatchCreateSheetsResponse>): BatchCreateSheetsResponse {
+ const message = createBaseBatchCreateSheetsResponse();
message.sheets = object.sheets?.map((e) => Sheet.fromPartial(e)) || [];
return message;
},
@@ -925,11 +925,11 @@ export const SheetServiceDefinition = {
},
},
},
- batchCreateSheet: {
- name: "BatchCreateSheet",
- requestType: BatchCreateSheetRequest,
+ batchCreateSheets: {
+ name: "BatchCreateSheets",
+ requestType: BatchCreateSheetsRequest,
requestStream: false,
- responseType: BatchCreateSheetResponse,
+ responseType: BatchCreateSheetsResponse,
responseStream: false,
options: {
_unknownFields: {
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 81fe20054b..52be3aa66d 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -5925,7 +5925,7 @@ paths:
post:
tags:
- SheetService
- operationId: SheetService_BatchCreateSheet
+ operationId: SheetService_BatchCreateSheets
parameters:
- name: project
in: path
@@ -5937,7 +5937,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/BatchCreateSheetRequest'
+ $ref: '#/components/schemas/BatchCreateSheetsRequest'
required: true
responses:
"200":
@@ -5945,7 +5945,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/BatchCreateSheetResponse'
+ $ref: '#/components/schemas/BatchCreateSheetsResponse'
default:
description: Default error response
content:
@@ -8232,7 +8232,7 @@ components:
BatchCancelTaskRunsResponse:
type: object
properties: {}
- BatchCreateSheetRequest:
+ BatchCreateSheetsRequest:
required:
- parent
- requests
@@ -8247,7 +8247,7 @@ components:
type: array
items:
$ref: '#/components/schemas/CreateSheetRequest'
- BatchCreateSheetResponse:
+ BatchCreateSheetsResponse:
type: object
properties:
sheets:
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 46395096f4..b25e66e827 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -674,8 +674,8 @@
- [RolloutService](#bytebase-v1-RolloutService)
- [v1/sheet_service.proto](#v1_sheet_service-proto)
- - [BatchCreateSheetRequest](#bytebase-v1-BatchCreateSheetRequest)
- - [BatchCreateSheetResponse](#bytebase-v1-BatchCreateSheetResponse)
+ - [BatchCreateSheetsRequest](#bytebase-v1-BatchCreateSheetsRequest)
+ - [BatchCreateSheetsResponse](#bytebase-v1-BatchCreateSheetsResponse)
- [CreateSheetRequest](#bytebase-v1-CreateSheetRequest)
- [GetSheetRequest](#bytebase-v1-GetSheetRequest)
- [Sheet](#bytebase-v1-Sheet)
@@ -10830,9 +10830,9 @@ Read from `pg_stat_activity`
-<a name="bytebase-v1-BatchCreateSheetRequest"></a>
+<a name="bytebase-v1-BatchCreateSheetsRequest"></a>
-### BatchCreateSheetRequest
+### BatchCreateSheetsRequest
@@ -10846,9 +10846,9 @@ Read from `pg_stat_activity`
-<a name="bytebase-v1-BatchCreateSheetResponse"></a>
+<a name="bytebase-v1-BatchCreateSheetsResponse"></a>
-### BatchCreateSheetResponse
+### BatchCreateSheetsResponse
@@ -10991,7 +10991,7 @@ Type of the SheetPayload.
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| CreateSheet | [CreateSheetRequest](#bytebase-v1-CreateSheetRequest) | [Sheet](#bytebase-v1-Sheet) | |
-| BatchCreateSheet | [BatchCreateSheetRequest](#bytebase-v1-BatchCreateSheetRequest) | [BatchCreateSheetResponse](#bytebase-v1-BatchCreateSheetResponse) | |
+| BatchCreateSheets | [BatchCreateSheetsRequest](#bytebase-v1-BatchCreateSheetsRequest) | [BatchCreateSheetsResponse](#bytebase-v1-BatchCreateSheetsResponse) | |
| GetSheet | [GetSheetRequest](#bytebase-v1-GetSheetRequest) | [Sheet](#bytebase-v1-Sheet) | |
| UpdateSheet | [UpdateSheetRequest](#bytebase-v1-UpdateSheetRequest) | [Sheet](#bytebase-v1-Sheet) | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 4a1ff46844..b1329cc232 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -2754,11 +2754,11 @@
<ul>
<li>
- <a href="#bytebase.v1.BatchCreateSheetRequest"><span class="badge">M</span>BatchCreateSheetRequest</a>
+ <a href="#bytebase.v1.BatchCreateSheetsRequest"><span class="badge">M</span>BatchCreateSheetsRequest</a>
</li>
<li>
- <a href="#bytebase.v1.BatchCreateSheetResponse"><span class="badge">M</span>BatchCreateSheetResponse</a>
+ <a href="#bytebase.v1.BatchCreateSheetsResponse"><span class="badge">M</span>BatchCreateSheetsResponse</a>
</li>
<li>
@@ -29804,7 +29804,7 @@ The access is the same as BatchRunTasks().</p></td>
<p></p>
- <h3 id="bytebase.v1.BatchCreateSheetRequest">BatchCreateSheetRequest</h3>
+ <h3 id="bytebase.v1.BatchCreateSheetsRequest">BatchCreateSheetsRequest</h3>
<p></p>
@@ -29836,7 +29836,7 @@ Format: projects/{project} </p></td>
- <h3 id="bytebase.v1.BatchCreateSheetResponse">BatchCreateSheetResponse</h3>
+ <h3 id="bytebase.v1.BatchCreateSheetsResponse">BatchCreateSheetsResponse</h3>
<p></p>
@@ -30148,9 +30148,9 @@ Only support update the following fields for now:
</tr>
<tr>
- <td>BatchCreateSheet</td>
- <td><a href="#bytebase.v1.BatchCreateSheetRequest">BatchCreateSheetRequest</a></td>
- <td><a href="#bytebase.v1.BatchCreateSheetResponse">BatchCreateSheetResponse</a></td>
+ <td>BatchCreateSheets</td>
+ <td><a href="#bytebase.v1.BatchCreateSheetsRequest">BatchCreateSheetsRequest</a></td>
+ <td><a href="#bytebase.v1.BatchCreateSheetsResponse">BatchCreateSheetsResponse</a></td>
<td><p></p></td>
</tr>
@@ -30199,7 +30199,7 @@ Only support update the following fields for now:
<tr>
- <td>BatchCreateSheet</td>
+ <td>BatchCreateSheets</td>
<td>POST</td>
<td>/v1/{parent=projects/*}/sheets:batchCreate</td>
<td>*</td>
diff --git a/proto/generated-go/v1/sheet_service.pb.go b/proto/generated-go/v1/sheet_service.pb.go
index 4f31f0118d..9da1872a10 100644
--- a/proto/generated-go/v1/sheet_service.pb.go
+++ b/proto/generated-go/v1/sheet_service.pb.go
@@ -126,7 +126,7 @@ func (x *CreateSheetRequest) GetSheet() *Sheet {
return nil
}
-type BatchCreateSheetRequest struct {
+type BatchCreateSheetsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The parent resource where all sheets will be created.
// Format: projects/{project}
@@ -136,20 +136,20 @@ type BatchCreateSheetRequest struct {
sizeCache protoimpl.SizeCache
}
-func (x *BatchCreateSheetRequest) Reset() {
- *x = BatchCreateSheetRequest{}
+func (x *BatchCreateSheetsRequest) Reset() {
+ *x = BatchCreateSheetsRequest{}
mi := &file_v1_sheet_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *BatchCreateSheetRequest) String() string {
+func (x *BatchCreateSheetsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*BatchCreateSheetRequest) ProtoMessage() {}
+func (*BatchCreateSheetsRequest) ProtoMessage() {}
-func (x *BatchCreateSheetRequest) ProtoReflect() protoreflect.Message {
+func (x *BatchCreateSheetsRequest) ProtoReflect() protoreflect.Message {
mi := &file_v1_sheet_service_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -161,46 +161,46 @@ func (x *BatchCreateSheetRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use BatchCreateSheetRequest.ProtoReflect.Descriptor instead.
-func (*BatchCreateSheetRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use BatchCreateSheetsRequest.ProtoReflect.Descriptor instead.
+func (*BatchCreateSheetsRequest) Descriptor() ([]byte, []int) {
return file_v1_sheet_service_proto_rawDescGZIP(), []int{1}
}
-func (x *BatchCreateSheetRequest) GetParent() string {
+func (x *BatchCreateSheetsRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
-func (x *BatchCreateSheetRequest) GetRequests() []*CreateSheetRequest {
+func (x *BatchCreateSheetsRequest) GetRequests() []*CreateSheetRequest {
if x != nil {
return x.Requests
}
return nil
}
-type BatchCreateSheetResponse struct {
+type BatchCreateSheetsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Sheets []*Sheet `protobuf:"bytes,1,rep,name=sheets,proto3" json:"sheets,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
-func (x *BatchCreateSheetResponse) Reset() {
- *x = BatchCreateSheetResponse{}
+func (x *BatchCreateSheetsResponse) Reset() {
+ *x = BatchCreateSheetsResponse{}
mi := &file_v1_sheet_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *BatchCreateSheetResponse) String() string {
+func (x *BatchCreateSheetsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*BatchCreateSheetResponse) ProtoMessage() {}
+func (*BatchCreateSheetsResponse) ProtoMessage() {}
-func (x *BatchCreateSheetResponse) ProtoReflect() protoreflect.Message {
+func (x *BatchCreateSheetsResponse) ProtoReflect() protoreflect.Message {
mi := &file_v1_sheet_service_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -212,12 +212,12 @@ func (x *BatchCreateSheetResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use BatchCreateSheetResponse.ProtoReflect.Descriptor instead.
-func (*BatchCreateSheetResponse) Descriptor() ([]byte, []int) {
+// Deprecated: Use BatchCreateSheetsResponse.ProtoReflect.Descriptor instead.
+func (*BatchCreateSheetsResponse) Descriptor() ([]byte, []int) {
return file_v1_sheet_service_proto_rawDescGZIP(), []int{2}
}
-func (x *BatchCreateSheetResponse) GetSheets() []*Sheet {
+func (x *BatchCreateSheetsResponse) GetSheets() []*Sheet {
if x != nil {
return x.Sheets
}
@@ -566,12 +566,12 @@ const file_v1_sheet_service_proto_rawDesc = "" +
"\x12CreateSheetRequest\x125\n" +
"\x06parent\x18\x01 \x01(\tB\x1d\xe2A\x01\x02\xfaA\x16\n" +
"\x14bytebase.com/ProjectR\x06parent\x12.\n" +
- "\x05sheet\x18\x02 \x01(\v2\x12.bytebase.v1.SheetB\x04\xe2A\x01\x02R\x05sheet\"\x93\x01\n" +
- "\x17BatchCreateSheetRequest\x125\n" +
+ "\x05sheet\x18\x02 \x01(\v2\x12.bytebase.v1.SheetB\x04\xe2A\x01\x02R\x05sheet\"\x94\x01\n" +
+ "\x18BatchCreateSheetsRequest\x125\n" +
"\x06parent\x18\x01 \x01(\tB\x1d\xe2A\x01\x02\xfaA\x16\n" +
"\x14bytebase.com/ProjectR\x06parent\x12A\n" +
- "\brequests\x18\x02 \x03(\v2\x1f.bytebase.v1.CreateSheetRequestB\x04\xe2A\x01\x02R\brequests\"F\n" +
- "\x18BatchCreateSheetResponse\x12*\n" +
+ "\brequests\x18\x02 \x03(\v2\x1f.bytebase.v1.CreateSheetRequestB\x04\xe2A\x01\x02R\brequests\"G\n" +
+ "\x19BatchCreateSheetsResponse\x12*\n" +
"\x06sheets\x18\x01 \x03(\v2\x12.bytebase.v1.SheetR\x06sheets\"T\n" +
"\x0fGetSheetRequest\x12/\n" +
"\x04name\x18\x01 \x01(\tB\x1b\xe2A\x01\x02\xfaA\x14\n" +
@@ -600,10 +600,10 @@ const file_v1_sheet_service_proto_rawDesc = "" +
"\rSCHEMA_DESIGN\x10\x01\"6\n" +
"\fSheetCommand\x12\x14\n" +
"\x05start\x18\x01 \x01(\x05R\x05start\x12\x10\n" +
- "\x03end\x18\x02 \x01(\x05R\x03end2\x83\x05\n" +
+ "\x03end\x18\x02 \x01(\x05R\x03end2\x86\x05\n" +
"\fSheetService\x12\x98\x01\n" +
- "\vCreateSheet\x12\x1f.bytebase.v1.CreateSheetRequest\x1a\x12.bytebase.v1.Sheet\"T\xdaA\fparent,sheet\x8a\xea0\x10bb.sheets.create\x90\xea0\x01\x82\xd3\xe4\x93\x02':\x05sheet\"\x1e/v1/{parent=projects/*}/sheets\x12\xae\x01\n" +
- "\x10BatchCreateSheet\x12$.bytebase.v1.BatchCreateSheetRequest\x1a%.bytebase.v1.BatchCreateSheetResponse\"M\x8a\xea0\x10bb.sheets.create\x90\xea0\x01\x82\xd3\xe4\x93\x02/:\x01*\"*/v1/{parent=projects/*}/sheets:batchCreate\x12\x80\x01\n" +
+ "\vCreateSheet\x12\x1f.bytebase.v1.CreateSheetRequest\x1a\x12.bytebase.v1.Sheet\"T\xdaA\fparent,sheet\x8a\xea0\x10bb.sheets.create\x90\xea0\x01\x82\xd3\xe4\x93\x02':\x05sheet\"\x1e/v1/{parent=projects/*}/sheets\x12\xb1\x01\n" +
+ "\x11BatchCreateSheets\x12%.bytebase.v1.BatchCreateSheetsRequest\x1a&.bytebase.v1.BatchCreateSheetsResponse\"M\x8a\xea0\x10bb.sheets.create\x90\xea0\x01\x82\xd3\xe4\x93\x02/:\x01*\"*/v1/{parent=projects/*}/sheets:batchCreate\x12\x80\x01\n" +
"\bGetSheet\x12\x1c.bytebase.v1.GetSheetRequest\x1a\x12.bytebase.v1.Sheet\"B\xdaA\x04name\x8a\xea0\rbb.sheets.get\x90\xea0\x01\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=projects/*/sheets/*}\x12\xa3\x01\n" +
"\vUpdateSheet\x12\x1f.bytebase.v1.UpdateSheetRequest\x1a\x12.bytebase.v1.Sheet\"_\xdaA\x11sheet,update_mask\x8a\xea0\x10bb.sheets.update\x90\xea0\x01\x82\xd3\xe4\x93\x02-:\x05sheet2$/v1/{sheet.name=projects/*/sheets/*}B\x11Z\x0fgenerated-go/v1b\x06proto3"
@@ -622,23 +622,23 @@ func file_v1_sheet_service_proto_rawDescGZIP() []byte {
var file_v1_sheet_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_v1_sheet_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_v1_sheet_service_proto_goTypes = []any{
- (SheetPayload_Type)(0), // 0: bytebase.v1.SheetPayload.Type
- (*CreateSheetRequest)(nil), // 1: bytebase.v1.CreateSheetRequest
- (*BatchCreateSheetRequest)(nil), // 2: bytebase.v1.BatchCreateSheetRequest
- (*BatchCreateSheetResponse)(nil), // 3: bytebase.v1.BatchCreateSheetResponse
- (*GetSheetRequest)(nil), // 4: bytebase.v1.GetSheetRequest
- (*UpdateSheetRequest)(nil), // 5: bytebase.v1.UpdateSheetRequest
- (*Sheet)(nil), // 6: bytebase.v1.Sheet
- (*SheetPayload)(nil), // 7: bytebase.v1.SheetPayload
- (*SheetCommand)(nil), // 8: bytebase.v1.SheetCommand
- (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
- (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
- (Engine)(0), // 11: bytebase.v1.Engine
+ (SheetPayload_Type)(0), // 0: bytebase.v1.SheetPayload.Type
+ (*CreateSheetRequest)(nil), // 1: bytebase.v1.CreateSheetRequest
+ (*BatchCreateSheetsRequest)(nil), // 2: bytebase.v1.BatchCreateSheetsRequest
+ (*BatchCreateSheetsResponse)(nil), // 3: bytebase.v1.BatchCreateSheetsResponse
+ (*GetSheetRequest)(nil), // 4: bytebase.v1.GetSheetRequest
+ (*UpdateSheetRequest)(nil), // 5: bytebase.v1.UpdateSheetRequest
+ (*Sheet)(nil), // 6: bytebase.v1.Sheet
+ (*SheetPayload)(nil), // 7: bytebase.v1.SheetPayload
+ (*SheetCommand)(nil), // 8: bytebase.v1.SheetCommand
+ (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
+ (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
+ (Engine)(0), // 11: bytebase.v1.Engine
}
var file_v1_sheet_service_proto_depIdxs = []int32{
6, // 0: bytebase.v1.CreateSheetRequest.sheet:type_name -> bytebase.v1.Sheet
- 1, // 1: bytebase.v1.BatchCreateSheetRequest.requests:type_name -> bytebase.v1.CreateSheetRequest
- 6, // 2: bytebase.v1.BatchCreateSheetResponse.sheets:type_name -> bytebase.v1.Sheet
+ 1, // 1: bytebase.v1.BatchCreateSheetsRequest.requests:type_name -> bytebase.v1.CreateSheetRequest
+ 6, // 2: bytebase.v1.BatchCreateSheetsResponse.sheets:type_name -> bytebase.v1.Sheet
6, // 3: bytebase.v1.UpdateSheetRequest.sheet:type_name -> bytebase.v1.Sheet
9, // 4: bytebase.v1.UpdateSheetRequest.update_mask:type_name -> google.protobuf.FieldMask
10, // 5: bytebase.v1.Sheet.create_time:type_name -> google.protobuf.Timestamp
@@ -647,11 +647,11 @@ var file_v1_sheet_service_proto_depIdxs = []int32{
0, // 8: bytebase.v1.SheetPayload.type:type_name -> bytebase.v1.SheetPayload.Type
8, // 9: bytebase.v1.SheetPayload.commands:type_name -> bytebase.v1.SheetCommand
1, // 10: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest
- 2, // 11: bytebase.v1.SheetService.BatchCreateSheet:input_type -> bytebase.v1.BatchCreateSheetRequest
+ 2, // 11: bytebase.v1.SheetService.BatchCreateSheets:input_type -> bytebase.v1.BatchCreateSheetsRequest
4, // 12: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest
5, // 13: bytebase.v1.SheetService.UpdateSheet:input_type -> bytebase.v1.UpdateSheetRequest
6, // 14: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet
- 3, // 15: bytebase.v1.SheetService.BatchCreateSheet:output_type -> bytebase.v1.BatchCreateSheetResponse
+ 3, // 15: bytebase.v1.SheetService.BatchCreateSheets:output_type -> bytebase.v1.BatchCreateSheetsResponse
6, // 16: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet
6, // 17: bytebase.v1.SheetService.UpdateSheet:output_type -> bytebase.v1.Sheet
14, // [14:18] is the sub-list for method output_type
diff --git a/proto/generated-go/v1/sheet_service.pb.gw.go b/proto/generated-go/v1/sheet_service.pb.gw.go
index 68df8dd664..4944bedecb 100644
--- a/proto/generated-go/v1/sheet_service.pb.gw.go
+++ b/proto/generated-go/v1/sheet_service.pb.gw.go
@@ -77,9 +77,9 @@ func local_request_SheetService_CreateSheet_0(ctx context.Context, marshaler run
return msg, metadata, err
}
-func request_SheetService_BatchCreateSheet_0(ctx context.Context, marshaler runtime.Marshaler, client SheetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func request_SheetService_BatchCreateSheets_0(ctx context.Context, marshaler runtime.Marshaler, client SheetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
- protoReq BatchCreateSheetRequest
+ protoReq BatchCreateSheetsRequest
metadata runtime.ServerMetadata
err error
)
@@ -94,13 +94,13 @@ func request_SheetService_BatchCreateSheet_0(ctx context.Context, marshaler runt
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
}
- msg, err := client.BatchCreateSheet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.BatchCreateSheets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_SheetService_BatchCreateSheet_0(ctx context.Context, marshaler runtime.Marshaler, server SheetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+func local_request_SheetService_BatchCreateSheets_0(ctx context.Context, marshaler runtime.Marshaler, server SheetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
- protoReq BatchCreateSheetRequest
+ protoReq BatchCreateSheetsRequest
metadata runtime.ServerMetadata
err error
)
@@ -115,7 +115,7 @@ func local_request_SheetService_BatchCreateSheet_0(ctx context.Context, marshale
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
}
- msg, err := server.BatchCreateSheet(ctx, &protoReq)
+ msg, err := server.BatchCreateSheets(ctx, &protoReq)
return msg, metadata, err
}
@@ -274,25 +274,25 @@ func RegisterSheetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
}
forward_SheetService_CreateSheet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodPost, pattern_SheetService_BatchCreateSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle(http.MethodPost, pattern_SheetService_BatchCreateSheets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SheetService/BatchCreateSheet", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/sheets:batchCreate"))
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SheetService/BatchCreateSheets", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/sheets:batchCreate"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_SheetService_BatchCreateSheet_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_SheetService_BatchCreateSheets_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SheetService_BatchCreateSheet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_SheetService_BatchCreateSheets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle(http.MethodGet, pattern_SheetService_GetSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
@@ -391,22 +391,22 @@ func RegisterSheetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
}
forward_SheetService_CreateSheet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle(http.MethodPost, pattern_SheetService_BatchCreateSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle(http.MethodPost, pattern_SheetService_BatchCreateSheets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SheetService/BatchCreateSheet", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/sheets:batchCreate"))
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SheetService/BatchCreateSheets", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/sheets:batchCreate"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_SheetService_BatchCreateSheet_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_SheetService_BatchCreateSheets_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_SheetService_BatchCreateSheet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_SheetService_BatchCreateSheets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle(http.MethodGet, pattern_SheetService_GetSheet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
@@ -446,15 +446,15 @@ func RegisterSheetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
}
var (
- pattern_SheetService_CreateSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "sheets"}, ""))
- pattern_SheetService_BatchCreateSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "sheets"}, "batchCreate"))
- pattern_SheetService_GetSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "sheets", "name"}, ""))
- pattern_SheetService_UpdateSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "sheets", "sheet.name"}, ""))
+ pattern_SheetService_CreateSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "sheets"}, ""))
+ pattern_SheetService_BatchCreateSheets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "sheets"}, "batchCreate"))
+ pattern_SheetService_GetSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "sheets", "name"}, ""))
+ pattern_SheetService_UpdateSheet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "sheets", "sheet.name"}, ""))
)
var (
- forward_SheetService_CreateSheet_0 = runtime.ForwardResponseMessage
- forward_SheetService_BatchCreateSheet_0 = runtime.ForwardResponseMessage
- forward_SheetService_GetSheet_0 = runtime.ForwardResponseMessage
- forward_SheetService_UpdateSheet_0 = runtime.ForwardResponseMessage
+ forward_SheetService_CreateSheet_0 = runtime.ForwardResponseMessage
+ forward_SheetService_BatchCreateSheets_0 = runtime.ForwardResponseMessage
+ forward_SheetService_GetSheet_0 = runtime.ForwardResponseMessage
+ forward_SheetService_UpdateSheet_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/generated-go/v1/sheet_service_grpc.pb.go b/proto/generated-go/v1/sheet_service_grpc.pb.go
index aa5870634f..43c1f81fb4 100644
--- a/proto/generated-go/v1/sheet_service_grpc.pb.go
+++ b/proto/generated-go/v1/sheet_service_grpc.pb.go
@@ -19,10 +19,10 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
- SheetService_CreateSheet_FullMethodName = "/bytebase.v1.SheetService/CreateSheet"
- SheetService_BatchCreateSheet_FullMethodName = "/bytebase.v1.SheetService/BatchCreateSheet"
- SheetService_GetSheet_FullMethodName = "/bytebase.v1.SheetService/GetSheet"
- SheetService_UpdateSheet_FullMethodName = "/bytebase.v1.SheetService/UpdateSheet"
+ SheetService_CreateSheet_FullMethodName = "/bytebase.v1.SheetService/CreateSheet"
+ SheetService_BatchCreateSheets_FullMethodName = "/bytebase.v1.SheetService/BatchCreateSheets"
+ SheetService_GetSheet_FullMethodName = "/bytebase.v1.SheetService/GetSheet"
+ SheetService_UpdateSheet_FullMethodName = "/bytebase.v1.SheetService/UpdateSheet"
)
// SheetServiceClient is the client API for SheetService service.
@@ -30,7 +30,7 @@ const (
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SheetServiceClient interface {
CreateSheet(ctx context.Context, in *CreateSheetRequest, opts ...grpc.CallOption) (*Sheet, error)
- BatchCreateSheet(ctx context.Context, in *BatchCreateSheetRequest, opts ...grpc.CallOption) (*BatchCreateSheetResponse, error)
+ BatchCreateSheets(ctx context.Context, in *BatchCreateSheetsRequest, opts ...grpc.CallOption) (*BatchCreateSheetsResponse, error)
GetSheet(ctx context.Context, in *GetSheetRequest, opts ...grpc.CallOption) (*Sheet, error)
UpdateSheet(ctx context.Context, in *UpdateSheetRequest, opts ...grpc.CallOption) (*Sheet, error)
}
@@ -53,10 +53,10 @@ func (c *sheetServiceClient) CreateSheet(ctx context.Context, in *CreateSheetReq
return out, nil
}
-func (c *sheetServiceClient) BatchCreateSheet(ctx context.Context, in *BatchCreateSheetRequest, opts ...grpc.CallOption) (*BatchCreateSheetResponse, error) {
+func (c *sheetServiceClient) BatchCreateSheets(ctx context.Context, in *BatchCreateSheetsRequest, opts ...grpc.CallOption) (*BatchCreateSheetsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(BatchCreateSheetResponse)
- err := c.cc.Invoke(ctx, SheetService_BatchCreateSheet_FullMethodName, in, out, cOpts...)
+ out := new(BatchCreateSheetsResponse)
+ err := c.cc.Invoke(ctx, SheetService_BatchCreateSheets_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -88,7 +88,7 @@ func (c *sheetServiceClient) UpdateSheet(ctx context.Context, in *UpdateSheetReq
// for forward compatibility.
type SheetServiceServer interface {
CreateSheet(context.Context, *CreateSheetRequest) (*Sheet, error)
- BatchCreateSheet(context.Context, *BatchCreateSheetRequest) (*BatchCreateSheetResponse, error)
+ BatchCreateSheets(context.Context, *BatchCreateSheetsRequest) (*BatchCreateSheetsResponse, error)
GetSheet(context.Context, *GetSheetRequest) (*Sheet, error)
UpdateSheet(context.Context, *UpdateSheetRequest) (*Sheet, error)
mustEmbedUnimplementedSheetServiceServer()
@@ -104,8 +104,8 @@ type UnimplementedSheetServiceServer struct{}
func (UnimplementedSheetServiceServer) CreateSheet(context.Context, *CreateSheetRequest) (*Sheet, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSheet not implemented")
}
-func (UnimplementedSheetServiceServer) BatchCreateSheet(context.Context, *BatchCreateSheetRequest) (*BatchCreateSheetResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method BatchCreateSheet not implemented")
+func (UnimplementedSheetServiceServer) BatchCreateSheets(context.Context, *BatchCreateSheetsRequest) (*BatchCreateSheetsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method BatchCreateSheets not implemented")
}
func (UnimplementedSheetServiceServer) GetSheet(context.Context, *GetSheetRequest) (*Sheet, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSheet not implemented")
@@ -152,20 +152,20 @@ func _SheetService_CreateSheet_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
-func _SheetService_BatchCreateSheet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(BatchCreateSheetRequest)
+func _SheetService_BatchCreateSheets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(BatchCreateSheetsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(SheetServiceServer).BatchCreateSheet(ctx, in)
+ return srv.(SheetServiceServer).BatchCreateSheets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: SheetService_BatchCreateSheet_FullMethodName,
+ FullMethod: SheetService_BatchCreateSheets_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SheetServiceServer).BatchCreateSheet(ctx, req.(*BatchCreateSheetRequest))
+ return srv.(SheetServiceServer).BatchCreateSheets(ctx, req.(*BatchCreateSheetsRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -218,8 +218,8 @@ var SheetService_ServiceDesc = grpc.ServiceDesc{
Handler: _SheetService_CreateSheet_Handler,
},
{
- MethodName: "BatchCreateSheet",
- Handler: _SheetService_BatchCreateSheet_Handler,
+ MethodName: "BatchCreateSheets",
+ Handler: _SheetService_BatchCreateSheets_Handler,
},
{
MethodName: "GetSheet",
diff --git a/proto/v1/v1/sheet_service.proto b/proto/v1/v1/sheet_service.proto
index d6278b17fc..ca150c5ee8 100644
--- a/proto/v1/v1/sheet_service.proto
+++ b/proto/v1/v1/sheet_service.proto
@@ -24,7 +24,7 @@ service SheetService {
option (bytebase.v1.auth_method) = IAM;
}
- rpc BatchCreateSheet(BatchCreateSheetRequest) returns (BatchCreateSheetResponse) {
+ rpc BatchCreateSheets(BatchCreateSheetsRequest) returns (BatchCreateSheetsResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*}/sheets:batchCreate"
body: "*"
@@ -63,7 +63,7 @@ message CreateSheetRequest {
Sheet sheet = 2 [(google.api.field_behavior) = REQUIRED];
}
-message BatchCreateSheetRequest {
+message BatchCreateSheetsRequest {
// The parent resource where all sheets will be created.
// Format: projects/{project}
string parent = 1 [
@@ -74,7 +74,7 @@ message BatchCreateSheetRequest {
repeated CreateSheetRequest requests = 2 [(google.api.field_behavior) = REQUIRED];
}
-message BatchCreateSheetResponse {
+message BatchCreateSheetsResponse {
repeated Sheet sheets = 1;
}