Rename owner_wallet to admin_pubkey in AppContract and related structures; add price_per_unit and locked_nano fields
This commit is contained in:
parent
e835424049
commit
99c3c83ed3
@ -8,7 +8,7 @@ message Empty {
|
|||||||
message AppContract {
|
message AppContract {
|
||||||
string uuid = 1;
|
string uuid = 1;
|
||||||
string package_url = 2;
|
string package_url = 2;
|
||||||
string owner_wallet = 3;
|
string admin_pubkey = 3;
|
||||||
string node_pubkey = 4;
|
string node_pubkey = 4;
|
||||||
string public_ipv4 = 5;
|
string public_ipv4 = 5;
|
||||||
AppResource resource = 6;
|
AppResource resource = 6;
|
||||||
@ -25,7 +25,9 @@ message NewAppReq {
|
|||||||
string node_pubkey = 2;
|
string node_pubkey = 2;
|
||||||
AppResource resource = 3;
|
AppResource resource = 3;
|
||||||
string uuid = 4;
|
string uuid = 4;
|
||||||
string owner_wallet = 5;
|
string admin_pubkey = 5;
|
||||||
|
uint64 price_per_unit = 15;
|
||||||
|
uint64 locked_nano = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AppResource {
|
message AppResource {
|
||||||
@ -53,7 +55,7 @@ message DelAppReq {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message ListAppContractsReq {
|
message ListAppContractsReq {
|
||||||
string owner_wallet = 1;
|
string admin_pubkey = 1;
|
||||||
// string uuid = 2;
|
// string uuid = 2;
|
||||||
// string node_pubkey = 3;
|
// string node_pubkey = 3;
|
||||||
}
|
}
|
||||||
@ -66,7 +68,7 @@ service BrainAppCli {
|
|||||||
|
|
||||||
message RegisterAppNodeReq {
|
message RegisterAppNodeReq {
|
||||||
string node_pubkey = 1;
|
string node_pubkey = 1;
|
||||||
string owner_pubkey = 2;
|
string operator_pubkey = 2;
|
||||||
string main_ip = 3;
|
string main_ip = 3;
|
||||||
string country = 4;
|
string country = 4;
|
||||||
string region = 5;
|
string region = 5;
|
||||||
|
@ -38,8 +38,10 @@ pub struct AppDeployConfig {
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub uuid: String,
|
pub uuid: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub owner_wallet: String,
|
pub admin_pubkey: String,
|
||||||
pub node_pubkey: String,
|
pub node_pubkey: String,
|
||||||
|
pub price_per_unit: u64,
|
||||||
|
pub locked_nano: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<NewAppReq> for AppDeployConfig {
|
impl From<NewAppReq> for AppDeployConfig {
|
||||||
@ -48,8 +50,10 @@ impl From<NewAppReq> for AppDeployConfig {
|
|||||||
package_url: pb_val.package_url,
|
package_url: pb_val.package_url,
|
||||||
resource: pb_val.resource.map(Resource::from).unwrap_or_default(),
|
resource: pb_val.resource.map(Resource::from).unwrap_or_default(),
|
||||||
uuid: pb_val.uuid,
|
uuid: pb_val.uuid,
|
||||||
owner_wallet: pb_val.owner_wallet,
|
admin_pubkey: pb_val.admin_pubkey,
|
||||||
node_pubkey: pb_val.node_pubkey,
|
node_pubkey: pb_val.node_pubkey,
|
||||||
|
price_per_unit: pb_val.price_per_unit,
|
||||||
|
locked_nano: pb_val.locked_nano,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,8 +64,10 @@ impl From<AppDeployConfig> for NewAppReq {
|
|||||||
package_url: val.package_url,
|
package_url: val.package_url,
|
||||||
resource: Some(val.resource.into()),
|
resource: Some(val.resource.into()),
|
||||||
uuid: val.uuid,
|
uuid: val.uuid,
|
||||||
owner_wallet: val.owner_wallet,
|
admin_pubkey: val.admin_pubkey,
|
||||||
node_pubkey: val.node_pubkey,
|
node_pubkey: val.node_pubkey,
|
||||||
|
price_per_unit: val.price_per_unit,
|
||||||
|
locked_nano: val.locked_nano,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user