diff --git a/examples/infrastructure-resources-example.json b/examples/infrastructure-resources-example.json new file mode 100644 index 0000000..d2f7e73 --- /dev/null +++ b/examples/infrastructure-resources-example.json @@ -0,0 +1,97 @@ +{ + "name": "auth-service", + "type": "project", + "languages": "golang", + "owner": "platform-team", + "version": "2.1.0", + "description": "Authentication and authorization service", + "repository": "https://github.com/company/auth-service", + "platform": "kubernetes", + "sla": { + "level": "critical", + "uptime_percentage": 99.99, + "response_time_ms": 100, + "description": "Mission-critical authentication service" + }, + "infrastructure_resources": [ + { + "id": "infra-1", + "name": "users-db", + "type": "database_postgresql", + "description": "Primary PostgreSQL database for user data", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "users-db.cluster-abc123.us-east-1.rds.amazonaws.com:5432", + "metadata": { + "instance_type": "db.r5.xlarge", + "storage": "500GB", + "multi_az": "true", + "backup_retention": "7 days" + } + }, + { + "id": "infra-2", + "name": "sessions-cache", + "type": "cache_redis", + "description": "Redis cache for user sessions", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "sessions-cache.abc123.cache.amazonaws.com:6379", + "metadata": { + "node_type": "cache.r5.large", + "num_nodes": "3", + "engine_version": "7.0" + } + }, + { + "id": "infra-3", + "name": "auth-secrets", + "type": "security_secrets_manager", + "description": "Secrets Manager for API keys and credentials", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "secretsmanager.us-east-1.amazonaws.com", + "metadata": { + "rotation_enabled": "true", + "rotation_days": "30" + } + }, + { + "id": "infra-4", + "name": "auth-lb", + "type": "network_load_balancer", + "description": "Application Load Balancer for auth service", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "auth-lb-123456789.us-east-1.elb.amazonaws.com", + "metadata": { + "type": "application", + "scheme": "internet-facing", + "ssl_policy": "ELBSecurityPolicy-TLS-1-2-2017-01" + } + }, + { + "id": "infra-5", + "name": "audit-logs-bucket", + "type": "storage_s3", + "description": "S3 bucket for audit logs", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "s3://audit-logs-auth-service", + "metadata": { + "versioning": "enabled", + "encryption": "AES256", + "lifecycle_policy": "90 days to Glacier" + } + } + ], + "dependencies_in": [ + "user-profile-service", + "notification-service" + ], + "dependencies_out": [ + "api-gateway", + "mobile-app", + "web-app" + ] +} diff --git a/generated/openapiv2/apidocs.swagger.json b/generated/openapiv2/apidocs.swagger.json index 087cccc..586b545 100644 --- a/generated/openapiv2/apidocs.swagger.json +++ b/generated/openapiv2/apidocs.swagger.json @@ -1168,6 +1168,14 @@ "vulnerability_summary": { "$ref": "#/definitions/v1alpha1VulnerabilitySummary", "title": "Vulnerability summary for security monitoring" + }, + "infrastructure_resources": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1alpha1InfrastructureResource" + }, + "title": "Infrastructure resources used by this service" } } }, @@ -1411,8 +1419,16 @@ }, "vulnerability_summary": { "$ref": "#/definitions/v1alpha1VulnerabilitySummary", - "description": "Note: Version management (available_versions, latest_version, reference_version) \n is handled separately via UpdateVersions endpoint", "title": "Vulnerability summary for security monitoring" + }, + "infrastructure_resources": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1alpha1InfrastructureResource" + }, + "description": "Note: Version management (available_versions, latest_version, reference_version) \n is handled separately via UpdateVersions endpoint", + "title": "Infrastructure resources used by this service" } } }, @@ -1723,6 +1739,92 @@ } } }, + "v1alpha1InfrastructureResource": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "Unique identifier for the resource" + }, + "name": { + "type": "string", + "title": "Display name (e.g., \"users-db\", \"assets-bucket\")" + }, + "type": { + "$ref": "#/definitions/v1alpha1InfrastructureType", + "title": "Type of infrastructure resource" + }, + "description": { + "type": "string", + "title": "Optional description" + }, + "provider": { + "type": "string", + "title": "Cloud provider (AWS, Azure, GCP, Scaleway, etc.)" + }, + "region": { + "type": "string", + "title": "Region/location" + }, + "endpoint": { + "type": "string", + "title": "Connection endpoint or URL" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Additional metadata (size, tier, etc.)" + }, + "connected_services": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Services that use this resource" + } + }, + "title": "Infrastructure resource (database, storage, API gateway, etc.)" + }, + "v1alpha1InfrastructureType": { + "type": "string", + "enum": [ + "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "database_rds", + "database_dynamodb", + "database_mongodb", + "database_postgresql", + "database_mysql", + "database_redis", + "database_elasticsearch", + "storage_s3", + "storage_efs", + "storage_ebs", + "network_load_balancer", + "network_api_gateway", + "network_cdn", + "network_vpc", + "network_nat_gateway", + "messaging_sqs", + "messaging_sns", + "messaging_kafka", + "messaging_rabbitmq", + "cache_redis", + "cache_memcached", + "cache_cloudfront", + "security_waf", + "security_secrets_manager", + "security_kms", + "monitoring_cloudwatch", + "monitoring_prometheus", + "monitoring_grafana", + "other_custom" + ], + "default": "INFRASTRUCTURE_TYPE_UNSPECIFIED", + "description": "AWS RDS / Azure SQL / GCP Cloud SQL\n - database_dynamodb: AWS DynamoDB / Azure Cosmos DB\n - database_mongodb: MongoDB Atlas / DocumentDB\n - database_postgresql: PostgreSQL\n - database_mysql: MySQL / MariaDB\n - database_redis: Redis / ElastiCache\n - database_elasticsearch: Elasticsearch / OpenSearch\n - storage_s3: Storage\n\nAWS S3 / Azure Blob / GCP Cloud Storage\n - storage_efs: AWS EFS / Azure Files / GCP Filestore\n - storage_ebs: AWS EBS / Azure Disk\n - network_load_balancer: Networking\n\nLoad Balancer (ALB, NLB, etc.)\n - network_api_gateway: API Gateway\n - network_cdn: CloudFront / Azure CDN / GCP CDN\n - network_vpc: VPC / Virtual Network\n - network_nat_gateway: NAT Gateway\n - messaging_sqs: Messaging \u0026 Queues\n\nAWS SQS / Azure Queue / GCP Pub/Sub\n - messaging_sns: AWS SNS / Azure Service Bus\n - messaging_kafka: Kafka / MSK / Event Hubs\n - messaging_rabbitmq: RabbitMQ / Amazon MQ\n - cache_redis: Caching\n\nRedis / ElastiCache\n - cache_memcached: Memcached\n - cache_cloudfront: CloudFront cache\n - security_waf: Security\n\nWAF (Web Application Firewall)\n - security_secrets_manager: Secrets Manager / Key Vault\n - security_kms: KMS / Key Management\n - monitoring_cloudwatch: Monitoring\n\nCloudWatch / Azure Monitor\n - monitoring_prometheus: Prometheus\n - monitoring_grafana: Grafana\n - other_custom: Other\n\nCustom infrastructure resource", + "title": "- database_rds: Databases" + }, "v1alpha1Languages": { "type": "string", "enum": [ diff --git a/generated/proto/catalog/v1alpha1/catalog.pb.go b/generated/proto/catalog/v1alpha1/catalog.pb.go index 493d193..70ca47f 100644 --- a/generated/proto/catalog/v1alpha1/catalog.pb.go +++ b/generated/proto/catalog/v1alpha1/catalog.pb.go @@ -334,6 +334,144 @@ func (Platform) EnumDescriptor() ([]byte, []int) { return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{3} } +type InfrastructureType int32 + +const ( + InfrastructureType_INFRASTRUCTURE_TYPE_UNSPECIFIED InfrastructureType = 0 + // Databases + InfrastructureType_database_rds InfrastructureType = 1 // AWS RDS / Azure SQL / GCP Cloud SQL + InfrastructureType_database_dynamodb InfrastructureType = 2 // AWS DynamoDB / Azure Cosmos DB + InfrastructureType_database_mongodb InfrastructureType = 3 // MongoDB Atlas / DocumentDB + InfrastructureType_database_postgresql InfrastructureType = 4 // PostgreSQL + InfrastructureType_database_mysql InfrastructureType = 5 // MySQL / MariaDB + InfrastructureType_database_redis InfrastructureType = 6 // Redis / ElastiCache + InfrastructureType_database_elasticsearch InfrastructureType = 7 // Elasticsearch / OpenSearch + // Storage + InfrastructureType_storage_s3 InfrastructureType = 10 // AWS S3 / Azure Blob / GCP Cloud Storage + InfrastructureType_storage_efs InfrastructureType = 11 // AWS EFS / Azure Files / GCP Filestore + InfrastructureType_storage_ebs InfrastructureType = 12 // AWS EBS / Azure Disk + // Networking + InfrastructureType_network_load_balancer InfrastructureType = 20 // Load Balancer (ALB, NLB, etc.) + InfrastructureType_network_api_gateway InfrastructureType = 21 // API Gateway + InfrastructureType_network_cdn InfrastructureType = 22 // CloudFront / Azure CDN / GCP CDN + InfrastructureType_network_vpc InfrastructureType = 23 // VPC / Virtual Network + InfrastructureType_network_nat_gateway InfrastructureType = 24 // NAT Gateway + // Messaging & Queues + InfrastructureType_messaging_sqs InfrastructureType = 30 // AWS SQS / Azure Queue / GCP Pub/Sub + InfrastructureType_messaging_sns InfrastructureType = 31 // AWS SNS / Azure Service Bus + InfrastructureType_messaging_kafka InfrastructureType = 32 // Kafka / MSK / Event Hubs + InfrastructureType_messaging_rabbitmq InfrastructureType = 33 // RabbitMQ / Amazon MQ + // Caching + InfrastructureType_cache_redis InfrastructureType = 40 // Redis / ElastiCache + InfrastructureType_cache_memcached InfrastructureType = 41 // Memcached + InfrastructureType_cache_cloudfront InfrastructureType = 42 // CloudFront cache + // Security + InfrastructureType_security_waf InfrastructureType = 50 // WAF (Web Application Firewall) + InfrastructureType_security_secrets_manager InfrastructureType = 51 // Secrets Manager / Key Vault + InfrastructureType_security_kms InfrastructureType = 52 // KMS / Key Management + // Monitoring + InfrastructureType_monitoring_cloudwatch InfrastructureType = 60 // CloudWatch / Azure Monitor + InfrastructureType_monitoring_prometheus InfrastructureType = 61 // Prometheus + InfrastructureType_monitoring_grafana InfrastructureType = 62 // Grafana + // Other + InfrastructureType_other_custom InfrastructureType = 99 // Custom infrastructure resource +) + +// Enum value maps for InfrastructureType. +var ( + InfrastructureType_name = map[int32]string{ + 0: "INFRASTRUCTURE_TYPE_UNSPECIFIED", + 1: "database_rds", + 2: "database_dynamodb", + 3: "database_mongodb", + 4: "database_postgresql", + 5: "database_mysql", + 6: "database_redis", + 7: "database_elasticsearch", + 10: "storage_s3", + 11: "storage_efs", + 12: "storage_ebs", + 20: "network_load_balancer", + 21: "network_api_gateway", + 22: "network_cdn", + 23: "network_vpc", + 24: "network_nat_gateway", + 30: "messaging_sqs", + 31: "messaging_sns", + 32: "messaging_kafka", + 33: "messaging_rabbitmq", + 40: "cache_redis", + 41: "cache_memcached", + 42: "cache_cloudfront", + 50: "security_waf", + 51: "security_secrets_manager", + 52: "security_kms", + 60: "monitoring_cloudwatch", + 61: "monitoring_prometheus", + 62: "monitoring_grafana", + 99: "other_custom", + } + InfrastructureType_value = map[string]int32{ + "INFRASTRUCTURE_TYPE_UNSPECIFIED": 0, + "database_rds": 1, + "database_dynamodb": 2, + "database_mongodb": 3, + "database_postgresql": 4, + "database_mysql": 5, + "database_redis": 6, + "database_elasticsearch": 7, + "storage_s3": 10, + "storage_efs": 11, + "storage_ebs": 12, + "network_load_balancer": 20, + "network_api_gateway": 21, + "network_cdn": 22, + "network_vpc": 23, + "network_nat_gateway": 24, + "messaging_sqs": 30, + "messaging_sns": 31, + "messaging_kafka": 32, + "messaging_rabbitmq": 33, + "cache_redis": 40, + "cache_memcached": 41, + "cache_cloudfront": 42, + "security_waf": 50, + "security_secrets_manager": 51, + "security_kms": 52, + "monitoring_cloudwatch": 60, + "monitoring_prometheus": 61, + "monitoring_grafana": 62, + "other_custom": 99, + } +) + +func (x InfrastructureType) Enum() *InfrastructureType { + p := new(InfrastructureType) + *p = x + return p +} + +func (x InfrastructureType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InfrastructureType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_catalog_v1alpha1_catalog_proto_enumTypes[4].Descriptor() +} + +func (InfrastructureType) Type() protoreflect.EnumType { + return &file_proto_catalog_v1alpha1_catalog_proto_enumTypes[4] +} + +func (x InfrastructureType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InfrastructureType.Descriptor instead. +func (InfrastructureType) EnumDescriptor() ([]byte, []int) { + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{4} +} + type CommunicationType int32 const ( @@ -379,11 +517,11 @@ func (x CommunicationType) String() string { } func (CommunicationType) Descriptor() protoreflect.EnumDescriptor { - return file_proto_catalog_v1alpha1_catalog_proto_enumTypes[4].Descriptor() + return file_proto_catalog_v1alpha1_catalog_proto_enumTypes[5].Descriptor() } func (CommunicationType) Type() protoreflect.EnumType { - return &file_proto_catalog_v1alpha1_catalog_proto_enumTypes[4] + return &file_proto_catalog_v1alpha1_catalog_proto_enumTypes[5] } func (x CommunicationType) Number() protoreflect.EnumNumber { @@ -392,7 +530,7 @@ func (x CommunicationType) Number() protoreflect.EnumNumber { // Deprecated: Use CommunicationType.Descriptor instead. func (CommunicationType) EnumDescriptor() ([]byte, []int) { - return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{4} + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{5} } type DashboardType int32 @@ -449,11 +587,11 @@ func (x DashboardType) String() string { } func (DashboardType) Descriptor() protoreflect.EnumDescriptor { - return file_proto_catalog_v1alpha1_catalog_proto_enumTypes[5].Descriptor() + return file_proto_catalog_v1alpha1_catalog_proto_enumTypes[6].Descriptor() } func (DashboardType) Type() protoreflect.EnumType { - return &file_proto_catalog_v1alpha1_catalog_proto_enumTypes[5] + return &file_proto_catalog_v1alpha1_catalog_proto_enumTypes[6] } func (x DashboardType) Number() protoreflect.EnumNumber { @@ -462,7 +600,7 @@ func (x DashboardType) Number() protoreflect.EnumNumber { // Deprecated: Use DashboardType.Descriptor instead. func (DashboardType) EnumDescriptor() ([]byte, []int) { - return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{5} + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{6} } type Catalog struct { @@ -493,8 +631,10 @@ type Catalog struct { DashboardLinks []*DashboardLink `protobuf:"bytes,20,rep,name=dashboard_links,json=dashboardLinks,proto3" json:"dashboard_links,omitempty"` // Vulnerability summary for security monitoring VulnerabilitySummary *VulnerabilitySummary `protobuf:"bytes,21,opt,name=vulnerability_summary,json=vulnerabilitySummary,proto3" json:"vulnerability_summary,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Infrastructure resources used by this service + InfrastructureResources []*InfrastructureResource `protobuf:"bytes,22,rep,name=infrastructure_resources,json=infrastructureResources,proto3" json:"infrastructure_resources,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Catalog) Reset() { @@ -674,6 +814,13 @@ func (x *Catalog) GetVulnerabilitySummary() *VulnerabilitySummary { return nil } +func (x *Catalog) GetInfrastructureResources() []*InfrastructureResource { + if x != nil { + return x.InfrastructureResources + } + return nil +} + type CreateUpdateCatalogRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -698,8 +845,10 @@ type CreateUpdateCatalogRequest struct { DashboardLinks []*DashboardLink `protobuf:"bytes,17,rep,name=dashboard_links,json=dashboardLinks,proto3" json:"dashboard_links,omitempty"` // Vulnerability summary for security monitoring VulnerabilitySummary *VulnerabilitySummary `protobuf:"bytes,18,opt,name=vulnerability_summary,json=vulnerabilitySummary,proto3" json:"vulnerability_summary,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Infrastructure resources used by this service + InfrastructureResources []*InfrastructureResource `protobuf:"bytes,19,rep,name=infrastructure_resources,json=infrastructureResources,proto3" json:"infrastructure_resources,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateUpdateCatalogRequest) Reset() { @@ -858,6 +1007,13 @@ func (x *CreateUpdateCatalogRequest) GetVulnerabilitySummary() *VulnerabilitySum return nil } +func (x *CreateUpdateCatalogRequest) GetInfrastructureResources() []*InfrastructureResource { + if x != nil { + return x.InfrastructureResources + } + return nil +} + type CreateUpdateCatalogResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Catalog *Catalog `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"` @@ -1971,6 +2127,115 @@ func (x *UsedDeliverable) GetDescription() string { return "" } +// Infrastructure resource (database, storage, API gateway, etc.) +type InfrastructureResource struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the resource + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Display name (e.g., "users-db", "assets-bucket") + Type InfrastructureType `protobuf:"varint,3,opt,name=type,proto3,enum=tracker.catalog.v1alpha1.InfrastructureType" json:"type,omitempty"` // Type of infrastructure resource + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // Optional description + Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider,omitempty"` // Cloud provider (AWS, Azure, GCP, Scaleway, etc.) + Region string `protobuf:"bytes,6,opt,name=region,proto3" json:"region,omitempty"` // Region/location + Endpoint string `protobuf:"bytes,7,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // Connection endpoint or URL + Metadata map[string]string `protobuf:"bytes,8,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Additional metadata (size, tier, etc.) + ConnectedServices []string `protobuf:"bytes,9,rep,name=connected_services,json=connectedServices,proto3" json:"connected_services,omitempty"` // Services that use this resource + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InfrastructureResource) Reset() { + *x = InfrastructureResource{} + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InfrastructureResource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InfrastructureResource) ProtoMessage() {} + +func (x *InfrastructureResource) ProtoReflect() protoreflect.Message { + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InfrastructureResource.ProtoReflect.Descriptor instead. +func (*InfrastructureResource) Descriptor() ([]byte, []int) { + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{21} +} + +func (x *InfrastructureResource) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *InfrastructureResource) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InfrastructureResource) GetType() InfrastructureType { + if x != nil { + return x.Type + } + return InfrastructureType_INFRASTRUCTURE_TYPE_UNSPECIFIED +} + +func (x *InfrastructureResource) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *InfrastructureResource) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +func (x *InfrastructureResource) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *InfrastructureResource) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *InfrastructureResource) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *InfrastructureResource) GetConnectedServices() []string { + if x != nil { + return x.ConnectedServices + } + return nil +} + // Communication channel for a service type CommunicationChannel struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -1984,7 +2249,7 @@ type CommunicationChannel struct { func (x *CommunicationChannel) Reset() { *x = CommunicationChannel{} - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[21] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1996,7 +2261,7 @@ func (x *CommunicationChannel) String() string { func (*CommunicationChannel) ProtoMessage() {} func (x *CommunicationChannel) ProtoReflect() protoreflect.Message { - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[21] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2009,7 +2274,7 @@ func (x *CommunicationChannel) ProtoReflect() protoreflect.Message { // Deprecated: Use CommunicationChannel.ProtoReflect.Descriptor instead. func (*CommunicationChannel) Descriptor() ([]byte, []int) { - return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{21} + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{22} } func (x *CommunicationChannel) GetType() CommunicationType { @@ -2053,7 +2318,7 @@ type DashboardLink struct { func (x *DashboardLink) Reset() { *x = DashboardLink{} - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[22] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2065,7 +2330,7 @@ func (x *DashboardLink) String() string { func (*DashboardLink) ProtoMessage() {} func (x *DashboardLink) ProtoReflect() protoreflect.Message { - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[22] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2078,7 +2343,7 @@ func (x *DashboardLink) ProtoReflect() protoreflect.Message { // Deprecated: Use DashboardLink.ProtoReflect.Descriptor instead. func (*DashboardLink) Descriptor() ([]byte, []int) { - return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{22} + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{23} } func (x *DashboardLink) GetType() DashboardType { @@ -2126,7 +2391,7 @@ type VulnerabilitySummary struct { func (x *VulnerabilitySummary) Reset() { *x = VulnerabilitySummary{} - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[23] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2138,7 +2403,7 @@ func (x *VulnerabilitySummary) String() string { func (*VulnerabilitySummary) ProtoMessage() {} func (x *VulnerabilitySummary) ProtoReflect() protoreflect.Message { - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[23] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2151,7 +2416,7 @@ func (x *VulnerabilitySummary) ProtoReflect() protoreflect.Message { // Deprecated: Use VulnerabilitySummary.ProtoReflect.Descriptor instead. func (*VulnerabilitySummary) Descriptor() ([]byte, []int) { - return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{23} + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{24} } func (x *VulnerabilitySummary) GetCriticalCount() int32 { @@ -2231,7 +2496,7 @@ type VulnerabilitySource struct { func (x *VulnerabilitySource) Reset() { *x = VulnerabilitySource{} - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[24] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2243,7 +2508,7 @@ func (x *VulnerabilitySource) String() string { func (*VulnerabilitySource) ProtoMessage() {} func (x *VulnerabilitySource) ProtoReflect() protoreflect.Message { - mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[24] + mi := &file_proto_catalog_v1alpha1_catalog_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2256,7 +2521,7 @@ func (x *VulnerabilitySource) ProtoReflect() protoreflect.Message { // Deprecated: Use VulnerabilitySource.ProtoReflect.Descriptor instead. func (*VulnerabilitySource) Descriptor() ([]byte, []int) { - return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{24} + return file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP(), []int{25} } func (x *VulnerabilitySource) GetName() string { @@ -2347,7 +2612,7 @@ var File_proto_catalog_v1alpha1_catalog_proto protoreflect.FileDescriptor const file_proto_catalog_v1alpha1_catalog_proto_rawDesc = "" + "\n" + - "$proto/catalog/v1alpha1/catalog.proto\x12\x18tracker.catalog.v1alpha1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xce\b\n" + + "$proto/catalog/v1alpha1/catalog.proto\x12\x18tracker.catalog.v1alpha1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xbb\t\n" + "\aCatalog\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x122\n" + "\x04type\x18\x02 \x01(\x0e2\x1e.tracker.catalog.v1alpha1.TypeR\x04type\x12A\n" + @@ -2374,7 +2639,8 @@ const file_proto_catalog_v1alpha1_catalog_proto_rawDesc = "" + "\x11used_deliverables\x18\x12 \x03(\v2).tracker.catalog.v1alpha1.UsedDeliverableR\x10usedDeliverables\x12e\n" + "\x16communication_channels\x18\x13 \x03(\v2..tracker.catalog.v1alpha1.CommunicationChannelR\x15communicationChannels\x12P\n" + "\x0fdashboard_links\x18\x14 \x03(\v2'.tracker.catalog.v1alpha1.DashboardLinkR\x0edashboardLinks\x12c\n" + - "\x15vulnerability_summary\x18\x15 \x01(\v2..tracker.catalog.v1alpha1.VulnerabilitySummaryR\x14vulnerabilitySummary\"\xde\a\n" + + "\x15vulnerability_summary\x18\x15 \x01(\v2..tracker.catalog.v1alpha1.VulnerabilitySummaryR\x14vulnerabilitySummary\x12k\n" + + "\x18infrastructure_resources\x18\x16 \x03(\v20.tracker.catalog.v1alpha1.InfrastructureResourceR\x17infrastructureResources\"\xcb\b\n" + "\x1aCreateUpdateCatalogRequest\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x122\n" + "\x04type\x18\x02 \x01(\x0e2\x1e.tracker.catalog.v1alpha1.TypeR\x04type\x12A\n" + @@ -2398,7 +2664,8 @@ const file_proto_catalog_v1alpha1_catalog_proto_rawDesc = "" + "\x11used_deliverables\x18\x0f \x03(\v2).tracker.catalog.v1alpha1.UsedDeliverableR\x10usedDeliverables\x12e\n" + "\x16communication_channels\x18\x10 \x03(\v2..tracker.catalog.v1alpha1.CommunicationChannelR\x15communicationChannels\x12P\n" + "\x0fdashboard_links\x18\x11 \x03(\v2'.tracker.catalog.v1alpha1.DashboardLinkR\x0edashboardLinks\x12c\n" + - "\x15vulnerability_summary\x18\x12 \x01(\v2..tracker.catalog.v1alpha1.VulnerabilitySummaryR\x14vulnerabilitySummary\"Z\n" + + "\x15vulnerability_summary\x18\x12 \x01(\v2..tracker.catalog.v1alpha1.VulnerabilitySummaryR\x14vulnerabilitySummary\x12k\n" + + "\x18infrastructure_resources\x18\x13 \x03(\v20.tracker.catalog.v1alpha1.InfrastructureResourceR\x17infrastructureResources\"Z\n" + "\x1bCreateUpdateCatalogResponse\x12;\n" + "\acatalog\x18\x01 \x01(\v2!.tracker.catalog.v1alpha1.CatalogR\acatalog\"'\n" + "\x11GetCatalogRequest\x12\x12\n" + @@ -2473,7 +2740,20 @@ const file_proto_catalog_v1alpha1_catalog_proto_rawDesc = "" + "\x04name\x18\x01 \x01(\tR\x04name\x122\n" + "\x04type\x18\x02 \x01(\x0e2\x1e.tracker.catalog.v1alpha1.TypeR\x04type\x12!\n" + "\fversion_used\x18\x03 \x01(\tR\vversionUsed\x12 \n" + - "\vdescription\x18\x04 \x01(\tR\vdescription\"\x9f\x01\n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\"\xb8\x03\n" + + "\x16InfrastructureResource\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12@\n" + + "\x04type\x18\x03 \x01(\x0e2,.tracker.catalog.v1alpha1.InfrastructureTypeR\x04type\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12\x1a\n" + + "\bprovider\x18\x05 \x01(\tR\bprovider\x12\x16\n" + + "\x06region\x18\x06 \x01(\tR\x06region\x12\x1a\n" + + "\bendpoint\x18\a \x01(\tR\bendpoint\x12Z\n" + + "\bmetadata\x18\b \x03(\v2>.tracker.catalog.v1alpha1.InfrastructureResource.MetadataEntryR\bmetadata\x12-\n" + + "\x12connected_services\x18\t \x03(\tR\x11connectedServices\x1a;\n" + + "\rMetadataEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x9f\x01\n" + "\x14CommunicationChannel\x12?\n" + "\x04type\x18\x01 \x01(\x0e2+.tracker.catalog.v1alpha1.CommunicationTypeR\x04type\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" + @@ -2581,7 +2861,40 @@ const file_proto_catalog_v1alpha1_catalog_proto_rawDesc = "" + "on_premise\x10\x10\x12\n" + "\n" + "\x06hybrid\x10\x11\x12\x0f\n" + - "\vmulti_cloud\x10\x12*\x83\x01\n" + + "\vmulti_cloud\x10\x12*\xa7\x05\n" + + "\x12InfrastructureType\x12#\n" + + "\x1fINFRASTRUCTURE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n" + + "\fdatabase_rds\x10\x01\x12\x15\n" + + "\x11database_dynamodb\x10\x02\x12\x14\n" + + "\x10database_mongodb\x10\x03\x12\x17\n" + + "\x13database_postgresql\x10\x04\x12\x12\n" + + "\x0edatabase_mysql\x10\x05\x12\x12\n" + + "\x0edatabase_redis\x10\x06\x12\x1a\n" + + "\x16database_elasticsearch\x10\a\x12\x0e\n" + + "\n" + + "storage_s3\x10\n" + + "\x12\x0f\n" + + "\vstorage_efs\x10\v\x12\x0f\n" + + "\vstorage_ebs\x10\f\x12\x19\n" + + "\x15network_load_balancer\x10\x14\x12\x17\n" + + "\x13network_api_gateway\x10\x15\x12\x0f\n" + + "\vnetwork_cdn\x10\x16\x12\x0f\n" + + "\vnetwork_vpc\x10\x17\x12\x17\n" + + "\x13network_nat_gateway\x10\x18\x12\x11\n" + + "\rmessaging_sqs\x10\x1e\x12\x11\n" + + "\rmessaging_sns\x10\x1f\x12\x13\n" + + "\x0fmessaging_kafka\x10 \x12\x16\n" + + "\x12messaging_rabbitmq\x10!\x12\x0f\n" + + "\vcache_redis\x10(\x12\x13\n" + + "\x0fcache_memcached\x10)\x12\x14\n" + + "\x10cache_cloudfront\x10*\x12\x10\n" + + "\fsecurity_waf\x102\x12\x1c\n" + + "\x18security_secrets_manager\x103\x12\x10\n" + + "\fsecurity_kms\x104\x12\x19\n" + + "\x15monitoring_cloudwatch\x10<\x12\x19\n" + + "\x15monitoring_prometheus\x10=\x12\x16\n" + + "\x12monitoring_grafana\x10>\x12\x10\n" + + "\fother_custom\x10c*\x83\x01\n" + "\x11CommunicationType\x12\"\n" + "\x1eCOMMUNICATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n" + "\x05slack\x10\x01\x12\t\n" + @@ -2628,108 +2941,115 @@ func file_proto_catalog_v1alpha1_catalog_proto_rawDescGZIP() []byte { return file_proto_catalog_v1alpha1_catalog_proto_rawDescData } -var file_proto_catalog_v1alpha1_catalog_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_proto_catalog_v1alpha1_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_proto_catalog_v1alpha1_catalog_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_proto_catalog_v1alpha1_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_proto_catalog_v1alpha1_catalog_proto_goTypes = []any{ (Type)(0), // 0: tracker.catalog.v1alpha1.Type (Languages)(0), // 1: tracker.catalog.v1alpha1.Languages (SLALevel)(0), // 2: tracker.catalog.v1alpha1.SLALevel (Platform)(0), // 3: tracker.catalog.v1alpha1.Platform - (CommunicationType)(0), // 4: tracker.catalog.v1alpha1.CommunicationType - (DashboardType)(0), // 5: tracker.catalog.v1alpha1.DashboardType - (*Catalog)(nil), // 6: tracker.catalog.v1alpha1.Catalog - (*CreateUpdateCatalogRequest)(nil), // 7: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest - (*CreateUpdateCatalogResponse)(nil), // 8: tracker.catalog.v1alpha1.CreateUpdateCatalogResponse - (*GetCatalogRequest)(nil), // 9: tracker.catalog.v1alpha1.GetCatalogRequest - (*GetCatalogResponse)(nil), // 10: tracker.catalog.v1alpha1.GetCatalogResponse - (*DeleteCatalogRequest)(nil), // 11: tracker.catalog.v1alpha1.DeleteCatalogRequest - (*DeleteCatalogResponse)(nil), // 12: tracker.catalog.v1alpha1.DeleteCatalogResponse - (*ListCatalogsRequest)(nil), // 13: tracker.catalog.v1alpha1.ListCatalogsRequest - (*ListCatalogsResponse)(nil), // 14: tracker.catalog.v1alpha1.ListCatalogsResponse - (*GetVersionComplianceRequest)(nil), // 15: tracker.catalog.v1alpha1.GetVersionComplianceRequest - (*GetVersionComplianceResponse)(nil), // 16: tracker.catalog.v1alpha1.GetVersionComplianceResponse - (*ProjectCompliance)(nil), // 17: tracker.catalog.v1alpha1.ProjectCompliance - (*DeliverableUsage)(nil), // 18: tracker.catalog.v1alpha1.DeliverableUsage - (*ComplianceSummary)(nil), // 19: tracker.catalog.v1alpha1.ComplianceSummary - (*DeliverableComplianceStats)(nil), // 20: tracker.catalog.v1alpha1.DeliverableComplianceStats - (*SLA)(nil), // 21: tracker.catalog.v1alpha1.SLA - (*UpdateVersionsRequest)(nil), // 22: tracker.catalog.v1alpha1.UpdateVersionsRequest - (*UpdateVersionsResponse)(nil), // 23: tracker.catalog.v1alpha1.UpdateVersionsResponse - (*UpdateDependenciesRequest)(nil), // 24: tracker.catalog.v1alpha1.UpdateDependenciesRequest - (*UpdateDependenciesResponse)(nil), // 25: tracker.catalog.v1alpha1.UpdateDependenciesResponse - (*UsedDeliverable)(nil), // 26: tracker.catalog.v1alpha1.UsedDeliverable - (*CommunicationChannel)(nil), // 27: tracker.catalog.v1alpha1.CommunicationChannel - (*DashboardLink)(nil), // 28: tracker.catalog.v1alpha1.DashboardLink - (*VulnerabilitySummary)(nil), // 29: tracker.catalog.v1alpha1.VulnerabilitySummary - (*VulnerabilitySource)(nil), // 30: tracker.catalog.v1alpha1.VulnerabilitySource - (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp - (*wrapperspb.UInt32Value)(nil), // 32: google.protobuf.UInt32Value - (*wrapperspb.Int32Value)(nil), // 33: google.protobuf.Int32Value - (*wrapperspb.DoubleValue)(nil), // 34: google.protobuf.DoubleValue + (InfrastructureType)(0), // 4: tracker.catalog.v1alpha1.InfrastructureType + (CommunicationType)(0), // 5: tracker.catalog.v1alpha1.CommunicationType + (DashboardType)(0), // 6: tracker.catalog.v1alpha1.DashboardType + (*Catalog)(nil), // 7: tracker.catalog.v1alpha1.Catalog + (*CreateUpdateCatalogRequest)(nil), // 8: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest + (*CreateUpdateCatalogResponse)(nil), // 9: tracker.catalog.v1alpha1.CreateUpdateCatalogResponse + (*GetCatalogRequest)(nil), // 10: tracker.catalog.v1alpha1.GetCatalogRequest + (*GetCatalogResponse)(nil), // 11: tracker.catalog.v1alpha1.GetCatalogResponse + (*DeleteCatalogRequest)(nil), // 12: tracker.catalog.v1alpha1.DeleteCatalogRequest + (*DeleteCatalogResponse)(nil), // 13: tracker.catalog.v1alpha1.DeleteCatalogResponse + (*ListCatalogsRequest)(nil), // 14: tracker.catalog.v1alpha1.ListCatalogsRequest + (*ListCatalogsResponse)(nil), // 15: tracker.catalog.v1alpha1.ListCatalogsResponse + (*GetVersionComplianceRequest)(nil), // 16: tracker.catalog.v1alpha1.GetVersionComplianceRequest + (*GetVersionComplianceResponse)(nil), // 17: tracker.catalog.v1alpha1.GetVersionComplianceResponse + (*ProjectCompliance)(nil), // 18: tracker.catalog.v1alpha1.ProjectCompliance + (*DeliverableUsage)(nil), // 19: tracker.catalog.v1alpha1.DeliverableUsage + (*ComplianceSummary)(nil), // 20: tracker.catalog.v1alpha1.ComplianceSummary + (*DeliverableComplianceStats)(nil), // 21: tracker.catalog.v1alpha1.DeliverableComplianceStats + (*SLA)(nil), // 22: tracker.catalog.v1alpha1.SLA + (*UpdateVersionsRequest)(nil), // 23: tracker.catalog.v1alpha1.UpdateVersionsRequest + (*UpdateVersionsResponse)(nil), // 24: tracker.catalog.v1alpha1.UpdateVersionsResponse + (*UpdateDependenciesRequest)(nil), // 25: tracker.catalog.v1alpha1.UpdateDependenciesRequest + (*UpdateDependenciesResponse)(nil), // 26: tracker.catalog.v1alpha1.UpdateDependenciesResponse + (*UsedDeliverable)(nil), // 27: tracker.catalog.v1alpha1.UsedDeliverable + (*InfrastructureResource)(nil), // 28: tracker.catalog.v1alpha1.InfrastructureResource + (*CommunicationChannel)(nil), // 29: tracker.catalog.v1alpha1.CommunicationChannel + (*DashboardLink)(nil), // 30: tracker.catalog.v1alpha1.DashboardLink + (*VulnerabilitySummary)(nil), // 31: tracker.catalog.v1alpha1.VulnerabilitySummary + (*VulnerabilitySource)(nil), // 32: tracker.catalog.v1alpha1.VulnerabilitySource + nil, // 33: tracker.catalog.v1alpha1.InfrastructureResource.MetadataEntry + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp + (*wrapperspb.UInt32Value)(nil), // 35: google.protobuf.UInt32Value + (*wrapperspb.Int32Value)(nil), // 36: google.protobuf.Int32Value + (*wrapperspb.DoubleValue)(nil), // 37: google.protobuf.DoubleValue } var file_proto_catalog_v1alpha1_catalog_proto_depIdxs = []int32{ 0, // 0: tracker.catalog.v1alpha1.Catalog.type:type_name -> tracker.catalog.v1alpha1.Type 1, // 1: tracker.catalog.v1alpha1.Catalog.languages:type_name -> tracker.catalog.v1alpha1.Languages - 31, // 2: tracker.catalog.v1alpha1.Catalog.created_at:type_name -> google.protobuf.Timestamp - 31, // 3: tracker.catalog.v1alpha1.Catalog.updated_at:type_name -> google.protobuf.Timestamp - 21, // 4: tracker.catalog.v1alpha1.Catalog.sla:type_name -> tracker.catalog.v1alpha1.SLA + 34, // 2: tracker.catalog.v1alpha1.Catalog.created_at:type_name -> google.protobuf.Timestamp + 34, // 3: tracker.catalog.v1alpha1.Catalog.updated_at:type_name -> google.protobuf.Timestamp + 22, // 4: tracker.catalog.v1alpha1.Catalog.sla:type_name -> tracker.catalog.v1alpha1.SLA 3, // 5: tracker.catalog.v1alpha1.Catalog.platform:type_name -> tracker.catalog.v1alpha1.Platform - 26, // 6: tracker.catalog.v1alpha1.Catalog.used_deliverables:type_name -> tracker.catalog.v1alpha1.UsedDeliverable - 27, // 7: tracker.catalog.v1alpha1.Catalog.communication_channels:type_name -> tracker.catalog.v1alpha1.CommunicationChannel - 28, // 8: tracker.catalog.v1alpha1.Catalog.dashboard_links:type_name -> tracker.catalog.v1alpha1.DashboardLink - 29, // 9: tracker.catalog.v1alpha1.Catalog.vulnerability_summary:type_name -> tracker.catalog.v1alpha1.VulnerabilitySummary - 0, // 10: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.type:type_name -> tracker.catalog.v1alpha1.Type - 1, // 11: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.languages:type_name -> tracker.catalog.v1alpha1.Languages - 31, // 12: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.created_at:type_name -> google.protobuf.Timestamp - 31, // 13: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.updated_at:type_name -> google.protobuf.Timestamp - 21, // 14: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.sla:type_name -> tracker.catalog.v1alpha1.SLA - 3, // 15: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.platform:type_name -> tracker.catalog.v1alpha1.Platform - 26, // 16: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.used_deliverables:type_name -> tracker.catalog.v1alpha1.UsedDeliverable - 27, // 17: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.communication_channels:type_name -> tracker.catalog.v1alpha1.CommunicationChannel - 28, // 18: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.dashboard_links:type_name -> tracker.catalog.v1alpha1.DashboardLink - 29, // 19: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.vulnerability_summary:type_name -> tracker.catalog.v1alpha1.VulnerabilitySummary - 6, // 20: tracker.catalog.v1alpha1.CreateUpdateCatalogResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog - 6, // 21: tracker.catalog.v1alpha1.GetCatalogResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog - 32, // 22: tracker.catalog.v1alpha1.ListCatalogsRequest.per_page:type_name -> google.protobuf.UInt32Value - 33, // 23: tracker.catalog.v1alpha1.ListCatalogsRequest.page:type_name -> google.protobuf.Int32Value - 6, // 24: tracker.catalog.v1alpha1.ListCatalogsResponse.catalogs:type_name -> tracker.catalog.v1alpha1.Catalog - 0, // 25: tracker.catalog.v1alpha1.GetVersionComplianceRequest.types:type_name -> tracker.catalog.v1alpha1.Type - 17, // 26: tracker.catalog.v1alpha1.GetVersionComplianceResponse.projects:type_name -> tracker.catalog.v1alpha1.ProjectCompliance - 19, // 27: tracker.catalog.v1alpha1.GetVersionComplianceResponse.summary:type_name -> tracker.catalog.v1alpha1.ComplianceSummary - 18, // 28: tracker.catalog.v1alpha1.ProjectCompliance.deliverables:type_name -> tracker.catalog.v1alpha1.DeliverableUsage - 0, // 29: tracker.catalog.v1alpha1.DeliverableUsage.type:type_name -> tracker.catalog.v1alpha1.Type - 20, // 30: tracker.catalog.v1alpha1.ComplianceSummary.deliverable_stats:type_name -> tracker.catalog.v1alpha1.DeliverableComplianceStats - 0, // 31: tracker.catalog.v1alpha1.DeliverableComplianceStats.type:type_name -> tracker.catalog.v1alpha1.Type - 2, // 32: tracker.catalog.v1alpha1.SLA.level:type_name -> tracker.catalog.v1alpha1.SLALevel - 34, // 33: tracker.catalog.v1alpha1.SLA.uptime_percentage:type_name -> google.protobuf.DoubleValue - 32, // 34: tracker.catalog.v1alpha1.SLA.response_time_ms:type_name -> google.protobuf.UInt32Value - 6, // 35: tracker.catalog.v1alpha1.UpdateVersionsResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog - 6, // 36: tracker.catalog.v1alpha1.UpdateDependenciesResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog - 0, // 37: tracker.catalog.v1alpha1.UsedDeliverable.type:type_name -> tracker.catalog.v1alpha1.Type - 4, // 38: tracker.catalog.v1alpha1.CommunicationChannel.type:type_name -> tracker.catalog.v1alpha1.CommunicationType - 5, // 39: tracker.catalog.v1alpha1.DashboardLink.type:type_name -> tracker.catalog.v1alpha1.DashboardType - 31, // 40: tracker.catalog.v1alpha1.VulnerabilitySummary.last_updated:type_name -> google.protobuf.Timestamp - 30, // 41: tracker.catalog.v1alpha1.VulnerabilitySummary.sources:type_name -> tracker.catalog.v1alpha1.VulnerabilitySource - 31, // 42: tracker.catalog.v1alpha1.VulnerabilitySource.last_scan:type_name -> google.protobuf.Timestamp - 7, // 43: tracker.catalog.v1alpha1.CatalogService.CreateUpdateCatalog:input_type -> tracker.catalog.v1alpha1.CreateUpdateCatalogRequest - 9, // 44: tracker.catalog.v1alpha1.CatalogService.GetCatalog:input_type -> tracker.catalog.v1alpha1.GetCatalogRequest - 11, // 45: tracker.catalog.v1alpha1.CatalogService.DeleteCatalog:input_type -> tracker.catalog.v1alpha1.DeleteCatalogRequest - 13, // 46: tracker.catalog.v1alpha1.CatalogService.ListCatalogs:input_type -> tracker.catalog.v1alpha1.ListCatalogsRequest - 15, // 47: tracker.catalog.v1alpha1.CatalogService.GetVersionCompliance:input_type -> tracker.catalog.v1alpha1.GetVersionComplianceRequest - 22, // 48: tracker.catalog.v1alpha1.CatalogService.UpdateVersions:input_type -> tracker.catalog.v1alpha1.UpdateVersionsRequest - 24, // 49: tracker.catalog.v1alpha1.CatalogService.UpdateDependencies:input_type -> tracker.catalog.v1alpha1.UpdateDependenciesRequest - 8, // 50: tracker.catalog.v1alpha1.CatalogService.CreateUpdateCatalog:output_type -> tracker.catalog.v1alpha1.CreateUpdateCatalogResponse - 10, // 51: tracker.catalog.v1alpha1.CatalogService.GetCatalog:output_type -> tracker.catalog.v1alpha1.GetCatalogResponse - 12, // 52: tracker.catalog.v1alpha1.CatalogService.DeleteCatalog:output_type -> tracker.catalog.v1alpha1.DeleteCatalogResponse - 14, // 53: tracker.catalog.v1alpha1.CatalogService.ListCatalogs:output_type -> tracker.catalog.v1alpha1.ListCatalogsResponse - 16, // 54: tracker.catalog.v1alpha1.CatalogService.GetVersionCompliance:output_type -> tracker.catalog.v1alpha1.GetVersionComplianceResponse - 23, // 55: tracker.catalog.v1alpha1.CatalogService.UpdateVersions:output_type -> tracker.catalog.v1alpha1.UpdateVersionsResponse - 25, // 56: tracker.catalog.v1alpha1.CatalogService.UpdateDependencies:output_type -> tracker.catalog.v1alpha1.UpdateDependenciesResponse - 50, // [50:57] is the sub-list for method output_type - 43, // [43:50] is the sub-list for method input_type - 43, // [43:43] is the sub-list for extension type_name - 43, // [43:43] is the sub-list for extension extendee - 0, // [0:43] is the sub-list for field type_name + 27, // 6: tracker.catalog.v1alpha1.Catalog.used_deliverables:type_name -> tracker.catalog.v1alpha1.UsedDeliverable + 29, // 7: tracker.catalog.v1alpha1.Catalog.communication_channels:type_name -> tracker.catalog.v1alpha1.CommunicationChannel + 30, // 8: tracker.catalog.v1alpha1.Catalog.dashboard_links:type_name -> tracker.catalog.v1alpha1.DashboardLink + 31, // 9: tracker.catalog.v1alpha1.Catalog.vulnerability_summary:type_name -> tracker.catalog.v1alpha1.VulnerabilitySummary + 28, // 10: tracker.catalog.v1alpha1.Catalog.infrastructure_resources:type_name -> tracker.catalog.v1alpha1.InfrastructureResource + 0, // 11: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.type:type_name -> tracker.catalog.v1alpha1.Type + 1, // 12: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.languages:type_name -> tracker.catalog.v1alpha1.Languages + 34, // 13: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.created_at:type_name -> google.protobuf.Timestamp + 34, // 14: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.updated_at:type_name -> google.protobuf.Timestamp + 22, // 15: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.sla:type_name -> tracker.catalog.v1alpha1.SLA + 3, // 16: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.platform:type_name -> tracker.catalog.v1alpha1.Platform + 27, // 17: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.used_deliverables:type_name -> tracker.catalog.v1alpha1.UsedDeliverable + 29, // 18: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.communication_channels:type_name -> tracker.catalog.v1alpha1.CommunicationChannel + 30, // 19: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.dashboard_links:type_name -> tracker.catalog.v1alpha1.DashboardLink + 31, // 20: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.vulnerability_summary:type_name -> tracker.catalog.v1alpha1.VulnerabilitySummary + 28, // 21: tracker.catalog.v1alpha1.CreateUpdateCatalogRequest.infrastructure_resources:type_name -> tracker.catalog.v1alpha1.InfrastructureResource + 7, // 22: tracker.catalog.v1alpha1.CreateUpdateCatalogResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog + 7, // 23: tracker.catalog.v1alpha1.GetCatalogResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog + 35, // 24: tracker.catalog.v1alpha1.ListCatalogsRequest.per_page:type_name -> google.protobuf.UInt32Value + 36, // 25: tracker.catalog.v1alpha1.ListCatalogsRequest.page:type_name -> google.protobuf.Int32Value + 7, // 26: tracker.catalog.v1alpha1.ListCatalogsResponse.catalogs:type_name -> tracker.catalog.v1alpha1.Catalog + 0, // 27: tracker.catalog.v1alpha1.GetVersionComplianceRequest.types:type_name -> tracker.catalog.v1alpha1.Type + 18, // 28: tracker.catalog.v1alpha1.GetVersionComplianceResponse.projects:type_name -> tracker.catalog.v1alpha1.ProjectCompliance + 20, // 29: tracker.catalog.v1alpha1.GetVersionComplianceResponse.summary:type_name -> tracker.catalog.v1alpha1.ComplianceSummary + 19, // 30: tracker.catalog.v1alpha1.ProjectCompliance.deliverables:type_name -> tracker.catalog.v1alpha1.DeliverableUsage + 0, // 31: tracker.catalog.v1alpha1.DeliverableUsage.type:type_name -> tracker.catalog.v1alpha1.Type + 21, // 32: tracker.catalog.v1alpha1.ComplianceSummary.deliverable_stats:type_name -> tracker.catalog.v1alpha1.DeliverableComplianceStats + 0, // 33: tracker.catalog.v1alpha1.DeliverableComplianceStats.type:type_name -> tracker.catalog.v1alpha1.Type + 2, // 34: tracker.catalog.v1alpha1.SLA.level:type_name -> tracker.catalog.v1alpha1.SLALevel + 37, // 35: tracker.catalog.v1alpha1.SLA.uptime_percentage:type_name -> google.protobuf.DoubleValue + 35, // 36: tracker.catalog.v1alpha1.SLA.response_time_ms:type_name -> google.protobuf.UInt32Value + 7, // 37: tracker.catalog.v1alpha1.UpdateVersionsResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog + 7, // 38: tracker.catalog.v1alpha1.UpdateDependenciesResponse.catalog:type_name -> tracker.catalog.v1alpha1.Catalog + 0, // 39: tracker.catalog.v1alpha1.UsedDeliverable.type:type_name -> tracker.catalog.v1alpha1.Type + 4, // 40: tracker.catalog.v1alpha1.InfrastructureResource.type:type_name -> tracker.catalog.v1alpha1.InfrastructureType + 33, // 41: tracker.catalog.v1alpha1.InfrastructureResource.metadata:type_name -> tracker.catalog.v1alpha1.InfrastructureResource.MetadataEntry + 5, // 42: tracker.catalog.v1alpha1.CommunicationChannel.type:type_name -> tracker.catalog.v1alpha1.CommunicationType + 6, // 43: tracker.catalog.v1alpha1.DashboardLink.type:type_name -> tracker.catalog.v1alpha1.DashboardType + 34, // 44: tracker.catalog.v1alpha1.VulnerabilitySummary.last_updated:type_name -> google.protobuf.Timestamp + 32, // 45: tracker.catalog.v1alpha1.VulnerabilitySummary.sources:type_name -> tracker.catalog.v1alpha1.VulnerabilitySource + 34, // 46: tracker.catalog.v1alpha1.VulnerabilitySource.last_scan:type_name -> google.protobuf.Timestamp + 8, // 47: tracker.catalog.v1alpha1.CatalogService.CreateUpdateCatalog:input_type -> tracker.catalog.v1alpha1.CreateUpdateCatalogRequest + 10, // 48: tracker.catalog.v1alpha1.CatalogService.GetCatalog:input_type -> tracker.catalog.v1alpha1.GetCatalogRequest + 12, // 49: tracker.catalog.v1alpha1.CatalogService.DeleteCatalog:input_type -> tracker.catalog.v1alpha1.DeleteCatalogRequest + 14, // 50: tracker.catalog.v1alpha1.CatalogService.ListCatalogs:input_type -> tracker.catalog.v1alpha1.ListCatalogsRequest + 16, // 51: tracker.catalog.v1alpha1.CatalogService.GetVersionCompliance:input_type -> tracker.catalog.v1alpha1.GetVersionComplianceRequest + 23, // 52: tracker.catalog.v1alpha1.CatalogService.UpdateVersions:input_type -> tracker.catalog.v1alpha1.UpdateVersionsRequest + 25, // 53: tracker.catalog.v1alpha1.CatalogService.UpdateDependencies:input_type -> tracker.catalog.v1alpha1.UpdateDependenciesRequest + 9, // 54: tracker.catalog.v1alpha1.CatalogService.CreateUpdateCatalog:output_type -> tracker.catalog.v1alpha1.CreateUpdateCatalogResponse + 11, // 55: tracker.catalog.v1alpha1.CatalogService.GetCatalog:output_type -> tracker.catalog.v1alpha1.GetCatalogResponse + 13, // 56: tracker.catalog.v1alpha1.CatalogService.DeleteCatalog:output_type -> tracker.catalog.v1alpha1.DeleteCatalogResponse + 15, // 57: tracker.catalog.v1alpha1.CatalogService.ListCatalogs:output_type -> tracker.catalog.v1alpha1.ListCatalogsResponse + 17, // 58: tracker.catalog.v1alpha1.CatalogService.GetVersionCompliance:output_type -> tracker.catalog.v1alpha1.GetVersionComplianceResponse + 24, // 59: tracker.catalog.v1alpha1.CatalogService.UpdateVersions:output_type -> tracker.catalog.v1alpha1.UpdateVersionsResponse + 26, // 60: tracker.catalog.v1alpha1.CatalogService.UpdateDependencies:output_type -> tracker.catalog.v1alpha1.UpdateDependenciesResponse + 54, // [54:61] is the sub-list for method output_type + 47, // [47:54] is the sub-list for method input_type + 47, // [47:47] is the sub-list for extension type_name + 47, // [47:47] is the sub-list for extension extendee + 0, // [0:47] is the sub-list for field type_name } func init() { file_proto_catalog_v1alpha1_catalog_proto_init() } @@ -2742,8 +3062,8 @@ func file_proto_catalog_v1alpha1_catalog_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_catalog_v1alpha1_catalog_proto_rawDesc), len(file_proto_catalog_v1alpha1_catalog_proto_rawDesc)), - NumEnums: 6, - NumMessages: 25, + NumEnums: 7, + NumMessages: 27, NumExtensions: 0, NumServices: 1, }, diff --git a/generated/proto/catalog/v1alpha1/catalog.pb.validate.go b/generated/proto/catalog/v1alpha1/catalog.pb.validate.go index deaffc8..64f7cf2 100644 --- a/generated/proto/catalog/v1alpha1/catalog.pb.validate.go +++ b/generated/proto/catalog/v1alpha1/catalog.pb.validate.go @@ -296,6 +296,40 @@ func (m *Catalog) validate(all bool) error { } } + for idx, item := range m.GetInfrastructureResources() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CatalogValidationError{ + field: fmt.Sprintf("InfrastructureResources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CatalogValidationError{ + field: fmt.Sprintf("InfrastructureResources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CatalogValidationError{ + field: fmt.Sprintf("InfrastructureResources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return CatalogMultiError(errors) } @@ -631,6 +665,40 @@ func (m *CreateUpdateCatalogRequest) validate(all bool) error { } } + for idx, item := range m.GetInfrastructureResources() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateUpdateCatalogRequestValidationError{ + field: fmt.Sprintf("InfrastructureResources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateUpdateCatalogRequestValidationError{ + field: fmt.Sprintf("InfrastructureResources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateUpdateCatalogRequestValidationError{ + field: fmt.Sprintf("InfrastructureResources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return CreateUpdateCatalogRequestMultiError(errors) } @@ -3113,6 +3181,124 @@ var _ interface { ErrorName() string } = UsedDeliverableValidationError{} +// Validate checks the field values on InfrastructureResource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *InfrastructureResource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InfrastructureResource with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// InfrastructureResourceMultiError, or nil if none found. +func (m *InfrastructureResource) ValidateAll() error { + return m.validate(true) +} + +func (m *InfrastructureResource) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for Name + + // no validation rules for Type + + // no validation rules for Description + + // no validation rules for Provider + + // no validation rules for Region + + // no validation rules for Endpoint + + // no validation rules for Metadata + + if len(errors) > 0 { + return InfrastructureResourceMultiError(errors) + } + + return nil +} + +// InfrastructureResourceMultiError is an error wrapping multiple validation +// errors returned by InfrastructureResource.ValidateAll() if the designated +// constraints aren't met. +type InfrastructureResourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InfrastructureResourceMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InfrastructureResourceMultiError) AllErrors() []error { return m } + +// InfrastructureResourceValidationError is the validation error returned by +// InfrastructureResource.Validate if the designated constraints aren't met. +type InfrastructureResourceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InfrastructureResourceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InfrastructureResourceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InfrastructureResourceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InfrastructureResourceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InfrastructureResourceValidationError) ErrorName() string { + return "InfrastructureResourceValidationError" +} + +// Error satisfies the builtin error interface +func (e InfrastructureResourceValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInfrastructureResource.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InfrastructureResourceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InfrastructureResourceValidationError{} + // Validate checks the field values on CommunicationChannel with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. diff --git a/proto/catalog/v1alpha1/catalog.proto b/proto/catalog/v1alpha1/catalog.proto index 6209df0..dbc74cf 100644 --- a/proto/catalog/v1alpha1/catalog.proto +++ b/proto/catalog/v1alpha1/catalog.proto @@ -74,6 +74,8 @@ message Catalog { repeated DashboardLink dashboard_links = 20; // Vulnerability summary for security monitoring VulnerabilitySummary vulnerability_summary = 21; + // Infrastructure resources used by this service + repeated InfrastructureResource infrastructure_resources = 22; } message CreateUpdateCatalogRequest { @@ -99,6 +101,8 @@ message CreateUpdateCatalogRequest { repeated DashboardLink dashboard_links = 17; // Vulnerability summary for security monitoring VulnerabilitySummary vulnerability_summary = 18; + // Infrastructure resources used by this service + repeated InfrastructureResource infrastructure_resources = 19; // Note: Version management (available_versions, latest_version, reference_version) // is handled separately via UpdateVersions endpoint } @@ -286,6 +290,60 @@ message UsedDeliverable { string description = 4; // Optional description or usage context } +// Infrastructure resource (database, storage, API gateway, etc.) +message InfrastructureResource { + string id = 1; // Unique identifier for the resource + string name = 2; // Display name (e.g., "users-db", "assets-bucket") + InfrastructureType type = 3; // Type of infrastructure resource + string description = 4; // Optional description + string provider = 5; // Cloud provider (AWS, Azure, GCP, Scaleway, etc.) + string region = 6; // Region/location + string endpoint = 7; // Connection endpoint or URL + map metadata = 8; // Additional metadata (size, tier, etc.) + repeated string connected_services = 9; // Services that use this resource +} + +enum InfrastructureType { + INFRASTRUCTURE_TYPE_UNSPECIFIED = 0; + // Databases + database_rds = 1; // AWS RDS / Azure SQL / GCP Cloud SQL + database_dynamodb = 2; // AWS DynamoDB / Azure Cosmos DB + database_mongodb = 3; // MongoDB Atlas / DocumentDB + database_postgresql = 4; // PostgreSQL + database_mysql = 5; // MySQL / MariaDB + database_redis = 6; // Redis / ElastiCache + database_elasticsearch = 7; // Elasticsearch / OpenSearch + // Storage + storage_s3 = 10; // AWS S3 / Azure Blob / GCP Cloud Storage + storage_efs = 11; // AWS EFS / Azure Files / GCP Filestore + storage_ebs = 12; // AWS EBS / Azure Disk + // Networking + network_load_balancer = 20; // Load Balancer (ALB, NLB, etc.) + network_api_gateway = 21; // API Gateway + network_cdn = 22; // CloudFront / Azure CDN / GCP CDN + network_vpc = 23; // VPC / Virtual Network + network_nat_gateway = 24; // NAT Gateway + // Messaging & Queues + messaging_sqs = 30; // AWS SQS / Azure Queue / GCP Pub/Sub + messaging_sns = 31; // AWS SNS / Azure Service Bus + messaging_kafka = 32; // Kafka / MSK / Event Hubs + messaging_rabbitmq = 33; // RabbitMQ / Amazon MQ + // Caching + cache_redis = 40; // Redis / ElastiCache + cache_memcached = 41; // Memcached + cache_cloudfront = 42; // CloudFront cache + // Security + security_waf = 50; // WAF (Web Application Firewall) + security_secrets_manager = 51; // Secrets Manager / Key Vault + security_kms = 52; // KMS / Key Management + // Monitoring + monitoring_cloudwatch = 60; // CloudWatch / Azure Monitor + monitoring_prometheus = 61; // Prometheus + monitoring_grafana = 62; // Grafana + // Other + other_custom = 99; // Custom infrastructure resource +} + // Communication channel for a service message CommunicationChannel { CommunicationType type = 1; // Type of communication channel diff --git a/scripts/test-infrastructure-resources.sh b/scripts/test-infrastructure-resources.sh new file mode 100644 index 0000000..e15ad34 --- /dev/null +++ b/scripts/test-infrastructure-resources.sh @@ -0,0 +1,132 @@ +#!/bin/bash + +# Script pour tester la fonctionnalité Infrastructure Resources +# Usage: ./scripts/test-infrastructure-resources.sh + +set -e + +API_URL="${API_URL:-http://localhost:8080}" +API_ENDPOINT="${API_URL}/api/v1alpha1/catalog" + +echo "🧪 Test de la fonctionnalité Infrastructure Resources" +echo "==================================================" +echo "" + +# Couleurs pour l'output +GREEN='\033[0;32m' +BLUE='\033[0;34m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +# 1. Créer un service avec des ressources d'infrastructure +echo -e "${BLUE}📝 Création du service auth-service avec ressources d'infrastructure...${NC}" +curl -X PUT "${API_ENDPOINT}" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "auth-service", + "type": "project", + "languages": "golang", + "owner": "platform-team", + "version": "2.1.0", + "description": "Authentication and authorization service", + "repository": "https://github.com/company/auth-service", + "platform": "kubernetes", + "sla": { + "level": "critical", + "uptime_percentage": {"value": 99.99}, + "response_time_ms": {"value": 100}, + "description": "Mission-critical authentication service" + }, + "infrastructure_resources": [ + { + "id": "infra-1", + "name": "users-db", + "type": "database_postgresql", + "description": "Primary PostgreSQL database for user data", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "users-db.cluster-abc123.us-east-1.rds.amazonaws.com:5432", + "metadata": { + "instance_type": "db.r5.xlarge", + "storage": "500GB", + "multi_az": "true" + } + }, + { + "id": "infra-2", + "name": "sessions-cache", + "type": "cache_redis", + "description": "Redis cache for user sessions", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "sessions-cache.abc123.cache.amazonaws.com:6379", + "metadata": { + "node_type": "cache.r5.large", + "num_nodes": "3" + } + }, + { + "id": "infra-3", + "name": "auth-secrets", + "type": "security_secrets_manager", + "description": "Secrets Manager for API keys", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "secretsmanager.us-east-1.amazonaws.com" + }, + { + "id": "infra-4", + "name": "auth-lb", + "type": "network_load_balancer", + "description": "Application Load Balancer", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "auth-lb-123456789.us-east-1.elb.amazonaws.com" + }, + { + "id": "infra-5", + "name": "audit-logs-bucket", + "type": "storage_s3", + "description": "S3 bucket for audit logs", + "provider": "AWS", + "region": "us-east-1", + "endpoint": "s3://audit-logs-auth-service" + } + ] + }' | jq '.' + +echo "" +echo -e "${GREEN}✅ Service créé avec succès${NC}" +echo "" + +# 2. Récupérer le service et vérifier les ressources +echo -e "${BLUE}🔍 Récupération du service auth-service...${NC}" +RESPONSE=$(curl -s "${API_ENDPOINT}?name=auth-service") +echo "$RESPONSE" | jq '.' + +# Compter les ressources d'infrastructure +INFRA_COUNT=$(echo "$RESPONSE" | jq '.catalog.infrastructure_resources | length') +echo "" +echo -e "${YELLOW}📊 Nombre de ressources d'infrastructure: ${INFRA_COUNT}${NC}" + +if [ "$INFRA_COUNT" -eq 5 ]; then + echo -e "${GREEN}✅ Toutes les ressources ont été sauvegardées${NC}" +else + echo -e "${RED}❌ Erreur: ${INFRA_COUNT} ressources trouvées au lieu de 5${NC}" + exit 1 +fi + +# 3. Afficher les détails des ressources +echo "" +echo -e "${BLUE}📋 Détails des ressources d'infrastructure:${NC}" +echo "$RESPONSE" | jq -r '.catalog.infrastructure_resources[] | " - \(.name) (\(.type)) - \(.provider) \(.region)"' + +echo "" +echo -e "${GREEN}✅ Test terminé avec succès!${NC}" +echo "" +echo -e "${YELLOW}💡 Prochaines étapes:${NC}" +echo " 1. Ouvrir http://localhost:8080/catalog/auth-service dans le navigateur" +echo " 2. Vérifier que les ressources apparaissent dans la section Infrastructure Resources" +echo " 3. Vérifier que les ressources apparaissent dans le graphique de dépendances" +echo " 4. Tester l'ajout/édition/suppression de ressources via l'interface" diff --git a/server/catalog.go b/server/catalog.go index 8d8d665..6edf0f4 100644 --- a/server/catalog.go +++ b/server/catalog.go @@ -46,22 +46,23 @@ func (e *Catalog) CreateUpdateCatalog( existingCatalog, _ := e.store.Get(ctx, map[string]interface{}{"name": i.Name}) var catalog = &v1alpha1.Catalog{ - Name: i.Name, - Type: i.Type, - Languages: i.Languages, - Owner: i.Owner, - Version: i.Version, - Link: i.Link, - Description: i.Description, - Repository: i.Repository, - DependenciesIn: i.DependenciesIn, - DependenciesOut: i.DependenciesOut, - Sla: i.Sla, - Platform: i.Platform, - UsedDeliverables: i.UsedDeliverables, - CommunicationChannels: i.CommunicationChannels, - DashboardLinks: i.DashboardLinks, - VulnerabilitySummary: i.VulnerabilitySummary, + Name: i.Name, + Type: i.Type, + Languages: i.Languages, + Owner: i.Owner, + Version: i.Version, + Link: i.Link, + Description: i.Description, + Repository: i.Repository, + DependenciesIn: i.DependenciesIn, + DependenciesOut: i.DependenciesOut, + Sla: i.Sla, + Platform: i.Platform, + UsedDeliverables: i.UsedDeliverables, + CommunicationChannels: i.CommunicationChannels, + DashboardLinks: i.DashboardLinks, + VulnerabilitySummary: i.VulnerabilitySummary, + InfrastructureResources: i.InfrastructureResources, } // Preserve existing version fields if updating diff --git a/web/public/aws_icons/Arch_AWS-Backup_32.svg b/web/public/aws_icons/Arch_AWS-Backup_32.svg new file mode 100644 index 0000000..dd56fc0 --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Backup_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-Backup_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-Client-VPN_32.svg b/web/public/aws_icons/Arch_AWS-Client-VPN_32.svg new file mode 100644 index 0000000..b081f3b --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Client-VPN_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-Client-VPN_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-Database-Migration-Service_32.svg b/web/public/aws_icons/Arch_AWS-Database-Migration-Service_32.svg new file mode 100644 index 0000000..4362209 --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Database-Migration-Service_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-Database-Migration-Service_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-Fargate_32.svg b/web/public/aws_icons/Arch_AWS-Fargate_32.svg new file mode 100644 index 0000000..52e90c0 --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Fargate_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-Fargate_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-Key-Management-Service_32.svg b/web/public/aws_icons/Arch_AWS-Key-Management-Service_32.svg new file mode 100644 index 0000000..67dc49f --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Key-Management-Service_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-Key-Management-Service_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-PrivateLink_32.svg b/web/public/aws_icons/Arch_AWS-PrivateLink_32.svg new file mode 100644 index 0000000..da0ebfe --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-PrivateLink_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-PrivateLink_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-Secrets-Manager_32.svg b/web/public/aws_icons/Arch_AWS-Secrets-Manager_32.svg new file mode 100644 index 0000000..e56f26f --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Secrets-Manager_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-Secrets-Manager_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-Site-to-Site-VPN_32.svg b/web/public/aws_icons/Arch_AWS-Site-to-Site-VPN_32.svg new file mode 100644 index 0000000..d3a792d --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Site-to-Site-VPN_32.svg @@ -0,0 +1,12 @@ + + + Icon-Architecture/32/Arch_AWS-Site-to-Site-VPN_32 + + + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_AWS-Transit-Gateway_32.svg b/web/public/aws_icons/Arch_AWS-Transit-Gateway_32.svg new file mode 100644 index 0000000..59e9d06 --- /dev/null +++ b/web/public/aws_icons/Arch_AWS-Transit-Gateway_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_AWS-Transit-Gateway_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-CloudFront_32.svg b/web/public/aws_icons/Arch_Amazon-CloudFront_32.svg new file mode 100644 index 0000000..2c16a09 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-CloudFront_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-CloudFront_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-DynamoDB_32.svg b/web/public/aws_icons/Arch_Amazon-DynamoDB_32.svg new file mode 100644 index 0000000..948ee42 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-DynamoDB_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-DynamoDB_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-EFS_32.svg b/web/public/aws_icons/Arch_Amazon-EFS_32.svg new file mode 100644 index 0000000..e8611ff --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-EFS_32.svg @@ -0,0 +1,12 @@ + + + Icon-Architecture/32/Arch_Amazon-EFS_32 + + + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-ElastiCache_32.svg b/web/public/aws_icons/Arch_Amazon-ElastiCache_32.svg new file mode 100644 index 0000000..d1465ef --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-ElastiCache_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-ElastiCache_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Elastic-Block-Store_32.svg b/web/public/aws_icons/Arch_Amazon-Elastic-Block-Store_32.svg new file mode 100644 index 0000000..e8dbbac --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Elastic-Block-Store_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Elastic-Block-Store_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Elastic-Container-Registry_32.svg b/web/public/aws_icons/Arch_Amazon-Elastic-Container-Registry_32.svg new file mode 100644 index 0000000..91729a0 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Elastic-Container-Registry_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Elastic-Container-Registry_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Elastic-Container-Service_32.svg b/web/public/aws_icons/Arch_Amazon-Elastic-Container-Service_32.svg new file mode 100644 index 0000000..7738b90 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Elastic-Container-Service_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Elastic-Container-Service_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Elastic-Kubernetes-Service_32.svg b/web/public/aws_icons/Arch_Amazon-Elastic-Kubernetes-Service_32.svg new file mode 100644 index 0000000..560d500 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Elastic-Kubernetes-Service_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Elastic-Kubernetes-Service_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-File-Cache_32.svg b/web/public/aws_icons/Arch_Amazon-File-Cache_32.svg new file mode 100644 index 0000000..b5ba902 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-File-Cache_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-File-Cache_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Keyspaces_32.svg b/web/public/aws_icons/Arch_Amazon-Keyspaces_32.svg new file mode 100644 index 0000000..6f6ebfa --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Keyspaces_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Keyspaces_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Managed-Streaming-for-Apache-Kafka_32.svg b/web/public/aws_icons/Arch_Amazon-Managed-Streaming-for-Apache-Kafka_32.svg new file mode 100644 index 0000000..f276a05 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Managed-Streaming-for-Apache-Kafka_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Managed-Streaming-for-Apache-Kafka_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-MemoryDB_32.svg b/web/public/aws_icons/Arch_Amazon-MemoryDB_32.svg new file mode 100644 index 0000000..34726c7 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-MemoryDB_32.svg @@ -0,0 +1,12 @@ + + + Icon-Architecture/32/Arch_Amazon-MemoryDB-for-Redis_32 + + + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Neptune_32.svg b/web/public/aws_icons/Arch_Amazon-Neptune_32.svg new file mode 100644 index 0000000..0d3087f --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Neptune_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Neptune_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-RDS_32.svg b/web/public/aws_icons/Arch_Amazon-RDS_32.svg new file mode 100644 index 0000000..61793ec --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-RDS_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-RDS_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Route-53_32.svg b/web/public/aws_icons/Arch_Amazon-Route-53_32.svg new file mode 100644 index 0000000..9134b77 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Route-53_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Route-53_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Simple-Queue-Service_32.svg b/web/public/aws_icons/Arch_Amazon-Simple-Queue-Service_32.svg new file mode 100644 index 0000000..6f6ebc9 --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Simple-Queue-Service_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Simple-Queue-Service_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Simple-Storage-Service_32.svg b/web/public/aws_icons/Arch_Amazon-Simple-Storage-Service_32.svg new file mode 100644 index 0000000..6a2edca --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Simple-Storage-Service_32.svg @@ -0,0 +1,12 @@ + + + Icon-Architecture/32/Arch_Amazon-Simple-Storage-Service_32 + + + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Amazon-Timestream_32.svg b/web/public/aws_icons/Arch_Amazon-Timestream_32.svg new file mode 100644 index 0000000..6c4cc1e --- /dev/null +++ b/web/public/aws_icons/Arch_Amazon-Timestream_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Amazon-Timestream_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Elastic-Load-Balancing_32.svg b/web/public/aws_icons/Arch_Elastic-Load-Balancing_32.svg new file mode 100644 index 0000000..f20d8ff --- /dev/null +++ b/web/public/aws_icons/Arch_Elastic-Load-Balancing_32.svg @@ -0,0 +1,10 @@ + + + Icon-Architecture/32/Arch_Elastic-Load-Balancing_32 + + + + + + + \ No newline at end of file diff --git a/web/public/aws_icons/Arch_Oracle-Database-at-AWS_32.svg b/web/public/aws_icons/Arch_Oracle-Database-at-AWS_32.svg new file mode 100644 index 0000000..719f434 --- /dev/null +++ b/web/public/aws_icons/Arch_Oracle-Database-at-AWS_32.svg @@ -0,0 +1,4 @@ + + + + diff --git a/web/public/azure_icons/aks.svg b/web/public/azure_icons/aks.svg new file mode 100644 index 0000000..2e597c4 --- /dev/null +++ b/web/public/azure_icons/aks.svg @@ -0,0 +1 @@ +Icon-compute-23 \ No newline at end of file diff --git a/web/public/azure_icons/app-service.svg b/web/public/azure_icons/app-service.svg new file mode 100644 index 0000000..022ef80 --- /dev/null +++ b/web/public/azure_icons/app-service.svg @@ -0,0 +1 @@ +Icon-web-41 \ No newline at end of file diff --git a/web/public/azure_icons/container-instances.svg b/web/public/azure_icons/container-instances.svg new file mode 100644 index 0000000..52567b9 --- /dev/null +++ b/web/public/azure_icons/container-instances.svg @@ -0,0 +1 @@ +Icon-containers-104 \ No newline at end of file diff --git a/web/public/azure_icons/cosmos-db.svg b/web/public/azure_icons/cosmos-db.svg new file mode 100644 index 0000000..ecb1792 --- /dev/null +++ b/web/public/azure_icons/cosmos-db.svg @@ -0,0 +1 @@ +Icon-databases-121 \ No newline at end of file diff --git a/web/public/azure_icons/front-door.svg b/web/public/azure_icons/front-door.svg new file mode 100644 index 0000000..15309b8 --- /dev/null +++ b/web/public/azure_icons/front-door.svg @@ -0,0 +1 @@ +Icon-networking-73 \ No newline at end of file diff --git a/web/public/azure_icons/functions.svg b/web/public/azure_icons/functions.svg new file mode 100644 index 0000000..1ecacdf --- /dev/null +++ b/web/public/azure_icons/functions.svg @@ -0,0 +1 @@ +Icon-compute-29 \ No newline at end of file diff --git a/web/public/azure_icons/key-vault.svg b/web/public/azure_icons/key-vault.svg new file mode 100644 index 0000000..53f0135 --- /dev/null +++ b/web/public/azure_icons/key-vault.svg @@ -0,0 +1 @@ +Icon-security-245 \ No newline at end of file diff --git a/web/public/azure_icons/load-balancer.svg b/web/public/azure_icons/load-balancer.svg new file mode 100644 index 0000000..de76793 --- /dev/null +++ b/web/public/azure_icons/load-balancer.svg @@ -0,0 +1 @@ +Icon-networking-62 \ No newline at end of file diff --git a/web/public/azure_icons/redis-cache.svg b/web/public/azure_icons/redis-cache.svg new file mode 100644 index 0000000..ded7050 --- /dev/null +++ b/web/public/azure_icons/redis-cache.svg @@ -0,0 +1 @@ +Icon-databases-137 \ No newline at end of file diff --git a/web/public/azure_icons/service-bus.svg b/web/public/azure_icons/service-bus.svg new file mode 100644 index 0000000..2fc22a7 --- /dev/null +++ b/web/public/azure_icons/service-bus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/public/azure_icons/sql-database.svg b/web/public/azure_icons/sql-database.svg new file mode 100644 index 0000000..4271bd1 --- /dev/null +++ b/web/public/azure_icons/sql-database.svg @@ -0,0 +1 @@ +Icon-databases-130 \ No newline at end of file diff --git a/web/public/azure_icons/storage-account.svg b/web/public/azure_icons/storage-account.svg new file mode 100644 index 0000000..e2a26a2 --- /dev/null +++ b/web/public/azure_icons/storage-account.svg @@ -0,0 +1 @@ +Icon-storage-86 \ No newline at end of file diff --git a/web/public/azure_icons/virtual-machine.svg b/web/public/azure_icons/virtual-machine.svg new file mode 100644 index 0000000..0263f26 --- /dev/null +++ b/web/public/azure_icons/virtual-machine.svg @@ -0,0 +1 @@ +Icon-compute-21 \ No newline at end of file diff --git a/web/public/gcp_icons/alloydb.svg b/web/public/gcp_icons/alloydb.svg new file mode 100644 index 0000000..9578c0e --- /dev/null +++ b/web/public/gcp_icons/alloydb.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/bigquery.svg b/web/public/gcp_icons/bigquery.svg new file mode 100644 index 0000000..0907384 --- /dev/null +++ b/web/public/gcp_icons/bigquery.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/cloud-run.svg b/web/public/gcp_icons/cloud-run.svg new file mode 100644 index 0000000..0429220 --- /dev/null +++ b/web/public/gcp_icons/cloud-run.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/cloud-spanner.svg b/web/public/gcp_icons/cloud-spanner.svg new file mode 100644 index 0000000..2967993 --- /dev/null +++ b/web/public/gcp_icons/cloud-spanner.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/cloud-sql.svg b/web/public/gcp_icons/cloud-sql.svg new file mode 100644 index 0000000..561ba5e --- /dev/null +++ b/web/public/gcp_icons/cloud-sql.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/cloud-storage.svg b/web/public/gcp_icons/cloud-storage.svg new file mode 100644 index 0000000..842c121 --- /dev/null +++ b/web/public/gcp_icons/cloud-storage.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/compute-engine.svg b/web/public/gcp_icons/compute-engine.svg new file mode 100644 index 0000000..9984dd2 --- /dev/null +++ b/web/public/gcp_icons/compute-engine.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/gke.svg b/web/public/gcp_icons/gke.svg new file mode 100644 index 0000000..e6957f7 --- /dev/null +++ b/web/public/gcp_icons/gke.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/public/gcp_icons/vertex-ai.svg b/web/public/gcp_icons/vertex-ai.svg new file mode 100644 index 0000000..7e8dcd2 --- /dev/null +++ b/web/public/gcp_icons/vertex-ai.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/src/components/InfrastructureResourceManager.tsx b/web/src/components/InfrastructureResourceManager.tsx new file mode 100644 index 0000000..9123436 --- /dev/null +++ b/web/src/components/InfrastructureResourceManager.tsx @@ -0,0 +1,379 @@ +import { useState } from 'react' +import { Plus, Database, HardDrive, Network, MessageSquare, Shield, Activity, X, Edit2, Save } from 'lucide-react' +import { Button } from './ui/button' +import { Input } from './ui/input' +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from './ui/card' +import type { InfrastructureResource, InfrastructureType } from '../types/api' + +interface InfrastructureResourceManagerProps { + resources: InfrastructureResource[] + onChange: (resources: InfrastructureResource[]) => void +} + +export default function InfrastructureResourceManager({ resources, onChange }: InfrastructureResourceManagerProps) { + const [showDialog, setShowDialog] = useState(false) + const [editingResource, setEditingResource] = useState(null) + const [formData, setFormData] = useState>({ + name: '', + type: 'database_postgresql' as InfrastructureType, + description: '', + provider: 'AWS', + region: '', + endpoint: '', + metadata: {} + }) + + const handleAdd = () => { + setEditingResource(null) + setFormData({ + name: '', + type: 'database_postgresql' as InfrastructureType, + description: '', + provider: 'AWS', + region: '', + endpoint: '', + metadata: {} + }) + setShowDialog(true) + } + + const handleEdit = (resource: InfrastructureResource) => { + setEditingResource(resource) + setFormData(resource) + setShowDialog(true) + } + + const handleSave = () => { + if (!formData.name || !formData.type) return + + const newResource: InfrastructureResource = { + id: editingResource?.id || `infra-${Date.now()}`, + name: formData.name, + type: formData.type as InfrastructureType, + description: formData.description || '', + provider: formData.provider || 'AWS', + region: formData.region || '', + endpoint: formData.endpoint || '', + metadata: formData.metadata || {}, + connectedServices: formData.connectedServices || [] + } + + if (editingResource) { + onChange(resources.map(r => r.id === editingResource.id ? newResource : r)) + } else { + onChange([...resources, newResource]) + } + + setShowDialog(false) + } + + const handleDelete = (id: string) => { + onChange(resources.filter(r => r.id !== id)) + } + + return ( + + +
+
+ + + Infrastructure Resources + + + Manage databases, storage, load balancers, and other infrastructure components + +
+ +
+
+ + {resources.length === 0 ? ( +
+ +

No infrastructure resources defined

+

Add databases, storage, or other infrastructure components

+
+ ) : ( +
+ {resources.map(resource => ( +
+
+
+ {getInfrastructureIcon(resource.type)} +
+
+ {resource.name} +
+
+ {getInfrastructureTypeLabel(resource.type)} +
+
+
+
+ + +
+
+ {resource.description && ( +

+ {resource.description} +

+ )} +
+ {resource.provider && ( + + {resource.provider} + + )} + {resource.region && ( + + {resource.region} + + )} +
+
+ ))} +
+ )} +
+ + {/* Custom Modal */} + {showDialog && ( +
+ {/* Backdrop */} +
setShowDialog(false)} + /> + + {/* Modal */} +
+
+ {/* Header */} +
+
+

+ {editingResource ? 'Edit Infrastructure Resource' : 'Add Infrastructure Resource'} +

+

+ Define a database, storage, load balancer, or other infrastructure component +

+
+ +
+ + {/* Content */} +
+
+
+
+ + setFormData({ ...formData, name: e.target.value })} + /> +
+ +
+ + +
+
+ +
+ +