diff --git a/account.proto b/account.proto index 29c4014..6599903 100644 --- a/account.proto +++ b/account.proto @@ -3,6 +3,7 @@ syntax = "proto3"; import "google/protobuf/duration.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "items.proto"; package account; @@ -347,6 +348,8 @@ message SourceHealth { repeated string availableTypes = 11; // The scopes that this source can discover repeated string availableScopes = 12; + // AdapterMetadata is a map of metadata that the source can send to the API + repeated AdapterMetadata adapterMetadata = 13; } message ListAllSourcesStatusResponse { @@ -373,6 +376,34 @@ message SubmitSourceHeartbeatRequest { repeated string availableTypes = 8; // The scopes that this source can discover repeated string availableScopes = 9; + // AdapterMetadata is a map of metadata that the source can send to the API + repeated AdapterMetadata adapterMetadata = 10; +} + +message AdapterMetadata { + string type = 1; // rdap-domain // computer readable + AdapterCategory category = 2; // compute / storage / network / database / k8s / other + repeated string potentialLinks = 3; // The list of other types that this can be linked to, eg aws_eks_node_group -> aws_eks_cluster + string descriptiveName = 4; // RDAP Domain // human readable + string adapterDescription = 5; // full description of this item EG; "Uses RDAP to get the details of an Autonomous System Number (ASN) by number", + string getDescription = 6; // description of the Get method + string listDescription = 7; // description of the List method + string searchDescription = 8; // description of the Search method + repeated TerraformMapping terraformMappings = 9; // The terraform mappings for this adapter +} + +enum AdapterCategory { + ADAPTER_CATEGORY_OTHER = 0; + ADAPTER_CATEGORY_COMPUTE = 1; + ADAPTER_CATEGORY_STORAGE = 2; + ADAPTER_CATEGORY_NETWORK = 3; + ADAPTER_CATEGORY_SECURITY = 4; +} + +message TerraformMapping { + QueryMethod terraformMethod = 1; // eg get + string terraformQueryMap = 2; // eg ap aws_eks_node_group.arn + string terraformScope = 3; // eg ${provider_mapping.cluster_name}.${values.metadata[0].namespace} } message SubmitSourceHeartbeatResponse {}