49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
|
#pragma once
|
|||
|
#include "ProtocolBase.h"
|
|||
|
|
|||
|
class ReqClientCfgParams {
|
|||
|
public:
|
|||
|
std::string identifier;
|
|||
|
|
|||
|
AIGC_JSON_HELPER(identifier)
|
|||
|
};
|
|||
|
|
|||
|
class ReqHeartParams {
|
|||
|
public:
|
|||
|
std::string message;
|
|||
|
|
|||
|
AIGC_JSON_HELPER(message)
|
|||
|
AIGC_JSON_HELPER_DEFAULT(message = "PING")
|
|||
|
};
|
|||
|
|
|||
|
class ReqGetUserCfgParams {
|
|||
|
public:
|
|||
|
std::string user;
|
|||
|
std::string token;
|
|||
|
|
|||
|
AIGC_JSON_HELPER(user, token)
|
|||
|
};
|
|||
|
|
|||
|
class VitrualMathineCfg {
|
|||
|
public:
|
|||
|
int vmId;
|
|||
|
std::string vmName;
|
|||
|
std::string svrPublicKey;
|
|||
|
std::string vmNetwork;
|
|||
|
std::string scgGateway;
|
|||
|
|
|||
|
AIGC_JSON_HELPER(vmId, vmName, svrPublicKey, vmNetwork, scgGateway)
|
|||
|
};
|
|||
|
|
|||
|
class UserClientConfigParams {
|
|||
|
public:
|
|||
|
int scgCtrlAppId;
|
|||
|
int scgTunnelAppId;
|
|||
|
std::string cliPrivateKey;
|
|||
|
std::string cliAddress;
|
|||
|
std::list<VitrualMathineCfg> vmConfig;
|
|||
|
|
|||
|
AIGC_JSON_HELPER(scgCtrlAppId, scgTunnelAppId, cliPrivateKey, cliAddress, vmConfig)
|
|||
|
};
|
|||
|
|
|||
|
template<class T1, class T2> int ProtolPostMessage(ProtocolRequest<T1> *pReq, ProtocolResponse<T2> *pRsp);
|