how to use

Initialize Yearning

  1. Start juno (the port can be specified by -p, the default port is 50001)
  2. Fill in GrpcAddr parameters in conf.toml (default 127.0.0.1:50001)
  3. Debug

Note

Juno and Yearning must share the same database and the same configuration file (if juno and Yearning are not on the same host, you need to copy a cofnig.toml file and juno in the same directory. And the config.toml file in the Yearning project (GrpcAddr configuration items are filled in with the IP and port of the host where Juno is located)

Because the current juno only has linux version, it is recommended that developers based on mac / windows platform development use docker to start juno.

Invoke parameters


syntax = "proto3";
package proto;


message LibraAuditOrder {
    string SQL = 1;
    string DataBase = 2;
    string Table = 3;
    bool Execute = 4;
    bool Check = 5;
    bool IsDML = 6;
    bool Backup = 7;
    Source source = 8;
    string WorkId = 9;
    bool IsAutoTask = 10;
    string Name = 11;

}

message Source {
    string Addr = 1;
    string User = 2;
    string Password = 3;
    int32 Port = 4;
}

message Record {
    string SQL = 1;
    int32 AffectRows = 2;
    string Status = 3;
    string Error = 4;
    int32 Level = 6;
}

message RecordSet {
    repeated Record record = 1;
}

message ExecOrder {
    string Message = 1;
}

message Isok {
    bool Ok = 1;
}
message InsulateWordList {
    repeated string InsulateWordList = 1;
    string SQL = 2;
}

service Juno {
    rpc OrderDeal (LibraAuditOrder) returns (RecordSet) {
    }
    rpc OrderDMLExec (LibraAuditOrder) returns (ExecOrder) {
    }
    rpc OrderDDLExec (LibraAuditOrder) returns (ExecOrder) {
    }
    rpc AutoTask (LibraAuditOrder) returns (Isok) {
    }
    rpc Query (LibraAuditOrder) returns (InsulateWordList) {
    }
    rpc KillOsc (LibraAuditOrder) returns (Isok) {
    }
}

results matching ""

    No results matching ""