
syntax = "proto3";

package tweety;

// The greeting service definition.
service Tweety {
    // Unary - request and respond
    rpc GetStrategyConfigId (GetStrategyConfigId_Msg) returns (GetStrategyConfigId_Reply);
    rpc SaveStrategyConfig (SaveStrategyConfig_Msg) returns (SaveStrategyConfig_Reply);
    rpc GetStrategyConfig (GetStrategyConfig_Msg) returns (GetStrategyConfig_Reply);
    rpc RemoveStrategyConfig(RemoveStrategyConfig_Msg) returns (Dummy_Reply);
    rpc RemoveOldConfig (RemoveOldConfig_Msg) returns (Dummy_Reply);
    rpc HealthCheck (Ping) returns (Pong);
}

message RemoveStrategyConfig_Msg {
    string strategy_name = 1;
    bool is_live = 2;
    repeated string strategy_id_list = 3;
}

message RemoveOldConfig_Msg {
    int32 days = 1;
}

message Dummy_Reply {
    string dummy = 1;
}

message GetStrategyConfig_Msg {
    string strategy_name = 1;
    bool is_live = 2;
}

message GetStrategyConfig_Reply {
    string status = 1;
    repeated string cfg_list = 2;
}

message GetStrategyConfigId_Msg {
    string strategy_config = 1;
}

message GetStrategyConfigId_Reply {
    string status = 1;
    string cfg_id = 2;
}

message SaveStrategyConfig_Msg {
    string strategy_config = 1;
}

message SaveStrategyConfig_Reply {
    string status = 1;
}

message Ping {
    string message = 1;
}

message Pong {
    string message = 1;
}
