Skip to content

Commit

Permalink
(feat) add adapter metadata to source health
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Oct 8, 2024
1 parent 9822fbf commit a574fdf
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand All @@ -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 {}
Expand Down

0 comments on commit a574fdf

Please sign in to comment.