Add ApplicationDeploymentRemovalRequests #130
@ -101,6 +101,24 @@ message ApplicationDeploymentRecord {
|
||||
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
|
||||
}
|
||||
|
||||
message ApplicationDeploymentRemovalRequest {
|
||||
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
|
||||
string version = 2 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
|
||||
string deployment = 3 [(gogoproto.moretags) = "json:\"deployment\" yaml:\"deployment\""];
|
||||
string request = 4 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
|
||||
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
|
||||
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
|
||||
}
|
||||
|
||||
message ApplicationDeploymentRemovalRecord {
|
||||
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
|
||||
string version = 2 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
|
||||
string deployment = 3 [(gogoproto.moretags) = "json:\"deployment\" yaml:\"deployment\""];
|
||||
string request = 4 [(gogoproto.moretags) = "json:\"request\" yaml:\"request\""];
|
||||
string meta = 20 [(gogoproto.moretags) = "json:\"meta\" yaml:\"meta\""];
|
||||
repeated string tags = 21 [(gogoproto.moretags) = "json:\"tags\" yaml:\"tags\""];
|
||||
}
|
||||
|
||||
message GeneralRecord {
|
||||
string type = 1 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
|
||||
string name = 2 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""];
|
||||
|
@ -346,7 +346,8 @@ func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) erro
|
||||
}
|
||||
}
|
||||
case "WebsiteRegistrationRecord", "ApplicationRecord", "ApplicationDeploymentRequest",
|
||||
"ApplicationDeploymentRecord", "ApplicationArtifact", "DnsRecord", "GeneralRecord":
|
||||
"ApplicationDeploymentRecord", "ApplicationArtifact", "ApplicationDeploymentRemovalRequest",
|
||||
"ApplicationDeploymentRemovalRecord", "DnsRecord", "GeneralRecord":
|
||||
{
|
||||
// #nosec G705
|
||||
for key := range record.Attributes {
|
||||
|
1039
x/registry/types/attributes.pb.go
generated
1039
x/registry/types/attributes.pb.go
generated
File diff suppressed because it is too large
Load Diff
@ -75,6 +75,18 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||
&ApplicationArtifact{},
|
||||
)
|
||||
|
||||
registry.RegisterInterface(
|
||||
"vulcanize.registry.v1beta1.ApplicationDeploymentRemovalRequest",
|
||||
(*Attributes)(nil),
|
||||
&ApplicationDeploymentRemovalRequest{},
|
||||
)
|
||||
|
||||
registry.RegisterInterface(
|
||||
"vulcanize.registry.v1beta1.ApplicationDeploymentRemovalRecord",
|
||||
(*Attributes)(nil),
|
||||
&ApplicationDeploymentRemovalRecord{},
|
||||
)
|
||||
|
||||
registry.RegisterInterface(
|
||||
"vulcanize.registry.v1beta1.DnsRecord",
|
||||
(*Attributes)(nil),
|
||||
|
@ -95,6 +95,24 @@ func payLoadAttributes(recordPayLoad map[string]interface{}) (*codectypes.Any, e
|
||||
}
|
||||
return codectypes.NewAnyWithValue(&attributes)
|
||||
}
|
||||
case "ApplicationDeploymentRemovalRequest":
|
||||
{
|
||||
var attributes ApplicationDeploymentRemovalRequest
|
||||
err := json.Unmarshal(bz, &attributes)
|
||||
if err != nil {
|
||||
return &codectypes.Any{}, err
|
||||
}
|
||||
return codectypes.NewAnyWithValue(&attributes)
|
||||
}
|
||||
case "ApplicationDeploymentRemovalRecord":
|
||||
{
|
||||
var attributes ApplicationDeploymentRemovalRecord
|
||||
err := json.Unmarshal(bz, &attributes)
|
||||
if err != nil {
|
||||
return &codectypes.Any{}, err
|
||||
}
|
||||
return codectypes.NewAnyWithValue(&attributes)
|
||||
}
|
||||
case "ApplicationArtifact":
|
||||
{
|
||||
var attributes ApplicationArtifact
|
||||
@ -228,6 +246,32 @@ func GetJSONBytesFromAny(any codectypes.Any) ([]byte, error) {
|
||||
panic("Proto unmarshal error")
|
||||
}
|
||||
|
||||
bz, err = json.Marshal(attributes)
|
||||
if err != nil {
|
||||
panic("JSON marshal error")
|
||||
}
|
||||
}
|
||||
case "ApplicationDeploymentRemovalRequest":
|
||||
{
|
||||
var attributes ApplicationDeploymentRemovalRequest
|
||||
err := proto.Unmarshal(any.Value, &attributes)
|
||||
if err != nil {
|
||||
panic("Proto unmarshal error")
|
||||
}
|
||||
|
||||
bz, err = json.Marshal(attributes)
|
||||
if err != nil {
|
||||
panic("JSON marshal error")
|
||||
}
|
||||
}
|
||||
case "ApplicationDeploymentRemovalRecord":
|
||||
{
|
||||
var attributes ApplicationDeploymentRemovalRecord
|
||||
err := proto.Unmarshal(any.Value, &attributes)
|
||||
if err != nil {
|
||||
panic("Proto unmarshal error")
|
||||
}
|
||||
|
||||
bz, err = json.Marshal(attributes)
|
||||
if err != nil {
|
||||
panic("JSON marshal error")
|
||||
|
Loading…
Reference in New Issue
Block a user