feature update proto
This commit is contained in:
parent
055f32c163
commit
67979897a6
@ -430,4 +430,16 @@ CServiceClientPlugin::GenerateHeaderGuardStart(Service::Ptr service)
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
std::string
|
||||
CServiceClientPlugin::GenerateHeaderExamples(Service::Ptr service)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string
|
||||
CServiceClientPlugin::GenerateSourceExamples(Service::Ptr service)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
}// namespace tqcq
|
||||
|
@ -39,6 +39,9 @@ protected:
|
||||
std::string GenerateSourceSendFunctionDefinition(Service::Ptr service);
|
||||
|
||||
std::string GenerateSourceDispatchFunctionDefinition(Service::Ptr service);
|
||||
|
||||
std::string GenerateHeaderExamples(Service::Ptr service);
|
||||
std::string GenerateSourceExamples(Service::Ptr service);
|
||||
};
|
||||
|
||||
}// namespace tqcq
|
||||
|
@ -38,10 +38,13 @@ std::string
|
||||
CServiceServerPlugin::GenerateHeaderStructAPIStart(Service::Ptr service)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "/** api examples" << std::endl;
|
||||
for (const auto& rpc : service->rpcs()) {
|
||||
auto crpc = CRPCServer::Create(rpc);
|
||||
ss << crpc->GenerateAPITypedef(service->id());
|
||||
}
|
||||
ss << " * api examples" << std::endl;
|
||||
ss << " */ " << std::endl;
|
||||
ss << std::endl;
|
||||
|
||||
ss << "typedef struct "
|
||||
|
@ -115,7 +115,7 @@ CRPCServer::GenerateAPITypedef(std::string service_id) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
// ss << "typedef int32_t (*" << service_id << "_API_"<< id() << "_Type)(const " << request_id() << " *request, " << response_id() << " *response);\n";
|
||||
ss << "int32_t RPCSM_" << id() << "_API_Impl" << "(const " << request_id() << " *request, " << response_id() << " *response);\n";;
|
||||
ss << "int32_t YOUR_PREFIX_" << id() << "_API_Impl" << "(const " << request_id() << " *request, " << response_id() << " *response);\n";;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
@ -81,6 +81,18 @@ message SMSymmetricResponse {
|
||||
string out_data = 3;
|
||||
}
|
||||
|
||||
message SM2_3_Request {
|
||||
string ecc_pubkey = 1;
|
||||
string ecc_prikey = 2;
|
||||
string in_data = 3;
|
||||
}
|
||||
|
||||
message SM2_3_Response {
|
||||
int32 code = 1;
|
||||
string msg = 2;
|
||||
|
||||
string out_data = 3;
|
||||
}
|
||||
|
||||
service DeviceService {
|
||||
rpc Init(EmptyRequest) returns (StatusResponse) {}
|
||||
@ -100,6 +112,11 @@ service DeviceService {
|
||||
rpc GenerateSignatureByExternalPrivateKey(GenerateSignatureByExternalPrivateKeyRequest) returns (SingleDataResponse) {}
|
||||
rpc VerifySignature(VerifySignatureRequest) returns (StatusResponse) {}
|
||||
|
||||
rpc SM2_3_Encrypt_ExternalPubkey(SM2_3_Request) returns (SM2_3_Response) {}
|
||||
rpc SM2_3_Decrypt_ExternalPrikey(SM2_3_Request) returns (SM2_3_Response) {}
|
||||
rpc SM2_3_Decrypt_InternalPrikey(SM2_3_Request) returns (SM2_3_Response) {}
|
||||
rpc SM2_3_Decrypt_InternalCryptPrikey(SM2_3_Request) returns (SM2_3_Response) {}
|
||||
|
||||
rpc SM1Encrypt(SMSymmetricRequest) returns (SMSymmetricResponse) {}
|
||||
rpc SM1Decrypt(SMSymmetricRequest) returns (SMSymmetricResponse) {}
|
||||
rpc SM4Encrypt(SMSymmetricRequest) returns (SMSymmetricResponse) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user