Documentation
¶
Overview ¶
Package spec defines the core system-spec types. All types are concrete with no interface{} or any fields. JSON Schema is generated from these Go structs.
Index ¶
- type APIGatewayAPI
- type AWSResources
- type AzureFunction
- type AzureKeyVault
- type AzureRedisCache
- type AzureResources
- type AzureSQLDatabase
- type BedrockModel
- type BigQueryDataset
- type BlobStorageAccount
- type CassandraCluster
- type CloudFrontDistribution
- type CloudFunction
- type CloudRunService
- type CloudSQLInstance
- type CloudflareD1
- type CloudflareDurableObject
- type CloudflareKV
- type CloudflareQueue
- type CloudflareResources
- type CloudflareWorker
- type Connection
- type ConsulInstance
- type ContainerImage
- type CosmosDBAccount
- type Deployments
- type DynamoDBTable
- type ElastiCacheCluster
- type ElasticsearchCluster
- type Endpoint
- type EtcdCluster
- type EventBridgeBus
- type EventHubsNamespace
- type FirestoreDatabase
- type GCPResources
- type GCPSecret
- type GCSBucket
- type GenericResources
- type GitRepo
- type HelmDeployment
- type KafkaCluster
- type KinesisStream
- type LambdaFunction
- type MemcachedInstance
- type MemorystoreInstance
- type MinioInstance
- type MongoDBInstance
- type MySQLDatabase
- type NATSServer
- type Network
- type NetworkRule
- type Owner
- type PostgreSQLDatabase
- type PubSubTopic
- type R2Bucket
- type RDSInstance
- type RabbitMQInstance
- type RedisInstance
- type S3Bucket
- type SNSTopic
- type SQSQueue
- type SecretsManagerSecret
- type Service
- type ServiceBusNamespace
- type ServiceEnvVars
- type SpannerInstance
- type System
- type TerraformDeployment
- type VaultInstance
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIGatewayAPI ¶
type APIGatewayAPI struct {
// Name of the API
Name string `json:"name"`
// Type (REST, HTTP, WebSocket)
Type string `json:"type,omitempty"`
}
APIGatewayAPI represents an API Gateway API.
type AWSResources ¶
type AWSResources struct {
// RDS instances
RDS []RDSInstance `json:"rds,omitempty"`
// DynamoDB tables
DynamoDB []DynamoDBTable `json:"dynamodb,omitempty"`
// SQS queues
SQS []SQSQueue `json:"sqs,omitempty"`
// SNS topics
SNS []SNSTopic `json:"sns,omitempty"`
// S3 buckets
S3 []S3Bucket `json:"s3,omitempty"`
// Bedrock models
Bedrock []BedrockModel `json:"bedrock,omitempty"`
// Lambda functions
Lambda []LambdaFunction `json:"lambda,omitempty"`
// ElastiCache clusters (Redis/Memcached)
ElastiCache []ElastiCacheCluster `json:"elasticache,omitempty"`
// Kinesis streams
Kinesis []KinesisStream `json:"kinesis,omitempty"`
// EventBridge event buses
EventBridge []EventBridgeBus `json:"eventbridge,omitempty"`
// SecretsManager secrets
SecretsManager []SecretsManagerSecret `json:"secretsmanager,omitempty"`
// API Gateway APIs
APIGateway []APIGatewayAPI `json:"apigateway,omitempty"`
// CloudFront distributions
CloudFront []CloudFrontDistribution `json:"cloudfront,omitempty"`
// VPC binding
VPC string `json:"vpc,omitempty"`
// Subnets
Subnets []string `json:"subnets,omitempty"`
// SecurityGroups
SecurityGroups []string `json:"securityGroups,omitempty"`
}
AWSResources contains AWS-specific resource bindings.
type AzureFunction ¶
type AzureFunction struct {
// Name of the function app
Name string `json:"name"`
// Runtime (e.g., "dotnet", "node", "python", "java")
Runtime string `json:"runtime,omitempty"`
}
AzureFunction represents an Azure Functions app.
type AzureKeyVault ¶
type AzureKeyVault struct {
// Name of the vault
Name string `json:"name"`
}
AzureKeyVault represents an Azure Key Vault.
type AzureRedisCache ¶
type AzureRedisCache struct {
// Name of the cache
Name string `json:"name"`
// Port number
Port int `json:"port,omitempty"`
}
AzureRedisCache represents an Azure Cache for Redis instance.
type AzureResources ¶
type AzureResources struct {
// CosmosDB accounts
CosmosDB []CosmosDBAccount `json:"cosmosdb,omitempty"`
// ServiceBus namespaces
ServiceBus []ServiceBusNamespace `json:"servicebus,omitempty"`
// BlobStorage accounts
BlobStorage []BlobStorageAccount `json:"blobstorage,omitempty"`
// Functions apps
Functions []AzureFunction `json:"functions,omitempty"`
// RedisCache instances
RedisCache []AzureRedisCache `json:"rediscache,omitempty"`
// KeyVault instances
KeyVault []AzureKeyVault `json:"keyvault,omitempty"`
// EventHubs namespaces
EventHubs []EventHubsNamespace `json:"eventhubs,omitempty"`
// SQLDatabase instances
SQLDatabase []AzureSQLDatabase `json:"sqldatabase,omitempty"`
// VNet binding
VNet string `json:"vnet,omitempty"`
// Subnets
Subnets []string `json:"subnets,omitempty"`
}
AzureResources contains Azure-specific resource bindings.
type AzureSQLDatabase ¶
type AzureSQLDatabase struct {
// Name of the database
Name string `json:"name"`
// Server name
Server string `json:"server,omitempty"`
// Port number
Port int `json:"port,omitempty"`
}
AzureSQLDatabase represents an Azure SQL Database.
type BedrockModel ¶
type BedrockModel struct {
// ModelID is the Bedrock model identifier
ModelID string `json:"modelId"`
}
BedrockModel represents an AWS Bedrock model.
type BigQueryDataset ¶
type BigQueryDataset struct {
// Name of the dataset
Name string `json:"name"`
}
BigQueryDataset represents a BigQuery dataset.
type BlobStorageAccount ¶
type BlobStorageAccount struct {
// Name of the storage account
Name string `json:"name"`
// Containers in this account
Containers []string `json:"containers,omitempty"`
}
BlobStorageAccount represents an Azure Blob Storage account.
type CassandraCluster ¶
type CassandraCluster struct {
// Name of the cluster
Name string `json:"name"`
// Contact points (comma-separated hosts)
ContactPoints string `json:"contactPoints,omitempty"`
// Port number (default: 9042)
Port int `json:"port,omitempty"`
// Keyspace
Keyspace string `json:"keyspace,omitempty"`
}
CassandraCluster represents a Cassandra cluster.
type CloudFrontDistribution ¶
type CloudFrontDistribution struct {
// ID of the distribution
ID string `json:"id"`
// Domain name
Domain string `json:"domain,omitempty"`
}
CloudFrontDistribution represents a CloudFront distribution.
type CloudFunction ¶
type CloudFunction struct {
// Name of the function
Name string `json:"name"`
// Runtime (e.g., "go121", "python311", "nodejs18")
Runtime string `json:"runtime,omitempty"`
}
CloudFunction represents a Cloud Function.
type CloudRunService ¶
type CloudRunService struct {
// Name of the service
Name string `json:"name"`
// Region where deployed
Region string `json:"region,omitempty"`
}
CloudRunService represents a Cloud Run service.
type CloudSQLInstance ¶
type CloudSQLInstance struct {
// Name of the instance
Name string `json:"name"`
// DatabaseType (mysql, postgres)
DatabaseType string `json:"databaseType,omitempty"`
}
CloudSQLInstance represents a Cloud SQL instance.
type CloudflareD1 ¶
type CloudflareD1 struct {
// Name of the database
Name string `json:"name"`
}
CloudflareD1 represents a Cloudflare D1 database.
type CloudflareDurableObject ¶
type CloudflareDurableObject struct {
// Name of the Durable Object class
Name string `json:"name"`
}
CloudflareDurableObject represents a Durable Object namespace.
type CloudflareKV ¶
type CloudflareKV struct {
// Name of the KV namespace
Name string `json:"name"`
}
CloudflareKV represents a Cloudflare KV namespace.
type CloudflareQueue ¶
type CloudflareQueue struct {
// Name of the queue
Name string `json:"name"`
}
CloudflareQueue represents a Cloudflare Queue.
type CloudflareResources ¶
type CloudflareResources struct {
// Zone is the DNS zone
Zone string `json:"zone,omitempty"`
// Workers lists Cloudflare Workers
Workers []CloudflareWorker `json:"workers,omitempty"`
// R2Buckets lists R2 storage buckets
R2Buckets []R2Bucket `json:"r2Buckets,omitempty"`
// KV lists KV namespaces
KV []CloudflareKV `json:"kv,omitempty"`
// D1 lists D1 databases
D1 []CloudflareD1 `json:"d1,omitempty"`
// Queues lists Cloudflare Queues
Queues []CloudflareQueue `json:"queues,omitempty"`
// DurableObjects lists Durable Object namespaces
DurableObjects []CloudflareDurableObject `json:"durableObjects,omitempty"`
}
CloudflareResources contains Cloudflare resource bindings.
type CloudflareWorker ¶
type CloudflareWorker struct {
// Name of the worker
Name string `json:"name"`
// Route pattern
Route string `json:"route,omitempty"`
}
CloudflareWorker represents a Cloudflare Worker.
type Connection ¶
type Connection struct {
// Port is the target port number
Port int `json:"port"`
// Protocol is the connection protocol (http, grpc, tcp, sql, amqp, redis)
Protocol string `json:"protocol"`
// Description explains the purpose of this connection
Description string `json:"description,omitempty"`
}
Connection represents a connection from one service to another.
type ConsulInstance ¶
type ConsulInstance struct {
// Name of the instance
Name string `json:"name"`
// Address (e.g., "consul.example.com:8500")
Address string `json:"address,omitempty"`
}
ConsulInstance represents a HashiCorp Consul instance.
type ContainerImage ¶
type ContainerImage struct {
// Name is the image name without tag (e.g., "nginx", "ghcr.io/org/app")
Name string `json:"name"`
// Tag is the image tag (e.g., "v1.2.3", "latest")
Tag string `json:"tag,omitempty"`
// Digest is the image digest for pinning (e.g., "sha256:abc123...")
Digest string `json:"digest,omitempty"`
}
ContainerImage represents a container image specification.
func (ContainerImage) FullName ¶
func (i ContainerImage) FullName() string
FullName returns the complete image reference.
type CosmosDBAccount ¶
type CosmosDBAccount struct {
// Name of the account
Name string `json:"name"`
// API type (sql, mongodb, cassandra, gremlin, table)
API string `json:"api,omitempty"`
}
CosmosDBAccount represents an Azure Cosmos DB account.
type Deployments ¶
type Deployments struct {
// Helm maps helm release name to helm chart reference
Helm map[string]HelmDeployment `json:"helm,omitempty"`
// Terraform maps terraform module name to terraform reference
Terraform map[string]TerraformDeployment `json:"terraform,omitempty"`
}
Deployments contains deployment configuration references.
type DynamoDBTable ¶
type DynamoDBTable struct {
// Name of the table
Name string `json:"name"`
}
DynamoDBTable represents a DynamoDB table.
type ElastiCacheCluster ¶
type ElastiCacheCluster struct {
// Name of the cluster
Name string `json:"name"`
// Engine (redis, memcached)
Engine string `json:"engine,omitempty"`
// Port number
Port int `json:"port,omitempty"`
}
ElastiCacheCluster represents an ElastiCache cluster.
type ElasticsearchCluster ¶
type ElasticsearchCluster struct {
// Name of the cluster
Name string `json:"name"`
// Host address
Host string `json:"host,omitempty"`
// Port number (default: 9200)
Port int `json:"port,omitempty"`
}
ElasticsearchCluster represents an Elasticsearch cluster.
type Endpoint ¶
type Endpoint struct {
// Port number
Port int `json:"port"`
// Protocol (http, grpc, tcp)
Protocol string `json:"protocol"`
// Description of the endpoint
Description string `json:"description,omitempty"`
}
Endpoint represents an exposed port/protocol.
type EtcdCluster ¶
type EtcdCluster struct {
// Name of the cluster
Name string `json:"name"`
// Endpoints (comma-separated)
Endpoints string `json:"endpoints,omitempty"`
}
EtcdCluster represents an etcd cluster.
type EventBridgeBus ¶
type EventBridgeBus struct {
// Name of the event bus
Name string `json:"name"`
}
EventBridgeBus represents an EventBridge event bus.
type EventHubsNamespace ¶
type EventHubsNamespace struct {
// Name of the namespace
Name string `json:"name"`
// Hubs in this namespace
Hubs []string `json:"hubs,omitempty"`
}
EventHubsNamespace represents an Azure Event Hubs namespace.
type FirestoreDatabase ¶
type FirestoreDatabase struct {
// Name of the database (default: "(default)")
Name string `json:"name"`
}
FirestoreDatabase represents a Firestore database.
type GCPResources ¶
type GCPResources struct {
// CloudSQL instances
CloudSQL []CloudSQLInstance `json:"cloudsql,omitempty"`
// PubSub topics
PubSub []PubSubTopic `json:"pubsub,omitempty"`
// GCS buckets
GCS []GCSBucket `json:"gcs,omitempty"`
// CloudRun services
CloudRun []CloudRunService `json:"cloudrun,omitempty"`
// CloudFunctions
CloudFunctions []CloudFunction `json:"cloudfunctions,omitempty"`
// Memorystore instances (Redis)
Memorystore []MemorystoreInstance `json:"memorystore,omitempty"`
// BigQuery datasets
BigQuery []BigQueryDataset `json:"bigquery,omitempty"`
// SecretManager secrets
SecretManager []GCPSecret `json:"secretmanager,omitempty"`
// Firestore databases
Firestore []FirestoreDatabase `json:"firestore,omitempty"`
// Spanner instances
Spanner []SpannerInstance `json:"spanner,omitempty"`
// VPC network
VPCNetwork string `json:"vpcNetwork,omitempty"`
}
GCPResources contains GCP-specific resource bindings.
type GCPSecret ¶
type GCPSecret struct {
// Name of the secret
Name string `json:"name"`
}
GCPSecret represents a Secret Manager secret.
type GCSBucket ¶
type GCSBucket struct {
// Name of the bucket
Name string `json:"name"`
}
GCSBucket represents a GCS bucket.
type GenericResources ¶
type GenericResources struct {
// Redis instances
Redis []RedisInstance `json:"redis,omitempty"`
// Kafka clusters
Kafka []KafkaCluster `json:"kafka,omitempty"`
// Elasticsearch clusters
Elasticsearch []ElasticsearchCluster `json:"elasticsearch,omitempty"`
// MongoDB instances
MongoDB []MongoDBInstance `json:"mongodb,omitempty"`
// PostgreSQL databases
PostgreSQL []PostgreSQLDatabase `json:"postgresql,omitempty"`
// MySQL databases
MySQL []MySQLDatabase `json:"mysql,omitempty"`
// RabbitMQ instances
RabbitMQ []RabbitMQInstance `json:"rabbitmq,omitempty"`
// Cassandra clusters
Cassandra []CassandraCluster `json:"cassandra,omitempty"`
// Memcached instances
Memcached []MemcachedInstance `json:"memcached,omitempty"`
// Minio (S3-compatible) instances
Minio []MinioInstance `json:"minio,omitempty"`
// NATS servers
NATS []NATSServer `json:"nats,omitempty"`
// etcd clusters
Etcd []EtcdCluster `json:"etcd,omitempty"`
// Vault (HashiCorp) instances
Vault []VaultInstance `json:"vault,omitempty"`
// Consul instances
Consul []ConsulInstance `json:"consul,omitempty"`
}
GenericResources contains provider-agnostic resource bindings. Use these for self-hosted or multi-cloud deployments.
type GitRepo ¶
type GitRepo struct {
// URL is the full repository URL (e.g., "https://github.com/org/repo")
URL string `json:"url"`
// Path is the relative path within the repo (for monorepos)
Path string `json:"path,omitempty"`
// Ref is the git reference (branch, tag, or commit)
Ref string `json:"ref,omitempty"`
// Commit is the specific commit SHA (for pinning)
Commit string `json:"commit,omitempty"`
}
GitRepo represents a source code repository.
type HelmDeployment ¶
type HelmDeployment struct {
// Chart is the chart name or URL
Chart string `json:"chart"`
// Version is the chart version
Version string `json:"version,omitempty"`
// Repo is the Helm repository URL
Repo string `json:"repo,omitempty"`
// ValuesFile is the path to values file (relative to system spec)
ValuesFile string `json:"valuesFile,omitempty"`
// Services lists which services this chart deploys
Services []string `json:"services,omitempty"`
}
HelmDeployment references a Helm chart for deployment.
type KafkaCluster ¶
type KafkaCluster struct {
// Name of the cluster
Name string `json:"name"`
// Bootstrap servers (comma-separated)
BootstrapServers string `json:"bootstrapServers,omitempty"`
}
KafkaCluster represents a Kafka cluster.
type KinesisStream ¶
type KinesisStream struct {
// Name of the stream
Name string `json:"name"`
}
KinesisStream represents a Kinesis data stream.
type LambdaFunction ¶
type LambdaFunction struct {
// Name of the function
Name string `json:"name"`
// Runtime (e.g., "go1.x", "python3.9", "nodejs18.x")
Runtime string `json:"runtime,omitempty"`
}
LambdaFunction represents an AWS Lambda function.
type MemcachedInstance ¶
type MemcachedInstance struct {
// Name of the instance
Name string `json:"name"`
// Host address
Host string `json:"host,omitempty"`
// Port number (default: 11211)
Port int `json:"port,omitempty"`
}
MemcachedInstance represents a Memcached instance.
type MemorystoreInstance ¶
type MemorystoreInstance struct {
// Name of the instance
Name string `json:"name"`
// Port number
Port int `json:"port,omitempty"`
}
MemorystoreInstance represents a Memorystore (Redis) instance.
type MinioInstance ¶
type MinioInstance struct {
// Name of the instance
Name string `json:"name"`
// Endpoint URL
Endpoint string `json:"endpoint,omitempty"`
// Buckets
Buckets []string `json:"buckets,omitempty"`
}
MinioInstance represents a Minio (S3-compatible) instance.
type MongoDBInstance ¶
type MongoDBInstance struct {
// Name of the instance
Name string `json:"name"`
// Host address
Host string `json:"host,omitempty"`
// Port number (default: 27017)
Port int `json:"port,omitempty"`
// Database name
Database string `json:"database,omitempty"`
}
MongoDBInstance represents a MongoDB instance.
type MySQLDatabase ¶
type MySQLDatabase struct {
// Name of the database
Name string `json:"name"`
// Host address
Host string `json:"host,omitempty"`
// Port number (default: 3306)
Port int `json:"port,omitempty"`
}
MySQLDatabase represents a MySQL database.
type NATSServer ¶
type NATSServer struct {
// Name of the server
Name string `json:"name"`
// URL (e.g., "nats://localhost:4222")
URL string `json:"url,omitempty"`
}
NATSServer represents a NATS server.
type Network ¶
type Network struct {
// Description of the network
Description string `json:"description,omitempty"`
// CIDR block for the network
CIDR string `json:"cidr,omitempty"`
// Rules defines firewall/security group rules
Rules []NetworkRule `json:"rules,omitempty"`
}
Network represents a network boundary (VPC, subnet, security group).
type NetworkRule ¶
type NetworkRule struct {
// Direction is "inbound" or "outbound"
Direction string `json:"direction"`
// FromService is the source service (for inbound rules)
FromService string `json:"fromService,omitempty"`
// ToService is the target service (for outbound rules)
ToService string `json:"toService,omitempty"`
// Port number
Port int `json:"port"`
// Protocol (tcp, udp)
Protocol string `json:"protocol"`
// Action is "allow" or "deny"
Action string `json:"action"`
}
NetworkRule represents a firewall or security group rule.
type Owner ¶
type Owner struct {
// Name is the display name (e.g., "Payments Team")
Name string `json:"name"`
// Email is the team contact email
Email string `json:"email,omitempty"`
// Slack is the Slack channel or handle (e.g., "#payments-eng")
Slack string `json:"slack,omitempty"`
// Pager is the PagerDuty/Opsgenie service or escalation policy ID
Pager string `json:"pager,omitempty"`
}
Owner represents a team or individual responsible for services.
type PostgreSQLDatabase ¶
type PostgreSQLDatabase struct {
// Name of the database
Name string `json:"name"`
// Host address
Host string `json:"host,omitempty"`
// Port number (default: 5432)
Port int `json:"port,omitempty"`
}
PostgreSQLDatabase represents a PostgreSQL database.
type PubSubTopic ¶
type PubSubTopic struct {
// Name of the topic
Name string `json:"name"`
}
PubSubTopic represents a Pub/Sub topic.
type R2Bucket ¶
type R2Bucket struct {
// Name of the bucket
Name string `json:"name"`
}
R2Bucket represents a Cloudflare R2 bucket.
type RDSInstance ¶
type RDSInstance struct {
// Name or identifier of the RDS instance
Name string `json:"name"`
// Engine (mysql, postgres, aurora-mysql, etc.)
Engine string `json:"engine,omitempty"`
// Port number
Port int `json:"port,omitempty"`
}
RDSInstance represents an RDS database instance.
type RabbitMQInstance ¶
type RabbitMQInstance struct {
// Name of the instance
Name string `json:"name"`
// Host address
Host string `json:"host,omitempty"`
// Port number (default: 5672)
Port int `json:"port,omitempty"`
// Vhost
Vhost string `json:"vhost,omitempty"`
}
RabbitMQInstance represents a RabbitMQ instance.
type RedisInstance ¶
type RedisInstance struct {
// Name or identifier
Name string `json:"name"`
// Host address
Host string `json:"host,omitempty"`
// Port number (default: 6379)
Port int `json:"port,omitempty"`
}
RedisInstance represents a Redis instance.
type S3Bucket ¶
type S3Bucket struct {
// Name of the bucket
Name string `json:"name"`
}
S3Bucket represents an S3 bucket.
type SNSTopic ¶
type SNSTopic struct {
// Name of the topic
Name string `json:"name"`
}
SNSTopic represents an SNS topic.
type SQSQueue ¶
type SQSQueue struct {
// Name of the queue
Name string `json:"name"`
}
SQSQueue represents an SQS queue.
type SecretsManagerSecret ¶
type SecretsManagerSecret struct {
// Name of the secret
Name string `json:"name"`
}
SecretsManagerSecret represents a Secrets Manager secret.
type Service ¶
type Service struct {
// Description of the service
Description string `json:"description,omitempty"`
// Owner references an owner ID from system.owners
Owner string `json:"owner,omitempty"`
// Repo is the source code repository
Repo *GitRepo `json:"repo,omitempty"`
// Image is the container image specification
Image ContainerImage `json:"image"`
// Registry is the container registry path (e.g., "ghcr.io/org/repo")
Registry string `json:"registry,omitempty"`
// EnvVars documents environment variables for discovering this service
EnvVars *ServiceEnvVars `json:"envVars,omitempty"`
// Connections maps target service name to connection details
Connections map[string]Connection `json:"connections,omitempty"`
// Exposes defines ports/protocols this service exposes
Exposes []Endpoint `json:"exposes,omitempty"`
// AWS contains AWS-specific resource bindings
AWS *AWSResources `json:"aws,omitempty"`
// GCP contains GCP-specific resource bindings
GCP *GCPResources `json:"gcp,omitempty"`
// Azure contains Azure-specific resource bindings
Azure *AzureResources `json:"azure,omitempty"`
// Cloudflare contains Cloudflare resource bindings
Cloudflare *CloudflareResources `json:"cloudflare,omitempty"`
// Resources contains provider-agnostic resource bindings
Resources *GenericResources `json:"resources,omitempty"`
}
Service represents a single microservice or workload.
type ServiceBusNamespace ¶
type ServiceBusNamespace struct {
// Name of the namespace
Name string `json:"name"`
// Queues in this namespace
Queues []string `json:"queues,omitempty"`
// Topics in this namespace
Topics []string `json:"topics,omitempty"`
}
ServiceBusNamespace represents an Azure Service Bus namespace.
type ServiceEnvVars ¶
type ServiceEnvVars struct {
// URL is the env var name for the full service URL (e.g., "PAYMENTS_URL")
URL string `json:"url,omitempty"`
// Host is the env var name for the service host (e.g., "PAYMENTS_SERVICE_HOST")
Host string `json:"host,omitempty"`
// Port is the env var name for the service port (e.g., "PAYMENTS_SERVICE_PORT")
Port string `json:"port,omitempty"`
}
ServiceEnvVars documents environment variables for service discovery.
type SpannerInstance ¶
type SpannerInstance struct {
// Name of the instance
Name string `json:"name"`
// Database name
Database string `json:"database,omitempty"`
}
SpannerInstance represents a Cloud Spanner instance.
type System ¶
type System struct {
// Name is the system identifier (e.g., "payments-platform")
Name string `json:"name"`
// Description provides context about the system
Description string `json:"description,omitempty"`
// Version of this system spec document
Version string `json:"version,omitempty"`
// Owners maps owner ID to owner details for team ownership
Owners map[string]Owner `json:"owners,omitempty"`
// Services maps service name to service definition
Services map[string]Service `json:"services"`
// Networks maps network name to network definition (future)
Networks map[string]Network `json:"networks,omitempty"`
// Deployments maps deployment strategies (helm, terraform) (future)
Deployments *Deployments `json:"deployments,omitempty"`
}
System represents a complete system topology. It contains services, their dependencies, and infrastructure bindings.
func LoadFromFile ¶
LoadFromFile reads and parses a System from a JSON file.
func LoadFromJSON ¶
LoadFromJSON parses a System from JSON data.
func (*System) Lint ¶
Lint checks the System for potential issues and returns warnings. Unlike Validate(), Lint() returns advisory warnings rather than errors.
func (*System) ToJSONCompact ¶
ToJSONCompact serializes the System to compact JSON.
type TerraformDeployment ¶
type TerraformDeployment struct {
// Source is the module source (local path, git URL, registry)
Source string `json:"source"`
// Version is the module version (for registry modules)
Version string `json:"version,omitempty"`
// Path is the path within the source (for git sources)
Path string `json:"path,omitempty"`
// Resources lists which infrastructure resources this module manages
Resources []string `json:"resources,omitempty"`
}
TerraformDeployment references a Terraform module for infrastructure.
type VaultInstance ¶
type VaultInstance struct {
// Name of the instance
Name string `json:"name"`
// Address (e.g., "https://vault.example.com:8200")
Address string `json:"address,omitempty"`
}
VaultInstance represents a HashiCorp Vault instance.
type Warning ¶
type Warning struct {
// Code is a short identifier (e.g., "no-connections", "isolated-service")
Code string
// Service is the service name this warning applies to (empty for system-level)
Service string
// Message is the human-readable warning description
Message string
}
Warning represents a lint warning (advisory, not an error).