| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- syntax = "proto3";
- package olivetin.api.v1;
- option go_package = "github.com/jamesread/OliveTin/gen/grpc/olivetin/api/v1;apiv1";
- import "google/api/annotations.proto";
- import "google/api/httpbody.proto";
- message Action {
- string id = 1;
- string title = 2;
- string icon = 3;
- bool can_exec = 4;
- repeated ActionArgument arguments = 5;
- string popup_on_start = 6;
- int32 order = 7;
- }
- message ActionArgument {
- string name = 1;
- string title = 2;
- string type = 3;
- string default_value = 4;
- repeated ActionArgumentChoice choices = 5;
- string description = 6;
- map<string, string> suggestions = 7;
- }
- message ActionArgumentChoice {
- string value = 1;
- string title = 2;
- }
- message Entity {
- string title = 1;
- string icon = 2;
- repeated Action actions = 3;
- }
- message GetDashboardComponentsResponse {
- string title = 1;
- repeated Action actions = 2;
- repeated Entity entities = 3;
- repeated DashboardComponent dashboards = 4;
- string authenticated_user = 5;
- string authenticated_user_provider = 6;
- EffectivePolicy effective_policy = 7;
- Diagnostics diagnostics = 8;
- }
- message Diagnostics {
- string SshFoundKey = 1;
- string SshFoundConfig = 2;
- }
- message EffectivePolicy {
- bool show_diagnostics = 1;
- bool show_log_list = 2;
- }
- message GetDashboardComponentsRequest {}
- message DashboardComponent {
- string title = 1;
- string type = 2;
- repeated DashboardComponent contents = 3;
- string icon = 4;
- string css_class = 5;
- }
- message StartActionRequest {
- string action_id = 1;
- repeated StartActionArgument arguments = 2;
- string unique_tracking_id = 3;
- }
- message StartActionArgument {
- string name = 1;
- string value = 2;
- }
- message StartActionResponse {
- string execution_tracking_id = 2;
- }
- message StartActionAndWaitRequest {
- string action_id = 1;
- repeated StartActionArgument arguments = 2;
- }
- message StartActionAndWaitResponse {
- LogEntry log_entry = 1;
- }
- message StartActionByGetRequest {
- string action_id = 1;
- }
- message StartActionByGetResponse {
- string execution_tracking_id = 2;
- }
- message StartActionByGetAndWaitRequest {
- string action_id = 1;
- }
- message StartActionByGetAndWaitResponse {
- LogEntry log_entry = 1;
- }
- message GetLogsRequest{
- int64 start_offset = 1;
- };
- message LogEntry {
- string datetime_started = 1;
- string action_title = 2;
- string output = 3;
- bool timed_out = 5;
- int32 exit_code = 6;
- string user = 7;
- string user_class = 8;
- string action_icon = 9;
- repeated string tags = 10;
- string execution_tracking_id = 11;
- string datetime_finished = 12;
- string action_id = 13;
- bool execution_started = 14;
- bool execution_finished = 15;
- bool blocked = 16;
- int64 datetime_index = 17;
- bool can_kill = 18;
- }
- message GetLogsResponse {
- repeated LogEntry logs = 1;
- int64 count_remaining = 2;
- int64 page_size = 3;
- }
- message ValidateArgumentTypeRequest {
- string value = 1;
- string type = 2;
- }
- message ValidateArgumentTypeResponse {
- bool valid = 1;
- string description = 2;
- }
- message WatchExecutionRequest {
- string execution_tracking_id = 1;
- }
- message WatchExecutionUpdate {
- string update = 1;
- }
- message ExecutionStatusRequest {
- string execution_tracking_id = 1;
- string action_id = 2;
- }
- message ExecutionStatusResponse {
- LogEntry log_entry = 1;
- }
- message WhoAmIRequest {}
- message WhoAmIResponse {
- string authenticated_user = 1;
- string usergroup = 2;
- string provider = 3;
- repeated string acls = 4;
- string sid = 5;
- }
- message SosReportRequest {}
- message SosReportResponse {
- string alert = 1;
- }
- message DumpVarsRequest {}
- message DumpVarsResponse {
- string alert = 1;
- map<string, string> contents = 2;
- }
- message ActionEntityPair {
- string action_title = 1;
- string entity_prefix = 2;
- }
- message DumpPublicIdActionMapRequest {}
- message DumpPublicIdActionMapResponse {
- string alert = 1;
- map<string, ActionEntityPair> contents = 2;
- }
- message GetReadyzRequest {}
- message GetReadyzResponse {
- string status = 1;
- }
- message EventOutputChunk {
- string execution_tracking_id = 1;
- string output = 2;
- }
- message EventEntityChanged {}
- message EventConfigChanged {}
- message EventExecutionFinished {
- LogEntry log_entry = 1;
- }
- message EventExecutionStarted {
- LogEntry log_entry = 1;
- }
- message KillActionRequest {
- string execution_tracking_id = 1;
- }
- message KillActionResponse {
- string execution_tracking_id = 1;
- bool killed = 2;
- bool already_completed = 3;
- bool found = 4;
- }
- message LocalUserLoginRequest {
- string username = 1;
- string password = 2;
- }
- message LocalUserLoginResponse {
- bool success = 1;
- }
- message PasswordHashRequest {
- string password = 1;
- }
- message PasswordHashResponse {
- }
- message LogoutRequest {}
- service OliveTinApiService {
- rpc GetDashboardComponents(GetDashboardComponentsRequest) returns (GetDashboardComponentsResponse) {
- option (google.api.http) = {
- get: "/api/GetDashboardComponents"
- };
- }
- rpc StartAction(StartActionRequest) returns (StartActionResponse) {
- option (google.api.http) = {
- post: "/api/StartAction"
- body: "*"
- };
- }
- rpc StartActionAndWait(StartActionAndWaitRequest) returns (StartActionAndWaitResponse) {
- option (google.api.http) = {
- post: "/api/StartActionAndWait"
- body: "*"
- };
- }
- rpc StartActionByGet(StartActionByGetRequest) returns (StartActionByGetResponse) {
- option (google.api.http) = {
- get: "/api/StartActionByGet/{action_id}"
- };
- }
- rpc StartActionByGetAndWait(StartActionByGetAndWaitRequest) returns (StartActionByGetAndWaitResponse) {
- option (google.api.http) = {
- get: "/api/StartActionByGetAndWait/{action_id}"
- };
- }
- rpc KillAction(KillActionRequest) returns (KillActionResponse) {
- option (google.api.http) = {
- post: "/api/KillAction"
- body: "*"
- };
- }
- rpc ExecutionStatus(ExecutionStatusRequest) returns (ExecutionStatusResponse) {
- option (google.api.http) = {
- post: "/api/ExecutionStatus"
- body: "*"
- };
- }
- rpc GetLogs(GetLogsRequest) returns (GetLogsResponse) {
- option (google.api.http) = {
- get: "/api/GetLogs"
- };
- }
- rpc ValidateArgumentType(ValidateArgumentTypeRequest) returns (ValidateArgumentTypeResponse) {
- option (google.api.http) = {
- post: "/api/ValidateArgumentType"
- body: "*"
- };
- }
- rpc WhoAmI(WhoAmIRequest) returns (WhoAmIResponse) {
- option (google.api.http) = {
- get: "/api/WhoAmI"
- };
- }
- rpc SosReport(SosReportRequest) returns (google.api.HttpBody) {
- option (google.api.http) = {
- get: "/api/sosreport"
- };
- }
- rpc DumpVars(DumpVarsRequest) returns (DumpVarsResponse) {
- option (google.api.http) = {
- get: "/api/DumpVars"
- };
- }
- rpc DumpPublicIdActionMap(DumpPublicIdActionMapRequest) returns (DumpPublicIdActionMapResponse) {
- option (google.api.http) = {
- get: "/api/DumpActionMap"
- };
- }
- rpc GetReadyz(GetReadyzRequest) returns (GetReadyzResponse) {
- option (google.api.http) = {
- get: "/api/readyz"
- };
- }
- rpc LocalUserLogin(LocalUserLoginRequest) returns (LocalUserLoginResponse) {
- option (google.api.http) = {
- post: "/api/LocalUserLogin"
- body: "*"
- };
- }
- rpc PasswordHash(PasswordHashRequest) returns (google.api.HttpBody) {
- option (google.api.http) = {
- post: "/api/PasswordHash"
- body: "*"
- };
- }
- rpc Logout(LogoutRequest) returns (google.api.HttpBody) {
- option (google.api.http) = {
- get: "/api/Logout"
- };
- }
- }
|