How one2nc/cloudlens works
Main Components Identification
The system can be broken down into these major components:
a) Core Application Layer:
• Command Interface (cmd/)
• User Interface (internal/ui/)
• View Management (internal/view/)
• Model Layer (internal/model/)
b) Cloud Provider Interfaces:
• AWS Integration (internal/aws/)
• GCP Integration (internal/gcp/)
c) Data Access Layer:
• DAO Layer (internal/dao/)
• Rendering Layer (internal/render/)
┌─────────────────────────────────────────────────────┐
• User Interface │
• (Terminal-based UI with k9s-like navigation) │
• ┤
• View Layer │
• (Resource-specific views: EC2, S3, VM, Storage) │
• ┤
• Model Layer │
• (Data models and business logic) │
• ┬──────────────────────────────────┤
• AWS Interface │ GCP Interface │
• ┴──────────────────────────────────┤
• DAO Layer │
• (Data Access Objects for cloud resources) │
• ┤
• Cloud Provider SDKs │
• (AWS SDK, GCP SDK, LocalStack) │
• ┘
Key Relationships to Highlight
a) Command Flow:
• User input → UI Layer → View Layer → Cloud Interface → DAO → Cloud Provider
• Response data flows in reverse
b) Resource Management:
• How different resource types (EC2, S3, VM, Storage) are handled through the layers
Implementation Details
• Supported cloud services:
• AWS: EC2, S3, EBS, VPC, SQS, Lambda, IAM
• GCP: VM, Storage, Disks, Snapshots, Images
• Terminal UI components:
• Navigation system
• Resource viewers
• Command interface
External Dependencies
• Integration points with:
• AWS SDK
• GCP SDK
• LocalStack (for development)
Remember to emphasize the read-only nature of the tool and its security considerations regarding credential handling, as mentioned in the README's note section.