Skip to content

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

chore: introduce rollout service proto (#6066)

Danny Xu90e80bc3b11b
diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.ts
new file mode 100644
index 0000000000..84c6bf7dc5
--- /dev/null
+++ b/frontend/src/types/proto/v1/rollout_service.ts
@@ -0,0 +1,779 @@
+/* eslint-disable */
+import type { CallContext, CallOptions } from "nice-grpc-common";
+import * as _m0 from "protobufjs/minimal";
+import { FieldMask } from "../google/protobuf/field_mask";
+
+export const protobufPackage = "bytebase.v1";
+
+export interface GetPlanRequest {
+ /**
+ * The name of the plan to retrieve.
+ * Format: projects/{project}/plans/{plan}
+ */
+ name: string;
+}
+
+export interface ListPlansRequest {
+ /**
+ * The parent, which owns this collection of plans.
+ * Format: projects/{project}
+ * Use "projects/-" to list all plans from all projects.
+ */
+ parent: string;
+ /**
+ * The maximum number of plans to return. The service may return fewer than
+ * this value.
+ * If unspecified, at most 50 plans will be returned.
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
+ */
+ pageSize: number;
+ /**
+ * A page token, received from a previous `ListPlans` call.
+ * Provide this to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided to `ListPlans` must match
+ * the call that provided the page token.
+ */
+ pageToken: string;
+}
+
+export interface ListPlansResponse {
+ /** The plans from the specified request. */
+ plans: Plan[];
+ /**
+ * A token, which can be sent as `page_token` to retrieve the next page.
+ * If this field is omitted, there are no subsequent pages.
+ */
+ nextPageToken: string;
+}
+
+export interface CreatePlanRequest {
+ /**
+ * The parent project where this plan will be created.
+ * Format: projects/{project}
+ */
+ parent: string;
+ /** The plan to create. */
+ plan?: Plan;
+}
+
+export interface UpdatePlanRequest {
+ /**
+ * The plan to update.
+ *
+ * The plan's `name` field is used to identify the plan to update.
+ * Format: projects/{project}/plans/{plan}
+ */
+ plan?: Plan;
+ /** The list of fields to update. */
+ updateMask?: string[];
+}
+
+export interface Plan {
+ /**
+ * The name of the plan.
+ * `plan` is a system generated ID.
+ * Format: projects/{project}/plans/{plan}
+ */
+ name: string;
+ /** The system-assigned, unique identifier for a resource. */
+ uid: string;
+ title: string;
+ description: string;
+}
+
+function createBaseGetPlanRequest(): GetPlanRequest {
+ return { name: "" };
+}
+
+export const GetPlanRequest = {
+ encode(message: GetPlanRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetPlanRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGetPlanRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.name = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GetPlanRequest {
+ return { name: isSet(object.name) ? String(object.name) : "" };
+ },
+
+ toJSON(message: GetPlanRequest): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ return obj;
+ },
+
+ create(base?: DeepPartial<GetPlanRequest>): GetPlanRequest {
+ return GetPlanRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<GetPlanRequest>): GetPlanRequest {
+ const message = createBaseGetPlanRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+function createBaseListPlansRequest(): ListPlansRequest {
+ return { parent: "", pageSize: 0, pageToken: "" };
+}
+
+export const ListPlansRequest = {
+ encode(message: ListPlansRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.pageSize !== 0) {
+ writer.uint32(16).int32(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ writer.uint32(26).string(message.pageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListPlansRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListPlansRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.parent = reader.string();
+ continue;
+ case 2:
+ if (tag !== 16) {
+ break;
+ }
+
+ message.pageSize = reader.int32();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.pageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListPlansRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ };
+ },
+
+ toJSON(message: ListPlansRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListPlansRequest>): ListPlansRequest {
+ return ListPlansRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListPlansRequest>): ListPlansRequest {
+ const message = createBaseListPlansRequest();
+ message.parent = object.parent ?? "";
+ message.pageSize = object.pageSize ?? 0;
+ message.pageToken = object.pageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseListPlansResponse(): ListPlansResponse {
+ return { plans: [], nextPageToken: "" };
+}
+
+export const ListPlansResponse = {
+ encode(message: ListPlansResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.plans) {
+ Plan.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.nextPageToken !== "") {
+ writer.uint32(18).string(message.nextPageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListPlansResponse {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListPlansResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.plans.push(Plan.decode(reader, reader.uint32()));
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.nextPageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListPlansResponse {
+ return {
+ plans: Array.isArray(object?.plans) ? object.plans.map((e: any) => Plan.fromJSON(e)) : [],
+ nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ };
+ },
+
+ toJSON(message: ListPlansResponse): unknown {
+ const obj: any = {};
+ if (message.plans) {
+ obj.plans = message.plans.map((e) => e ? Plan.toJSON(e) : undefined);
+ } else {
+ obj.plans = [];
+ }
+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListPlansResponse>): ListPlansResponse {
+ return ListPlansResponse.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListPlansResponse>): ListPlansResponse {
+ const message = createBaseListPlansResponse();
+ message.plans = object.plans?.map((e) => Plan.fromPartial(e)) || [];
+ message.nextPageToken = object.nextPageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseCreatePlanRequest(): CreatePlanRequest {
+ return { parent: "", plan: undefined };
+}
+
+export const CreatePlanRequest = {
+ encode(message: CreatePlanRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.plan !== undefined) {
+ Plan.encode(message.plan, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): CreatePlanRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCreatePlanRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.parent = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.plan = Plan.decode(reader, reader.uint32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CreatePlanRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined,
+ };
+ },
+
+ toJSON(message: CreatePlanRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);
+ return obj;
+ },
+
+ create(base?: DeepPartial<CreatePlanRequest>): CreatePlanRequest {
+ return CreatePlanRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<CreatePlanRequest>): CreatePlanRequest {
+ const message = createBaseCreatePlanRequest();
+ message.parent = object.parent ?? "";
+ message.plan = (object.plan !== undefined && object.plan !== null) ? Plan.fromPartial(object.plan) : undefined;
+ return message;
+ },
+};
+
+function createBaseUpdatePlanRequest(): UpdatePlanRequest {
+ return { plan: undefined, updateMask: undefined };
+}
+
+export const UpdatePlanRequest = {
+ encode(message: UpdatePlanRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.plan !== undefined) {
+ Plan.encode(message.plan, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.updateMask !== undefined) {
+ FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdatePlanRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseUpdatePlanRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.plan = Plan.decode(reader, reader.uint32());
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32()));
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): UpdatePlanRequest {
+ return {
+ plan: isSet(object.plan) ? Plan.fromJSON(object.plan) : undefined,
+ updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
+ };
+ },
+
+ toJSON(message: UpdatePlanRequest): unknown {
+ const obj: any = {};
+ message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);
+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ return obj;
+ },
+
+ create(base?: DeepPartial<UpdatePlanRequest>): UpdatePlanRequest {
+ return UpdatePlanRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<UpdatePlanRequest>): UpdatePlanRequest {
+ const message = createBaseUpdatePlanRequest();
+ message.plan = (object.plan !== undefined && object.plan !== null) ? Plan.fromPartial(object.plan) : undefined;
+ message.updateMask = object.updateMask ?? undefined;
+ return message;
+ },
+};
+
+function createBasePlan(): Plan {
+ return { name: "", uid: "", title: "", description: "" };
+}
+
+export const Plan = {
+ encode(message: Plan, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.uid !== "") {
+ writer.uint32(18).string(message.uid);
+ }
+ if (message.title !== "") {
+ writer.uint32(26).string(message.title);
+ }
+ if (message.description !== "") {
+ writer.uint32(34).string(message.description);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Plan {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBasePlan();
+ 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.uid = reader.string();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.title = reader.string();
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.description = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Plan {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ uid: isSet(object.uid) ? String(object.uid) : "",
+ title: isSet(object.title) ? String(object.title) : "",
+ description: isSet(object.description) ? String(object.description) : "",
+ };
+ },
+
+ toJSON(message: Plan): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ message.uid !== undefined && (obj.uid = message.uid);
+ message.title !== undefined && (obj.title = message.title);
+ message.description !== undefined && (obj.description = message.description);
+ return obj;
+ },
+
+ create(base?: DeepPartial<Plan>): Plan {
+ return Plan.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<Plan>): Plan {
+ const message = createBasePlan();
+ message.name = object.name ?? "";
+ message.uid = object.uid ?? "";
+ message.title = object.title ?? "";
+ message.description = object.description ?? "";
+ return message;
+ },
+};
+
+export type RolloutServiceDefinition = typeof RolloutServiceDefinition;
+export const RolloutServiceDefinition = {
+ name: "RolloutService",
+ fullName: "bytebase.v1.RolloutService",
+ methods: {
+ getPlan: {
+ name: "GetPlan",
+ requestType: GetPlanRequest,
+ requestStream: false,
+ responseType: Plan,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],
+ 578365826: [
+ new Uint8Array([
+ 31,
+ 18,
+ 29,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 47,
+ 112,
+ 108,
+ 97,
+ 110,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ listPlans: {
+ name: "ListPlans",
+ requestType: ListPlansRequest,
+ requestStream: false,
+ responseType: ListPlansResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([6, 112, 97, 114, 101, 110, 116])],
+ 578365826: [
+ new Uint8Array([
+ 31,
+ 18,
+ 29,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 112,
+ 108,
+ 97,
+ 110,
+ 115,
+ ]),
+ ],
+ },
+ },
+ },
+ createPlan: {
+ name: "CreatePlan",
+ requestType: CreatePlanRequest,
+ requestStream: false,
+ responseType: Plan,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([0])],
+ 578365826: [
+ new Uint8Array([
+ 37,
+ 58,
+ 4,
+ 112,
+ 108,
+ 97,
+ 110,
+ 34,
+ 29,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 112,
+ 108,
+ 97,
+ 110,
+ 115,
+ ]),
+ ],
+ },
+ },
+ },
+ updatePlan: {
+ name: "UpdatePlan",
+ requestType: UpdatePlanRequest,
+ requestStream: false,
+ responseType: Plan,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([16, 112, 108, 97, 110, 44, 117, 112, 100, 97, 116, 101, 95, 109, 97, 115, 107])],
+ 578365826: [
+ new Uint8Array([
+ 42,
+ 58,
+ 4,
+ 112,
+ 108,
+ 97,
+ 110,
+ 50,
+ 34,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 108,
+ 97,
+ 110,
+ 46,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 47,
+ 112,
+ 108,
+ 97,
+ 110,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ },
+} as const;
+
+export interface RolloutServiceImplementation<CallContextExt = {}> {
+ getPlan(request: GetPlanRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Plan>>;
+ listPlans(request: ListPlansRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ListPlansResponse>>;
+ createPlan(request: CreatePlanRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Plan>>;
+ updatePlan(request: UpdatePlanRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Plan>>;
+}
+
+export interface RolloutServiceClient<CallOptionsExt = {}> {
+ getPlan(request: DeepPartial<GetPlanRequest>, options?: CallOptions & CallOptionsExt): Promise<Plan>;
+ listPlans(request: DeepPartial<ListPlansRequest>, options?: CallOptions & CallOptionsExt): Promise<ListPlansResponse>;
+ createPlan(request: DeepPartial<CreatePlanRequest>, options?: CallOptions & CallOptionsExt): Promise<Plan>;
+ updatePlan(request: DeepPartial<UpdatePlanRequest>, options?: CallOptions & CallOptionsExt): Promise<Plan>;
+}
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index e2658d4047..a4c73b5b51 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -325,6 +325,16 @@
- [RoleService](#bytebase-v1-RoleService)
+- [v1/rollout_service.proto](#v1_rollout_service-proto)
+ - [CreatePlanRequest](#bytebase-v1-CreatePlanRequest)
+ - [GetPlanRequest](#bytebase-v1-GetPlanRequest)
+ - [ListPlansRequest](#bytebase-v1-ListPlansRequest)
+ - [ListPlansResponse](#bytebase-v1-ListPlansResponse)
+ - [Plan](#bytebase-v1-Plan)
+ - [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest)
+
+ - [RolloutService](#bytebase-v1-RolloutService)
+
- [v1/setting_service.proto](#v1_setting_service-proto)
- [GetSettingRequest](#bytebase-v1-GetSettingRequest)
- [GetSettingResponse](#bytebase-v1-GetSettingResponse)
@@ -4998,6 +5008,137 @@ When paginating, all other parameters provided to `ListRoles` must match the cal
+<a name="v1_rollout_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/rollout_service.proto
+
+
+
+<a name="bytebase-v1-CreatePlanRequest"></a>
+
+### CreatePlanRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent project where this plan will be created. Format: projects/{project} |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to create. |
+
+
+
+
+
+
+<a name="bytebase-v1-GetPlanRequest"></a>
+
+### GetPlanRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the plan to retrieve. Format: projects/{project}/plans/{plan} |
+
+
+
+
+
+
+<a name="bytebase-v1-ListPlansRequest"></a>
+
+### ListPlansRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent, which owns this collection of plans. Format: projects/{project} Use &#34;projects/-&#34; to list all plans from all projects. |
+| page_size | [int32](#int32) | | The maximum number of plans to return. The service may return fewer than this value. If unspecified, at most 50 plans will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListPlans` call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListPlans` must match the call that provided the page token. |
+
+
+
+
+
+
+<a name="bytebase-v1-ListPlansResponse"></a>
+
+### ListPlansResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| plans | [Plan](#bytebase-v1-Plan) | repeated | The plans from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+
+
+
+
+
+
+<a name="bytebase-v1-Plan"></a>
+
+### Plan
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the plan. `plan` is a system generated ID. Format: projects/{project}/plans/{plan} |
+| uid | [string](#string) | | The system-assigned, unique identifier for a resource. |
+| title | [string](#string) | | |
+| description | [string](#string) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdatePlanRequest"></a>
+
+### UpdatePlanRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| plan | [Plan](#bytebase-v1-Plan) | | The plan to update.
+
+The plan&#39;s `name` field is used to identify the plan to update. Format: projects/{project}/plans/{plan} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+
+
+
+
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-RolloutService"></a>
+
+### RolloutService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetPlan | [GetPlanRequest](#bytebase-v1-GetPlanRequest) | [Plan](#bytebase-v1-Plan) | |
+| ListPlans | [ListPlansRequest](#bytebase-v1-ListPlansRequest) | [ListPlansResponse](#bytebase-v1-ListPlansResponse) | |
+| CreatePlan | [CreatePlanRequest](#bytebase-v1-CreatePlanRequest) | [Plan](#bytebase-v1-Plan) | |
+| UpdatePlan | [UpdatePlanRequest](#bytebase-v1-UpdatePlanRequest) | [Plan](#bytebase-v1-Plan) | |
+
+
+
+
+
<a name="v1_setting_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/generated-go/v1/rollout_service.pb.go b/proto/generated-go/v1/rollout_service.pb.go
new file mode 100644
index 0000000000..cd74425932
--- /dev/null
+++ b/proto/generated-go/v1/rollout_service.pb.go
@@ -0,0 +1,624 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc (unknown)
+// source: v1/rollout_service.proto
+
+package v1
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GetPlanRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the plan to retrieve.
+ // Format: projects/{project}/plans/{plan}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetPlanRequest) Reset() {
+ *x = GetPlanRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_rollout_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetPlanRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetPlanRequest) ProtoMessage() {}
+
+func (x *GetPlanRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_rollout_service_proto_msgTypes[0]
+ 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 GetPlanRequest.ProtoReflect.Descriptor instead.
+func (*GetPlanRequest) Descriptor() ([]byte, []int) {
+ return file_v1_rollout_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetPlanRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type ListPlansRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent, which owns this collection of plans.
+ // Format: projects/{project}
+ // Use "projects/-" to list all plans from all projects.
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The maximum number of plans to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 plans will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // A page token, received from a previous `ListPlans` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListPlans` must match
+ // the call that provided the page token.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+}
+
+func (x *ListPlansRequest) Reset() {
+ *x = ListPlansRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_rollout_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPlansRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPlansRequest) ProtoMessage() {}
+
+func (x *ListPlansRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_rollout_service_proto_msgTypes[1]
+ 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 ListPlansRequest.ProtoReflect.Descriptor instead.
+func (*ListPlansRequest) Descriptor() ([]byte, []int) {
+ return file_v1_rollout_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListPlansRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListPlansRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListPlansRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+type ListPlansResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The plans from the specified request.
+ Plans []*Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans,omitempty"`
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListPlansResponse) Reset() {
+ *x = ListPlansResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_rollout_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPlansResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPlansResponse) ProtoMessage() {}
+
+func (x *ListPlansResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_rollout_service_proto_msgTypes[2]
+ 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 ListPlansResponse.ProtoReflect.Descriptor instead.
+func (*ListPlansResponse) Descriptor() ([]byte, []int) {
+ return file_v1_rollout_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListPlansResponse) GetPlans() []*Plan {
+ if x != nil {
+ return x.Plans
+ }
+ return nil
+}
+
+func (x *ListPlansResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreatePlanRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent project where this plan will be created.
+ // Format: projects/{project}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // The plan to create.
+ Plan *Plan `protobuf:"bytes,2,opt,name=plan,proto3" json:"plan,omitempty"`
+}
+
+func (x *CreatePlanRequest) Reset() {
+ *x = CreatePlanRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_rollout_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreatePlanRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreatePlanRequest) ProtoMessage() {}
+
+func (x *CreatePlanRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_rollout_service_proto_msgTypes[3]
+ 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 CreatePlanRequest.ProtoReflect.Descriptor instead.
+func (*CreatePlanRequest) Descriptor() ([]byte, []int) {
+ return file_v1_rollout_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CreatePlanRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *CreatePlanRequest) GetPlan() *Plan {
+ if x != nil {
+ return x.Plan
+ }
+ return nil
+}
+
+type UpdatePlanRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The plan to update.
+ //
+ // The plan's `name` field is used to identify the plan to update.
+ // Format: projects/{project}/plans/{plan}
+ Plan *Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"`
+ // The list of fields to update.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+}
+
+func (x *UpdatePlanRequest) Reset() {
+ *x = UpdatePlanRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_rollout_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdatePlanRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdatePlanRequest) ProtoMessage() {}
+
+func (x *UpdatePlanRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_rollout_service_proto_msgTypes[4]
+ 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 UpdatePlanRequest.ProtoReflect.Descriptor instead.
+func (*UpdatePlanRequest) Descriptor() ([]byte, []int) {
+ return file_v1_rollout_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UpdatePlanRequest) GetPlan() *Plan {
+ if x != nil {
+ return x.Plan
+ }
+ return nil
+}
+
+func (x *UpdatePlanRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type Plan struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the plan.
+ // `plan` is a system generated ID.
+ // Format: projects/{project}/plans/{plan}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The system-assigned, unique identifier for a resource.
+ Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
+ Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *Plan) Reset() {
+ *x = Plan{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_rollout_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Plan) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Plan) ProtoMessage() {}
+
+func (x *Plan) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_rollout_service_proto_msgTypes[5]
+ 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 Plan.ProtoReflect.Descriptor instead.
+func (*Plan) Descriptor() ([]byte, []int) {
+ return file_v1_rollout_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *Plan) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Plan) GetUid() string {
+ if x != nil {
+ return x.Uid
+ }
+ return ""
+}
+
+func (x *Plan) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *Plan) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+var File_v1_rollout_service_proto protoreflect.FileDescriptor
+
+var file_v1_rollout_service_proto_rawDesc = []byte{
+ 0x0a, 0x18, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
+ 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
+ 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x29, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 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, 0x6b, 0x0a, 0x10,
+ 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x64, 0x0a, 0x11, 0x4c, 0x69, 0x73,
+ 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27,
+ 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e,
+ 0x52, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22,
+ 0x5c, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c,
+ 0x61, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x81, 0x01,
+ 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x50, 0x6c, 0x61, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12,
+ 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b,
+ 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73,
+ 0x6b, 0x22, 0x69, 0x0a, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a,
+ 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
+ 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xed, 0x03, 0x0a,
+ 0x0e, 0x52, 0x6f, 0x6c, 0x6c, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
+ 0x67, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x2c, 0xda, 0x41, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f,
+ 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74,
+ 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70,
+ 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x6f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c,
+ 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x2e, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25,
+ 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f,
+ 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x43, 0xda, 0x41, 0x10, 0x70, 0x6c, 0x61, 0x6e,
+ 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x2a, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x32, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70,
+ 0x6c, 0x61, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+ 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 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 (
+ file_v1_rollout_service_proto_rawDescOnce sync.Once
+ file_v1_rollout_service_proto_rawDescData = file_v1_rollout_service_proto_rawDesc
+)
+
+func file_v1_rollout_service_proto_rawDescGZIP() []byte {
+ file_v1_rollout_service_proto_rawDescOnce.Do(func() {
+ file_v1_rollout_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_rollout_service_proto_rawDescData)
+ })
+ return file_v1_rollout_service_proto_rawDescData
+}
+
+var file_v1_rollout_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_v1_rollout_service_proto_goTypes = []interface{}{
+ (*GetPlanRequest)(nil), // 0: bytebase.v1.GetPlanRequest
+ (*ListPlansRequest)(nil), // 1: bytebase.v1.ListPlansRequest
+ (*ListPlansResponse)(nil), // 2: bytebase.v1.ListPlansResponse
+ (*CreatePlanRequest)(nil), // 3: bytebase.v1.CreatePlanRequest
+ (*UpdatePlanRequest)(nil), // 4: bytebase.v1.UpdatePlanRequest
+ (*Plan)(nil), // 5: bytebase.v1.Plan
+ (*fieldmaskpb.FieldMask)(nil), // 6: google.protobuf.FieldMask
+}
+var file_v1_rollout_service_proto_depIdxs = []int32{
+ 5, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan
+ 5, // 1: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan
+ 5, // 2: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan
+ 6, // 3: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 0, // 4: bytebase.v1.RolloutService.GetPlan:input_type -> bytebase.v1.GetPlanRequest
+ 1, // 5: bytebase.v1.RolloutService.ListPlans:input_type -> bytebase.v1.ListPlansRequest
+ 3, // 6: bytebase.v1.RolloutService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest
+ 4, // 7: bytebase.v1.RolloutService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest
+ 5, // 8: bytebase.v1.RolloutService.GetPlan:output_type -> bytebase.v1.Plan
+ 2, // 9: bytebase.v1.RolloutService.ListPlans:output_type -> bytebase.v1.ListPlansResponse
+ 5, // 10: bytebase.v1.RolloutService.CreatePlan:output_type -> bytebase.v1.Plan
+ 5, // 11: bytebase.v1.RolloutService.UpdatePlan:output_type -> bytebase.v1.Plan
+ 8, // [8:12] is the sub-list for method output_type
+ 4, // [4:8] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_v1_rollout_service_proto_init() }
+func file_v1_rollout_service_proto_init() {
+ if File_v1_rollout_service_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_v1_rollout_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetPlanRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_rollout_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPlansRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_rollout_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPlansResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_rollout_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreatePlanRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_rollout_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdatePlanRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_rollout_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Plan); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_v1_rollout_service_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_rollout_service_proto_goTypes,
+ DependencyIndexes: file_v1_rollout_service_proto_depIdxs,
+ MessageInfos: file_v1_rollout_service_proto_msgTypes,
+ }.Build()
+ File_v1_rollout_service_proto = out.File
+ file_v1_rollout_service_proto_rawDesc = nil
+ file_v1_rollout_service_proto_goTypes = nil
+ file_v1_rollout_service_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/v1/rollout_service.pb.gw.go b/proto/generated-go/v1/rollout_service.pb.gw.go
new file mode 100644
index 0000000000..f8cbc41f9c
--- /dev/null
+++ b/proto/generated-go/v1/rollout_service.pb.gw.go
@@ -0,0 +1,580 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: v1/rollout_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var _ codes.Code
+var _ io.Reader
+var _ status.Status
+var _ = runtime.String
+var _ = utilities.NewDoubleArray
+var _ = metadata.Join
+
+func request_RolloutService_GetPlan_0(ctx context.Context, marshaler runtime.Marshaler, client RolloutServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetPlanRequest
+ 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)
+ }
+
+ msg, err := client.GetPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_RolloutService_GetPlan_0(ctx context.Context, marshaler runtime.Marshaler, server RolloutServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetPlanRequest
+ 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)
+ }
+
+ msg, err := server.GetPlan(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_RolloutService_ListPlans_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+)
+
+func request_RolloutService_ListPlans_0(ctx context.Context, marshaler runtime.Marshaler, client RolloutServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListPlansRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RolloutService_ListPlans_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListPlans(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_RolloutService_ListPlans_0(ctx context.Context, marshaler runtime.Marshaler, server RolloutServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListPlansRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RolloutService_ListPlans_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListPlans(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_RolloutService_CreatePlan_0(ctx context.Context, marshaler runtime.Marshaler, client RolloutServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreatePlanRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Plan); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ msg, err := client.CreatePlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_RolloutService_CreatePlan_0(ctx context.Context, marshaler runtime.Marshaler, server RolloutServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreatePlanRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Plan); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ msg, err := server.CreatePlan(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_RolloutService_UpdatePlan_0 = &utilities.DoubleArray{Encoding: map[string]int{"plan": 0, "name": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}
+)
+
+func request_RolloutService_UpdatePlan_0(ctx context.Context, marshaler runtime.Marshaler, client RolloutServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdatePlanRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Plan); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Plan); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["plan.name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "plan.name")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "plan.name", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "plan.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_RolloutService_UpdatePlan_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.UpdatePlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_RolloutService_UpdatePlan_0(ctx context.Context, marshaler runtime.Marshaler, server RolloutServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdatePlanRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Plan); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Plan); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["plan.name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "plan.name")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "plan.name", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "plan.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_RolloutService_UpdatePlan_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.UpdatePlan(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterRolloutServiceHandlerServer registers the http handlers for service RolloutService to "mux".
+// UnaryRPC :call RolloutServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRolloutServiceHandlerFromEndpoint instead.
+func RegisterRolloutServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RolloutServiceServer) error {
+
+ mux.Handle("GET", pattern_RolloutService_GetPlan_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.RolloutService/GetPlan", runtime.WithHTTPPathPattern("/v1/{name=projects/*/plans/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RolloutService_GetPlan_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_RolloutService_GetPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_RolloutService_ListPlans_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.RolloutService/ListPlans", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/plans"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RolloutService_ListPlans_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_RolloutService_ListPlans_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_RolloutService_CreatePlan_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.RolloutService/CreatePlan", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/plans"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RolloutService_CreatePlan_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_RolloutService_CreatePlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_RolloutService_UpdatePlan_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.RolloutService/UpdatePlan", runtime.WithHTTPPathPattern("/v1/{plan.name=projects/*/plans/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_RolloutService_UpdatePlan_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_RolloutService_UpdatePlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterRolloutServiceHandlerFromEndpoint is same as RegisterRolloutServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterRolloutServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.DialContext(ctx, endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+
+ return RegisterRolloutServiceHandler(ctx, mux, conn)
+}
+
+// RegisterRolloutServiceHandler registers the http handlers for service RolloutService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterRolloutServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterRolloutServiceHandlerClient(ctx, mux, NewRolloutServiceClient(conn))
+}
+
+// RegisterRolloutServiceHandlerClient registers the http handlers for service RolloutService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RolloutServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RolloutServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "RolloutServiceClient" to call the correct interceptors.
+func RegisterRolloutServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RolloutServiceClient) error {
+
+ mux.Handle("GET", pattern_RolloutService_GetPlan_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.RolloutService/GetPlan", runtime.WithHTTPPathPattern("/v1/{name=projects/*/plans/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RolloutService_GetPlan_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_RolloutService_GetPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_RolloutService_ListPlans_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.RolloutService/ListPlans", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/plans"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RolloutService_ListPlans_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_RolloutService_ListPlans_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_RolloutService_CreatePlan_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.RolloutService/CreatePlan", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/plans"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RolloutService_CreatePlan_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_RolloutService_CreatePlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_RolloutService_UpdatePlan_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.RolloutService/UpdatePlan", runtime.WithHTTPPathPattern("/v1/{plan.name=projects/*/plans/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_RolloutService_UpdatePlan_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_RolloutService_UpdatePlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_RolloutService_GetPlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "plans", "name"}, ""))
+
+ pattern_RolloutService_ListPlans_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "plans"}, ""))
+
+ pattern_RolloutService_CreatePlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "plans"}, ""))
+
+ pattern_RolloutService_UpdatePlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "plans", "plan.name"}, ""))
+)
+
+var (
+ forward_RolloutService_GetPlan_0 = runtime.ForwardResponseMessage
+
+ forward_RolloutService_ListPlans_0 = runtime.ForwardResponseMessage
+
+ forward_RolloutService_CreatePlan_0 = runtime.ForwardResponseMessage
+
+ forward_RolloutService_UpdatePlan_0 = runtime.ForwardResponseMessage
+)
diff --git a/proto/generated-go/v1/rollout_service_grpc.pb.go b/proto/generated-go/v1/rollout_service_grpc.pb.go
new file mode 100644
index 0000000000..59e169b939
--- /dev/null
+++ b/proto/generated-go/v1/rollout_service_grpc.pb.go
@@ -0,0 +1,220 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc (unknown)
+// source: v1/rollout_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ RolloutService_GetPlan_FullMethodName = "/bytebase.v1.RolloutService/GetPlan"
+ RolloutService_ListPlans_FullMethodName = "/bytebase.v1.RolloutService/ListPlans"
+ RolloutService_CreatePlan_FullMethodName = "/bytebase.v1.RolloutService/CreatePlan"
+ RolloutService_UpdatePlan_FullMethodName = "/bytebase.v1.RolloutService/UpdatePlan"
+)
+
+// RolloutServiceClient is the client API for RolloutService service.
+//
+// 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 RolloutServiceClient interface {
+ GetPlan(ctx context.Context, in *GetPlanRequest, opts ...grpc.CallOption) (*Plan, error)
+ ListPlans(ctx context.Context, in *ListPlansRequest, opts ...grpc.CallOption) (*ListPlansResponse, error)
+ CreatePlan(ctx context.Context, in *CreatePlanRequest, opts ...grpc.CallOption) (*Plan, error)
+ UpdatePlan(ctx context.Context, in *UpdatePlanRequest, opts ...grpc.CallOption) (*Plan, error)
+}
+
+type rolloutServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewRolloutServiceClient(cc grpc.ClientConnInterface) RolloutServiceClient {
+ return &rolloutServiceClient{cc}
+}
+
+func (c *rolloutServiceClient) GetPlan(ctx context.Context, in *GetPlanRequest, opts ...grpc.CallOption) (*Plan, error) {
+ out := new(Plan)
+ err := c.cc.Invoke(ctx, RolloutService_GetPlan_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *rolloutServiceClient) ListPlans(ctx context.Context, in *ListPlansRequest, opts ...grpc.CallOption) (*ListPlansResponse, error) {
+ out := new(ListPlansResponse)
+ err := c.cc.Invoke(ctx, RolloutService_ListPlans_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *rolloutServiceClient) CreatePlan(ctx context.Context, in *CreatePlanRequest, opts ...grpc.CallOption) (*Plan, error) {
+ out := new(Plan)
+ err := c.cc.Invoke(ctx, RolloutService_CreatePlan_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *rolloutServiceClient) UpdatePlan(ctx context.Context, in *UpdatePlanRequest, opts ...grpc.CallOption) (*Plan, error) {
+ out := new(Plan)
+ err := c.cc.Invoke(ctx, RolloutService_UpdatePlan_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// RolloutServiceServer is the server API for RolloutService service.
+// All implementations must embed UnimplementedRolloutServiceServer
+// for forward compatibility
+type RolloutServiceServer interface {
+ GetPlan(context.Context, *GetPlanRequest) (*Plan, error)
+ ListPlans(context.Context, *ListPlansRequest) (*ListPlansResponse, error)
+ CreatePlan(context.Context, *CreatePlanRequest) (*Plan, error)
+ UpdatePlan(context.Context, *UpdatePlanRequest) (*Plan, error)
+ mustEmbedUnimplementedRolloutServiceServer()
+}
+
+// UnimplementedRolloutServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedRolloutServiceServer struct {
+}
+
+func (UnimplementedRolloutServiceServer) GetPlan(context.Context, *GetPlanRequest) (*Plan, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetPlan not implemented")
+}
+func (UnimplementedRolloutServiceServer) ListPlans(context.Context, *ListPlansRequest) (*ListPlansResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListPlans not implemented")
+}
+func (UnimplementedRolloutServiceServer) CreatePlan(context.Context, *CreatePlanRequest) (*Plan, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreatePlan not implemented")
+}
+func (UnimplementedRolloutServiceServer) UpdatePlan(context.Context, *UpdatePlanRequest) (*Plan, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdatePlan not implemented")
+}
+func (UnimplementedRolloutServiceServer) mustEmbedUnimplementedRolloutServiceServer() {}
+
+// UnsafeRolloutServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to RolloutServiceServer will
+// result in compilation errors.
+type UnsafeRolloutServiceServer interface {
+ mustEmbedUnimplementedRolloutServiceServer()
+}
+
+func RegisterRolloutServiceServer(s grpc.ServiceRegistrar, srv RolloutServiceServer) {
+ s.RegisterService(&RolloutService_ServiceDesc, srv)
+}
+
+func _RolloutService_GetPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetPlanRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RolloutServiceServer).GetPlan(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RolloutService_GetPlan_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RolloutServiceServer).GetPlan(ctx, req.(*GetPlanRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RolloutService_ListPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListPlansRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RolloutServiceServer).ListPlans(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RolloutService_ListPlans_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RolloutServiceServer).ListPlans(ctx, req.(*ListPlansRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RolloutService_CreatePlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreatePlanRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RolloutServiceServer).CreatePlan(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RolloutService_CreatePlan_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RolloutServiceServer).CreatePlan(ctx, req.(*CreatePlanRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _RolloutService_UpdatePlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdatePlanRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(RolloutServiceServer).UpdatePlan(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: RolloutService_UpdatePlan_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(RolloutServiceServer).UpdatePlan(ctx, req.(*UpdatePlanRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// RolloutService_ServiceDesc is the grpc.ServiceDesc for RolloutService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var RolloutService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.RolloutService",
+ HandlerType: (*RolloutServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetPlan",
+ Handler: _RolloutService_GetPlan_Handler,
+ },
+ {
+ MethodName: "ListPlans",
+ Handler: _RolloutService_ListPlans_Handler,
+ },
+ {
+ MethodName: "CreatePlan",
+ Handler: _RolloutService_CreatePlan_Handler,
+ },
+ {
+ MethodName: "UpdatePlan",
+ Handler: _RolloutService_UpdatePlan_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/rollout_service.proto",
+}
diff --git a/proto/v1/rollout_service.proto b/proto/v1/rollout_service.proto
new file mode 100644
index 0000000000..0e233556d5
--- /dev/null
+++ b/proto/v1/rollout_service.proto
@@ -0,0 +1,109 @@
+syntax = "proto3";
+
+package bytebase.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/protobuf/field_mask.proto";
+
+option go_package = "generated-go/v1";
+
+service RolloutService {
+ rpc GetPlan(GetPlanRequest) returns (Plan) {
+ option (google.api.http) = {get: "/v1/{name=projects/*/plans/*}"};
+ option (google.api.method_signature) = "name";
+ }
+
+ rpc ListPlans(ListPlansRequest) returns (ListPlansResponse) {
+ option (google.api.http) = {get: "/v1/{parent=projects/*}/plans"};
+ option (google.api.method_signature) = "parent";
+ }
+
+ rpc CreatePlan(CreatePlanRequest) returns (Plan) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/plans"
+ body: "plan"
+ };
+ option (google.api.method_signature) = "";
+ }
+
+ rpc UpdatePlan(UpdatePlanRequest) returns (Plan) {
+ option (google.api.http) = {
+ patch: "/v1/{plan.name=projects/*/plans/*}"
+ body: "plan"
+ };
+ option (google.api.method_signature) = "plan,update_mask";
+ }
+}
+
+message GetPlanRequest {
+ // The name of the plan to retrieve.
+ // Format: projects/{project}/plans/{plan}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message ListPlansRequest {
+ // The parent, which owns this collection of plans.
+ // Format: projects/{project}
+ // Use "projects/-" to list all plans from all projects.
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The maximum number of plans to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 plans will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ int32 page_size = 2;
+
+ // A page token, received from a previous `ListPlans` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListPlans` must match
+ // the call that provided the page token.
+ string page_token = 3;
+}
+
+message ListPlansResponse {
+ // The plans from the specified request.
+ repeated Plan plans = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+message CreatePlanRequest {
+ // The parent project where this plan will be created.
+ // Format: projects/{project}
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The plan to create.
+ Plan plan = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message UpdatePlanRequest {
+ // The plan to update.
+ //
+ // The plan's `name` field is used to identify the plan to update.
+ // Format: projects/{project}/plans/{plan}
+ Plan plan = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The list of fields to update.
+ google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+message Plan {
+ // The name of the plan.
+ // `plan` is a system generated ID.
+ // Format: projects/{project}/plans/{plan}
+ string name = 1;
+
+ // The system-assigned, unique identifier for a resource.
+ string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ string title = 3;
+
+ string description = 4;
+
+ // TODO(d/xz): support spec with 1) deployment config, 2) user specified targets with stages/steps, 3) project groups in the future.
+}