Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: diff branch database API (#9761)
Danny Xu58059e7ea181
diff --git a/frontend/src/types/proto/v1/branch_service.ts b/frontend/src/types/proto/v1/branch_service.tsindex 65f5b11518..ec32260f09 100644--- a/frontend/src/types/proto/v1/branch_service.ts+++ b/frontend/src/types/proto/v1/branch_service.ts@@ -288,6 +288,28 @@ export interface DeleteBranchRequest {name: string;}+export interface DiffDatabaseRequest {+ /** The name of branch. */+ name: string;+ /** The name of the databsae to merge the branch to. */+ database: string;+}++export interface DiffDatabaseResponse {+ /** The schema diff when merge occurs seamlessly. */+ diff?:+ | string+ | undefined;+ /**+ * The conflict schema when rebase has conflicts.+ * The conflict section is enclosed by the following.+ * <<<<< HEAD+ * ====+ * >>>>> main+ */+ conflictSchema?: string | undefined;+}+export interface DiffMetadataRequest {/** The metadata of the source schema. */sourceMetadata:@@ -1476,6 +1498,154 @@ export const DeleteBranchRequest = {},};+function createBaseDiffDatabaseRequest(): DiffDatabaseRequest {+ return { name: "", database: "" };+}++export const DiffDatabaseRequest = {+ encode(message: DiffDatabaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.database !== "") {+ writer.uint32(18).string(message.database);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): DiffDatabaseRequest {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDiffDatabaseRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.database = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DiffDatabaseRequest {+ return {+ name: isSet(object.name) ? globalThis.String(object.name) : "",+ database: isSet(object.database) ? globalThis.String(object.database) : "",+ };+ },++ toJSON(message: DiffDatabaseRequest): unknown {+ const obj: any = {};+ if (message.name !== "") {+ obj.name = message.name;+ }+ if (message.database !== "") {+ obj.database = message.database;+ }+ return obj;+ },++ create(base?: DeepPartial<DiffDatabaseRequest>): DiffDatabaseRequest {+ return DiffDatabaseRequest.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<DiffDatabaseRequest>): DiffDatabaseRequest {+ const message = createBaseDiffDatabaseRequest();+ message.name = object.name ?? "";+ message.database = object.database ?? "";+ return message;+ },+};++function createBaseDiffDatabaseResponse(): DiffDatabaseResponse {+ return { diff: undefined, conflictSchema: undefined };+}++export const DiffDatabaseResponse = {+ encode(message: DiffDatabaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.diff !== undefined) {+ writer.uint32(10).string(message.diff);+ }+ if (message.conflictSchema !== undefined) {+ writer.uint32(18).string(message.conflictSchema);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): DiffDatabaseResponse {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDiffDatabaseResponse();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.diff = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.conflictSchema = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DiffDatabaseResponse {+ return {+ diff: isSet(object.diff) ? globalThis.String(object.diff) : undefined,+ conflictSchema: isSet(object.conflictSchema) ? globalThis.String(object.conflictSchema) : undefined,+ };+ },++ toJSON(message: DiffDatabaseResponse): unknown {+ const obj: any = {};+ if (message.diff !== undefined) {+ obj.diff = message.diff;+ }+ if (message.conflictSchema !== undefined) {+ obj.conflictSchema = message.conflictSchema;+ }+ return obj;+ },++ create(base?: DeepPartial<DiffDatabaseResponse>): DiffDatabaseResponse {+ return DiffDatabaseResponse.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<DiffDatabaseResponse>): DiffDatabaseResponse {+ const message = createBaseDiffDatabaseResponse();+ message.diff = object.diff ?? undefined;+ message.conflictSchema = object.conflictSchema ?? undefined;+ return message;+ },+};+function createBaseDiffMetadataRequest(): DiffMetadataRequest {return { sourceMetadata: undefined, targetMetadata: undefined, engine: 0 };}@@ -2024,6 +2194,78 @@ export const BranchServiceDefinition = {},},},+ /**+ * DiffDatabase works similar to branch rebase.+ * 1) set the base as the schema of a database;+ * 2) apply the changes between base and head of branch to the new base (schema of database);+ * 3) return the diff DDLs similar to DiffSchema in database service.+ * 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user+ * will call DiffSchema() in database service to get diff DDLs.+ */+ diffDatabase: {+ name: "DiffDatabase",+ requestType: DiffDatabaseRequest,+ requestStream: false,+ responseType: DiffDatabaseResponse,+ responseStream: false,+ options: {+ _unknownFields: {+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],+ 578365826: [+ new Uint8Array([+ 47,+ 34,+ 45,+ 47,+ 118,+ 49,+ 47,+ 123,+ 110,+ 97,+ 109,+ 101,+ 61,+ 112,+ 114,+ 111,+ 106,+ 101,+ 99,+ 116,+ 115,+ 47,+ 42,+ 47,+ 98,+ 114,+ 97,+ 110,+ 99,+ 104,+ 101,+ 115,+ 47,+ 42,+ 125,+ 58,+ 100,+ 105,+ 102,+ 102,+ 68,+ 97,+ 116,+ 97,+ 98,+ 97,+ 115,+ 101,+ ]),+ ],+ },+ },+ },diffMetadata: {name: "DiffMetadata",requestType: DiffMetadataRequest,diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex e7713ddcde..2b90c131d0 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -187,6 +187,8 @@- [Branch](#bytebase-v1-Branch)- [CreateBranchRequest](#bytebase-v1-CreateBranchRequest)- [DeleteBranchRequest](#bytebase-v1-DeleteBranchRequest)+ - [DiffDatabaseRequest](#bytebase-v1-DiffDatabaseRequest)+ - [DiffDatabaseResponse](#bytebase-v1-DiffDatabaseResponse)- [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)- [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)- [GetBranchRequest](#bytebase-v1-GetBranchRequest)@@ -3475,6 +3477,38 @@ The type of the backup.+<a name="bytebase-v1-DiffDatabaseRequest"></a>++### DiffDatabaseRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of branch. |+| database | [string](#string) | | The name of the databsae to merge the branch to. |+++++++<a name="bytebase-v1-DiffDatabaseResponse"></a>++### DiffDatabaseResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| diff | [string](#string) | | The schema diff when merge occurs seamlessly. |+| conflict_schema | [string](#string) | | The conflict schema when rebase has conflicts. The conflict section is enclosed by the following. <<<<< HEAD ==== >>>>> main |++++++<a name="bytebase-v1-DiffMetadataRequest"></a>### DiffMetadataRequest@@ -3682,6 +3716,7 @@ The branch's `name` field is used to identify the branch to update. Format:| MergeBranch | [MergeBranchRequest](#bytebase-v1-MergeBranchRequest) | [MergeBranchResponse](#bytebase-v1-MergeBranchResponse) | || RebaseBranch | [RebaseBranchRequest](#bytebase-v1-RebaseBranchRequest) | [RebaseBranchResponse](#bytebase-v1-RebaseBranchResponse) | || DeleteBranch | [DeleteBranchRequest](#bytebase-v1-DeleteBranchRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |+| DiffDatabase | [DiffDatabaseRequest](#bytebase-v1-DiffDatabaseRequest) | [DiffDatabaseResponse](#bytebase-v1-DiffDatabaseResponse) | DiffDatabase works similar to branch rebase. 1) set the base as the schema of a database; 2) apply the changes between base and head of branch to the new base (schema of database); 3) return the diff DDLs similar to DiffSchema in database service. 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user will call DiffSchema() in database service to get diff DDLs. || DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | |diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.goindex e8ce47a134..aad44403da 100644--- a/proto/generated-go/v1/branch_service.pb.go+++ b/proto/generated-go/v1/branch_service.pb.go@@ -1001,6 +1001,150 @@ func (x *DeleteBranchRequest) GetName() string {return ""}+type DiffDatabaseRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of branch.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The name of the databsae to merge the branch to.+ Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`+}++func (x *DiffDatabaseRequest) Reset() {+ *x = DiffDatabaseRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_branch_service_proto_msgTypes[11]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *DiffDatabaseRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DiffDatabaseRequest) ProtoMessage() {}++func (x *DiffDatabaseRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_branch_service_proto_msgTypes[11]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DiffDatabaseRequest.ProtoReflect.Descriptor instead.+func (*DiffDatabaseRequest) Descriptor() ([]byte, []int) {+ return file_v1_branch_service_proto_rawDescGZIP(), []int{11}+}++func (x *DiffDatabaseRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *DiffDatabaseRequest) GetDatabase() string {+ if x != nil {+ return x.Database+ }+ return ""+}++type DiffDatabaseResponse struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // Types that are assignable to Result:+ //+ // *DiffDatabaseResponse_Diff+ // *DiffDatabaseResponse_ConflictSchema+ Result isDiffDatabaseResponse_Result `protobuf_oneof:"result"`+}++func (x *DiffDatabaseResponse) Reset() {+ *x = DiffDatabaseResponse{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_branch_service_proto_msgTypes[12]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *DiffDatabaseResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DiffDatabaseResponse) ProtoMessage() {}++func (x *DiffDatabaseResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_branch_service_proto_msgTypes[12]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DiffDatabaseResponse.ProtoReflect.Descriptor instead.+func (*DiffDatabaseResponse) Descriptor() ([]byte, []int) {+ return file_v1_branch_service_proto_rawDescGZIP(), []int{12}+}++func (m *DiffDatabaseResponse) GetResult() isDiffDatabaseResponse_Result {+ if m != nil {+ return m.Result+ }+ return nil+}++func (x *DiffDatabaseResponse) GetDiff() string {+ if x, ok := x.GetResult().(*DiffDatabaseResponse_Diff); ok {+ return x.Diff+ }+ return ""+}++func (x *DiffDatabaseResponse) GetConflictSchema() string {+ if x, ok := x.GetResult().(*DiffDatabaseResponse_ConflictSchema); ok {+ return x.ConflictSchema+ }+ return ""+}++type isDiffDatabaseResponse_Result interface {+ isDiffDatabaseResponse_Result()+}++type DiffDatabaseResponse_Diff struct {+ // The schema diff when merge occurs seamlessly.+ Diff string `protobuf:"bytes,1,opt,name=diff,proto3,oneof"`+}++type DiffDatabaseResponse_ConflictSchema struct {+ // The conflict schema when rebase has conflicts.+ // The conflict section is enclosed by the following.+ // <<<<< HEAD+ // ====+ // >>>>> main+ ConflictSchema string `protobuf:"bytes,2,opt,name=conflict_schema,json=conflictSchema,proto3,oneof"`+}++func (*DiffDatabaseResponse_Diff) isDiffDatabaseResponse_Result() {}++func (*DiffDatabaseResponse_ConflictSchema) isDiffDatabaseResponse_Result() {}+type DiffMetadataRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -1017,7 +1161,7 @@ type DiffMetadataRequest struct {func (x *DiffMetadataRequest) Reset() {*x = DiffMetadataRequest{}if protoimpl.UnsafeEnabled {- mi := &file_v1_branch_service_proto_msgTypes[11]+ mi := &file_v1_branch_service_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1030,7 +1174,7 @@ func (x *DiffMetadataRequest) String() string {func (*DiffMetadataRequest) ProtoMessage() {}func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_branch_service_proto_msgTypes[11]+ mi := &file_v1_branch_service_proto_msgTypes[13]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1043,7 +1187,7 @@ func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {- return file_v1_branch_service_proto_rawDescGZIP(), []int{11}+ return file_v1_branch_service_proto_rawDescGZIP(), []int{13}}func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {@@ -1079,7 +1223,7 @@ type DiffMetadataResponse struct {func (x *DiffMetadataResponse) Reset() {*x = DiffMetadataResponse{}if protoimpl.UnsafeEnabled {- mi := &file_v1_branch_service_proto_msgTypes[12]+ mi := &file_v1_branch_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1092,7 +1236,7 @@ func (x *DiffMetadataResponse) String() string {func (*DiffMetadataResponse) ProtoMessage() {}func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_branch_service_proto_msgTypes[12]+ mi := &file_v1_branch_service_proto_msgTypes[14]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1105,7 +1249,7 @@ func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {- return file_v1_branch_service_proto_rawDescGZIP(), []int{12}+ return file_v1_branch_service_proto_rawDescGZIP(), []int{14}}func (x *DiffMetadataResponse) GetDiff() string {@@ -1257,98 +1401,118 @@ var file_v1_branch_service_proto_rawDesc = []byte{0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a,0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02,- 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x4d,- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b,- 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65,- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x75,- 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4b, 0x0a, 0x0f, 0x74,- 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02,- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64,- 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,- 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69,- 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65,- 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74,- 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,- 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x66,- 0x66, 0x2a, 0x56, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x56, 0x69, 0x65, 0x77, 0x12,- 0x1b, 0x0a, 0x17, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55,- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11,- 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x42, 0x41, 0x53, 0x49,- 0x43, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49,- 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0xb4, 0x08, 0x0a, 0x0d, 0x42, 0x72,- 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x47,- 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x2f, 0xda, 0x41,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31,- 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,- 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x80, 0x01,- 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x20,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,- 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,- 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,- 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,- 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20,- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a,- 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73,- 0x12, 0x85, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63,- 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x3e, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72,- 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28,- 0x3a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70,- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,- 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64,- 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72,- 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,- 0x22, 0x4c, 0xda, 0x41, 0x12, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x2c, 0x75, 0x70, 0x64, 0x61,- 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x06, 0x62,- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x62, 0x72, 0x61, 0x6e,- 0x63, 0x68, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,- 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x87,- 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1f,+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4a, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x44, 0x61,+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,+ 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20,+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x22, 0x61, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x69,+ 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66,+ 0x12, 0x29, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x5f, 0x73, 0x63, 0x68,+ 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e,+ 0x66, 0x6c, 0x69, 0x63, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x08, 0x0a, 0x06, 0x72,+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65,+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a,+ 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74,+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72,+ 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4b, 0x0a, 0x0f, 0x74, 0x61,+ 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,+ 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,+ 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d,+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e,+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e,+ 0x67, 0x69, 0x6e, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,+ 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04,+ 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66,+ 0x2a, 0x56, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x56, 0x69, 0x65, 0x77, 0x12, 0x1b,+ 0x0a, 0x17, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e,+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x42,+ 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43,+ 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45,+ 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0xc8, 0x09, 0x0a, 0x0d, 0x42, 0x72, 0x61,+ 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x47, 0x65,+ 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x2f, 0xda, 0x41, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,+ 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x80, 0x01, 0x0a,+ 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x20, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,+ 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,+ 0x73, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,+ 0x73, 0x65, 0x22, 0x2b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f,+ 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12,+ 0x85, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,+ 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43,+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,+ 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x3e, 0xda, 0x41, 0x0d, 0x70, 0x61, 0x72, 0x65,+ 0x6e, 0x74, 0x2c, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a,+ 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61,+ 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d,+ 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x93, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61,+ 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x72, 0x61,+ 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22,+ 0x4c, 0xda, 0x41, 0x12, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74,+ 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x06, 0x62, 0x72,+ 0x61, 0x6e, 0x63, 0x68, 0x32, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x62, 0x72, 0x61, 0x6e, 0x63,+ 0x68, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,+ 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x87, 0x01,+ 0x0a, 0x0b, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1f, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67,+ 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20,0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72,- 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65,- 0x72, 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x22, 0x35, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28,- 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,- 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f,- 0x2a, 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72,- 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36,- 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,- 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,- 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,- 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63,- 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,- 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a,- 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,+ 0x67, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x22, 0x35, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22,+ 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a,- 0x7d, 0x12, 0x7d, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,- 0x61, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,+ 0x7d, 0x3a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42, 0x72, 0x61,+ 0x6e, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x62, 0x61, 0x73, 0x65, 0x42,+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0xda,+ 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,+ 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42,+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,+ 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20,+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,+ 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d,+ 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,+ 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x44, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75,0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65,- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01,- 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73,- 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,- 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f,- 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65,+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,+ 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x72, 0x61, 0x6e,+ 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61,+ 0x62, 0x61, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61,+ 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,+ 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,+ 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64,+ 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,+ 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -1364,7 +1528,7 @@ func file_v1_branch_service_proto_rawDescGZIP() []byte {}var file_v1_branch_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_v1_branch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 13)+var file_v1_branch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15)var file_v1_branch_service_proto_goTypes = []interface{}{(BranchView)(0), // 0: bytebase.v1.BranchView(*Branch)(nil), // 1: bytebase.v1.Branch@@ -1378,30 +1542,32 @@ var file_v1_branch_service_proto_goTypes = []interface{}{(*RebaseBranchRequest)(nil), // 9: bytebase.v1.RebaseBranchRequest(*RebaseBranchResponse)(nil), // 10: bytebase.v1.RebaseBranchResponse(*DeleteBranchRequest)(nil), // 11: bytebase.v1.DeleteBranchRequest- (*DiffMetadataRequest)(nil), // 12: bytebase.v1.DiffMetadataRequest- (*DiffMetadataResponse)(nil), // 13: bytebase.v1.DiffMetadataResponse- (*DatabaseMetadata)(nil), // 14: bytebase.v1.DatabaseMetadata- (Engine)(0), // 15: bytebase.v1.Engine- (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp- (*fieldmaskpb.FieldMask)(nil), // 17: google.protobuf.FieldMask- (*emptypb.Empty)(nil), // 18: google.protobuf.Empty+ (*DiffDatabaseRequest)(nil), // 12: bytebase.v1.DiffDatabaseRequest+ (*DiffDatabaseResponse)(nil), // 13: bytebase.v1.DiffDatabaseResponse+ (*DiffMetadataRequest)(nil), // 14: bytebase.v1.DiffMetadataRequest+ (*DiffMetadataResponse)(nil), // 15: bytebase.v1.DiffMetadataResponse+ (*DatabaseMetadata)(nil), // 16: bytebase.v1.DatabaseMetadata+ (Engine)(0), // 17: bytebase.v1.Engine+ (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp+ (*fieldmaskpb.FieldMask)(nil), // 19: google.protobuf.FieldMask+ (*emptypb.Empty)(nil), // 20: google.protobuf.Empty}var file_v1_branch_service_proto_depIdxs = []int32{- 14, // 0: bytebase.v1.Branch.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata- 14, // 1: bytebase.v1.Branch.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata- 15, // 2: bytebase.v1.Branch.engine:type_name -> bytebase.v1.Engine- 16, // 3: bytebase.v1.Branch.create_time:type_name -> google.protobuf.Timestamp- 16, // 4: bytebase.v1.Branch.update_time:type_name -> google.protobuf.Timestamp+ 16, // 0: bytebase.v1.Branch.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 16, // 1: bytebase.v1.Branch.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 17, // 2: bytebase.v1.Branch.engine:type_name -> bytebase.v1.Engine+ 18, // 3: bytebase.v1.Branch.create_time:type_name -> google.protobuf.Timestamp+ 18, // 4: bytebase.v1.Branch.update_time:type_name -> google.protobuf.Timestamp0, // 5: bytebase.v1.ListBranchesRequest.view:type_name -> bytebase.v1.BranchView1, // 6: bytebase.v1.ListBranchesResponse.branches:type_name -> bytebase.v1.Branch1, // 7: bytebase.v1.CreateBranchRequest.branch:type_name -> bytebase.v1.Branch1, // 8: bytebase.v1.UpdateBranchRequest.branch:type_name -> bytebase.v1.Branch- 17, // 9: bytebase.v1.UpdateBranchRequest.update_mask:type_name -> google.protobuf.FieldMask+ 19, // 9: bytebase.v1.UpdateBranchRequest.update_mask:type_name -> google.protobuf.FieldMask1, // 10: bytebase.v1.MergeBranchResponse.branch:type_name -> bytebase.v1.Branch1, // 11: bytebase.v1.RebaseBranchResponse.branch:type_name -> bytebase.v1.Branch- 14, // 12: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata- 14, // 13: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata- 15, // 14: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine+ 16, // 12: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 16, // 13: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 17, // 14: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine2, // 15: bytebase.v1.BranchService.GetBranch:input_type -> bytebase.v1.GetBranchRequest3, // 16: bytebase.v1.BranchService.ListBranches:input_type -> bytebase.v1.ListBranchesRequest5, // 17: bytebase.v1.BranchService.CreateBranch:input_type -> bytebase.v1.CreateBranchRequest@@ -1409,17 +1575,19 @@ var file_v1_branch_service_proto_depIdxs = []int32{7, // 19: bytebase.v1.BranchService.MergeBranch:input_type -> bytebase.v1.MergeBranchRequest9, // 20: bytebase.v1.BranchService.RebaseBranch:input_type -> bytebase.v1.RebaseBranchRequest11, // 21: bytebase.v1.BranchService.DeleteBranch:input_type -> bytebase.v1.DeleteBranchRequest- 12, // 22: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest- 1, // 23: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch- 4, // 24: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse- 1, // 25: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch- 1, // 26: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch- 8, // 27: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.MergeBranchResponse- 10, // 28: bytebase.v1.BranchService.RebaseBranch:output_type -> bytebase.v1.RebaseBranchResponse- 18, // 29: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty- 13, // 30: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse- 23, // [23:31] is the sub-list for method output_type- 15, // [15:23] is the sub-list for method input_type+ 12, // 22: bytebase.v1.BranchService.DiffDatabase:input_type -> bytebase.v1.DiffDatabaseRequest+ 14, // 23: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest+ 1, // 24: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch+ 4, // 25: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse+ 1, // 26: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch+ 1, // 27: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch+ 8, // 28: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.MergeBranchResponse+ 10, // 29: bytebase.v1.BranchService.RebaseBranch:output_type -> bytebase.v1.RebaseBranchResponse+ 20, // 30: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty+ 13, // 31: bytebase.v1.BranchService.DiffDatabase:output_type -> bytebase.v1.DiffDatabaseResponse+ 15, // 32: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse+ 24, // [24:33] is the sub-list for method output_type+ 15, // [15:24] is the sub-list for method input_type15, // [15:15] is the sub-list for extension type_name15, // [15:15] is the sub-list for extension extendee0, // [0:15] is the sub-list for field type_name@@ -1566,7 +1734,7 @@ func file_v1_branch_service_proto_init() {}}file_v1_branch_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*DiffMetadataRequest); i {+ switch v := v.(*DiffDatabaseRequest); i {case 0:return &v.statecase 1:@@ -1578,6 +1746,30 @@ func file_v1_branch_service_proto_init() {}}file_v1_branch_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DiffDatabaseResponse); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_branch_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DiffMetadataRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_branch_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {switch v := v.(*DiffMetadataResponse); i {case 0:return &v.state@@ -1598,13 +1790,17 @@ func file_v1_branch_service_proto_init() {(*RebaseBranchResponse_Branch)(nil),(*RebaseBranchResponse_ConflictSchema)(nil),}+ file_v1_branch_service_proto_msgTypes[12].OneofWrappers = []interface{}{+ (*DiffDatabaseResponse_Diff)(nil),+ (*DiffDatabaseResponse_ConflictSchema)(nil),+ }type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_branch_service_proto_rawDesc,NumEnums: 1,- NumMessages: 13,+ NumMessages: 15,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/branch_service.pb.gw.go b/proto/generated-go/v1/branch_service.pb.gw.goindex feb8f2dcd5..0a1ab923af 100644--- a/proto/generated-go/v1/branch_service.pb.gw.go+++ b/proto/generated-go/v1/branch_service.pb.gw.go@@ -531,6 +531,76 @@ func local_request_BranchService_DeleteBranch_0(ctx context.Context, marshaler r}+var (+ filter_BranchService_DiffDatabase_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}+)++func request_BranchService_DiffDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq DiffDatabaseRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_DiffDatabase_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := client.DiffDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_BranchService_DiffDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq DiffDatabaseRequest+ var metadata runtime.ServerMetadata++ var (+ val string+ ok bool+ err error+ _ = err+ )++ val, ok = pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }++ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_DiffDatabase_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := server.DiffDatabase(ctx, &protoReq)+ return msg, metadata, err++}+func request_BranchService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var protoReq DiffMetadataRequestvar metadata runtime.ServerMetadata@@ -746,6 +816,31 @@ func RegisterBranchServiceHandlerServer(ctx context.Context, mux *runtime.ServeM})+ mux.Handle("POST", pattern_BranchService_DiffDatabase_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)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/DiffDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:diffDatabase"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_BranchService_DiffDatabase_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_BranchService_DiffDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+mux.Handle("POST", pattern_BranchService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -966,6 +1061,28 @@ func RegisterBranchServiceHandlerClient(ctx context.Context, mux *runtime.ServeM})+ mux.Handle("POST", pattern_BranchService_DiffDatabase_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)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/DiffDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:diffDatabase"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_BranchService_DiffDatabase_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_BranchService_DiffDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+mux.Handle("POST", pattern_BranchService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -1006,6 +1123,8 @@ var (pattern_BranchService_DeleteBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, ""))+ pattern_BranchService_DiffDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, "diffDatabase"))+pattern_BranchService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata")))@@ -1024,5 +1143,7 @@ var (forward_BranchService_DeleteBranch_0 = runtime.ForwardResponseMessage+ forward_BranchService_DiffDatabase_0 = runtime.ForwardResponseMessage+forward_BranchService_DiffMetadata_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/branch_service_grpc.pb.go b/proto/generated-go/v1/branch_service_grpc.pb.goindex b7776a61eb..37a4e2e041 100644--- a/proto/generated-go/v1/branch_service_grpc.pb.go+++ b/proto/generated-go/v1/branch_service_grpc.pb.go@@ -27,6 +27,7 @@ const (BranchService_MergeBranch_FullMethodName = "/bytebase.v1.BranchService/MergeBranch"BranchService_RebaseBranch_FullMethodName = "/bytebase.v1.BranchService/RebaseBranch"BranchService_DeleteBranch_FullMethodName = "/bytebase.v1.BranchService/DeleteBranch"+ BranchService_DiffDatabase_FullMethodName = "/bytebase.v1.BranchService/DiffDatabase"BranchService_DiffMetadata_FullMethodName = "/bytebase.v1.BranchService/DiffMetadata")@@ -41,6 +42,13 @@ type BranchServiceClient interface {MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*MergeBranchResponse, error)RebaseBranch(ctx context.Context, in *RebaseBranchRequest, opts ...grpc.CallOption) (*RebaseBranchResponse, error)DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)+ // DiffDatabase works similar to branch rebase.+ // 1) set the base as the schema of a database;+ // 2) apply the changes between base and head of branch to the new base (schema of database);+ // 3) return the diff DDLs similar to DiffSchema in database service.+ // 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user+ // will call DiffSchema() in database service to get diff DDLs.+ DiffDatabase(ctx context.Context, in *DiffDatabaseRequest, opts ...grpc.CallOption) (*DiffDatabaseResponse, error)DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)}@@ -115,6 +123,15 @@ func (c *branchServiceClient) DeleteBranch(ctx context.Context, in *DeleteBranchreturn out, nil}+func (c *branchServiceClient) DiffDatabase(ctx context.Context, in *DiffDatabaseRequest, opts ...grpc.CallOption) (*DiffDatabaseResponse, error) {+ out := new(DiffDatabaseResponse)+ err := c.cc.Invoke(ctx, BranchService_DiffDatabase_FullMethodName, in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+func (c *branchServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {out := new(DiffMetadataResponse)err := c.cc.Invoke(ctx, BranchService_DiffMetadata_FullMethodName, in, out, opts...)@@ -135,6 +152,13 @@ type BranchServiceServer interface {MergeBranch(context.Context, *MergeBranchRequest) (*MergeBranchResponse, error)RebaseBranch(context.Context, *RebaseBranchRequest) (*RebaseBranchResponse, error)DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error)+ // DiffDatabase works similar to branch rebase.+ // 1) set the base as the schema of a database;+ // 2) apply the changes between base and head of branch to the new base (schema of database);+ // 3) return the diff DDLs similar to DiffSchema in database service.+ // 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user+ // will call DiffSchema() in database service to get diff DDLs.+ DiffDatabase(context.Context, *DiffDatabaseRequest) (*DiffDatabaseResponse, error)DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)mustEmbedUnimplementedBranchServiceServer()}@@ -164,6 +188,9 @@ func (UnimplementedBranchServiceServer) RebaseBranch(context.Context, *RebaseBrafunc (UnimplementedBranchServiceServer) DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error) {return nil, status.Errorf(codes.Unimplemented, "method DeleteBranch not implemented")}+func (UnimplementedBranchServiceServer) DiffDatabase(context.Context, *DiffDatabaseRequest) (*DiffDatabaseResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method DiffDatabase not implemented")+}func (UnimplementedBranchServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method DiffMetadata not implemented")}@@ -306,6 +333,24 @@ func _BranchService_DeleteBranch_Handler(srv interface{}, ctx context.Context, dreturn interceptor(ctx, in, info, handler)}+func _BranchService_DiffDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(DiffDatabaseRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(BranchServiceServer).DiffDatabase(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: BranchService_DiffDatabase_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(BranchServiceServer).DiffDatabase(ctx, req.(*DiffDatabaseRequest))+ }+ return interceptor(ctx, in, info, handler)+}+func _BranchService_DiffMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(DiffMetadataRequest)if err := dec(in); err != nil {@@ -359,6 +404,10 @@ var BranchService_ServiceDesc = grpc.ServiceDesc{MethodName: "DeleteBranch",Handler: _BranchService_DeleteBranch_Handler,},+ {+ MethodName: "DiffDatabase",+ Handler: _BranchService_DiffDatabase_Handler,+ },{MethodName: "DiffMetadata",Handler: _BranchService_DiffMetadata_Handler,diff --git a/proto/v1/branch_service.proto b/proto/v1/branch_service.protoindex 744d47e4c6..a5f715bc9b 100644--- a/proto/v1/branch_service.proto+++ b/proto/v1/branch_service.proto@@ -55,6 +55,17 @@ service BranchService {option (google.api.method_signature) = "name";}+ // DiffDatabase works similar to branch rebase.+ // 1) set the base as the schema of a database;+ // 2) apply the changes between base and head of branch to the new base (schema of database);+ // 3) return the diff DDLs similar to DiffSchema in database service.+ // 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user+ // will call DiffSchema() in database service to get diff DDLs.+ rpc DiffDatabase(DiffDatabaseRequest) returns (DiffDatabaseResponse) {+ option (google.api.http) = {post: "/v1/{name=projects/*/branches/*}:diffDatabase"};+ option (google.api.method_signature) = "name";+ }+rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {option (google.api.http) = {post: "/v1/schemaDesign:diffMetadata"@@ -277,6 +288,27 @@ message DeleteBranchRequest {string name = 1 [(google.api.field_behavior) = REQUIRED];}+message DiffDatabaseRequest {+ // The name of branch.+ string name = 1;++ // The name of the databsae to merge the branch to.+ string database = 2 [(google.api.field_behavior) = REQUIRED];+}++message DiffDatabaseResponse {+ oneof result {+ // The schema diff when merge occurs seamlessly.+ string diff = 1;+ // The conflict schema when rebase has conflicts.+ // The conflict section is enclosed by the following.+ // <<<<< HEAD+ // ====+ // >>>>> main+ string conflict_schema = 2;+ }+}+message DiffMetadataRequest {// The metadata of the source schema.DatabaseMetadata source_metadata = 1 [(google.api.field_behavior) = REQUIRED];