mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 14:26:07 +08:00
142 lines
3.5 KiB
Protocol Buffer
142 lines
3.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package com.ql.api;
|
|
|
|
message EnvItem {
|
|
optional int32 id = 1;
|
|
optional string name = 2;
|
|
optional string value = 3;
|
|
optional string remarks = 4;
|
|
optional int32 status = 5;
|
|
optional int64 position = 6;
|
|
}
|
|
|
|
message GetEnvsRequest { string searchValue = 1; }
|
|
|
|
message CreateEnvRequest { repeated EnvItem envs = 1; }
|
|
|
|
message UpdateEnvRequest { EnvItem env = 1; }
|
|
|
|
message DeleteEnvsRequest { repeated int32 ids = 1; }
|
|
|
|
message MoveEnvRequest {
|
|
int32 id = 1;
|
|
int32 fromIndex = 2;
|
|
int32 toIndex = 3;
|
|
}
|
|
|
|
message DisableEnvsRequest { repeated int32 ids = 1; }
|
|
|
|
message EnableEnvsRequest { repeated int32 ids = 1; }
|
|
|
|
message UpdateEnvNamesRequest {
|
|
repeated int32 ids = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
message GetEnvByIdRequest { int32 id = 1; }
|
|
|
|
message EnvsResponse {
|
|
int32 code = 1;
|
|
repeated EnvItem data = 2;
|
|
optional string message = 3;
|
|
}
|
|
|
|
message EnvResponse {
|
|
int32 code = 1;
|
|
EnvItem data = 2;
|
|
optional string message = 3;
|
|
}
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
optional string message = 2;
|
|
}
|
|
|
|
message SystemNotifyRequest {
|
|
string title = 1;
|
|
string content = 2;
|
|
}
|
|
|
|
message ExtraScheduleItem {
|
|
string schedule = 1;
|
|
}
|
|
|
|
message CronItem {
|
|
optional int32 id = 1;
|
|
optional string command = 2;
|
|
optional string schedule = 3;
|
|
optional string name = 4;
|
|
repeated string labels = 5;
|
|
optional int32 sub_id = 6;
|
|
repeated ExtraScheduleItem extra_schedules = 7;
|
|
optional string task_before = 8;
|
|
optional string task_after = 9;
|
|
optional int32 status = 10;
|
|
optional string log_path = 11;
|
|
optional int32 pid = 12;
|
|
optional int64 last_running_time = 13;
|
|
optional int64 last_execution_time = 14;
|
|
}
|
|
|
|
message CreateCronRequest {
|
|
string command = 1;
|
|
string schedule = 2;
|
|
optional string name = 3;
|
|
repeated string labels = 4;
|
|
optional int32 sub_id = 5;
|
|
repeated ExtraScheduleItem extra_schedules = 6;
|
|
optional string task_before = 7;
|
|
optional string task_after = 8;
|
|
}
|
|
|
|
message UpdateCronRequest {
|
|
int32 id = 1;
|
|
optional string command = 2;
|
|
optional string schedule = 3;
|
|
optional string name = 4;
|
|
repeated string labels = 5;
|
|
optional int32 sub_id = 6;
|
|
repeated ExtraScheduleItem extra_schedules = 7;
|
|
optional string task_before = 8;
|
|
optional string task_after = 9;
|
|
}
|
|
|
|
message DeleteCronsRequest { repeated int32 ids = 1; }
|
|
|
|
message CronsResponse {
|
|
int32 code = 1;
|
|
repeated CronItem data = 2;
|
|
optional string message = 3;
|
|
}
|
|
|
|
message CronResponse {
|
|
int32 code = 1;
|
|
CronItem data = 2;
|
|
optional string message = 3;
|
|
}
|
|
|
|
message CronDetailRequest { string log_path = 1; }
|
|
|
|
message CronDetailResponse {
|
|
int32 code = 1;
|
|
CronItem data = 2;
|
|
optional string message = 3;
|
|
}
|
|
|
|
service Api {
|
|
rpc GetEnvs(GetEnvsRequest) returns (EnvsResponse) {}
|
|
rpc CreateEnv(CreateEnvRequest) returns (EnvsResponse) {}
|
|
rpc UpdateEnv(UpdateEnvRequest) returns (EnvResponse) {}
|
|
rpc DeleteEnvs(DeleteEnvsRequest) returns (Response) {}
|
|
rpc MoveEnv(MoveEnvRequest) returns (EnvResponse) {}
|
|
rpc DisableEnvs(DisableEnvsRequest) returns (Response) {}
|
|
rpc EnableEnvs(EnableEnvsRequest) returns (Response) {}
|
|
rpc UpdateEnvNames(UpdateEnvNamesRequest) returns (Response) {}
|
|
rpc GetEnvById(GetEnvByIdRequest) returns (EnvResponse) {}
|
|
rpc SystemNotify(SystemNotifyRequest) returns (Response) {}
|
|
rpc GetCronDetail(CronDetailRequest) returns (CronDetailResponse) {}
|
|
rpc CreateCron(CreateCronRequest) returns (CronResponse) {}
|
|
rpc UpdateCron(UpdateCronRequest) returns (CronResponse) {}
|
|
rpc DeleteCrons(DeleteCronsRequest) returns (Response) {}
|
|
} |