How useinsider/go-pkg works
Project type and purpose
• This repository is a Go “monorepo” containing a collection of reusable Go packages (“go-pkg”).
• It is intended to be imported by other Go applications to provide common functionality: caching, error wrapping, logging, metrics (dash), AWS integrations (Kinesis, SQS, SSM), Redis, SQL, HTTP requester, and Sentry.
File structure
• Top-level files: go.mod/go.sum, CI workflows (.github/workflows), license, README, SECURITY.MD.
• Each subdirectory (inscacheable, inscodeerr, insdash, inskinesis, inslogger, insredis, insrequester, inssentry, inssimpleroute, inssql, inssqs, insssm) is a standalone package.
• Tests and mocks in many packages indicate a clear boundary for unit testing each component.
• No “application” binary here—this is a library repository.
Key README insights
• Lists available packages: Redis, Sentry, Sql, Cacheable, Ssm (and others present in file tree).
• Usage example shows how an external Go program would import the needed sub-package(s).
a. Main components
• Consumer Application
• Core Utility Packages
– inscodeerr (error handling)
– insdash (metrics/monitoring)
– inslogger (structured logging)
– insrequester (HTTP client)
– inscacheable (in-memory or distributed caching abstraction)
– inssimpleroute (URI encoding/decoding helper)
• External Service Adapters
– insredis → Redis
– inssql → SQL-database
– inssentry → Sentry
– inssqs → AWS SQS
– inskinesis → AWS Kinesis
– insssm → AWS SSM Parameter Store
b. Relationships and interactions
• The Consumer Application imports one or more of these packages.
• Core utility packages are independent and can be used standalone or composed.
• Each adapter package manages its own connection to an external system.
• Some adapters rely on core utilities (e.g., insredis may use inslogger for logging).
c. Architectural patterns and design principles
• Modular, package-based design—each folder is a single responsibility.
• Use of interfaces and mocks for easy unit testing and DI (see *_mock.go).
• Separation of concerns: utility vs external service adapters.
• Dependency inversion: application code depends on interfaces, not implementations.
d. Technologies, frameworks, libraries
• Language: Go modules.
• Testing: built-in go test, table-driven tests, mocks/fakes.
• AWS SDK clients wrapped in inskinesis, inssqs, insssm.
Detail
• Break out each package as its own node.
• Keep names consistent with import paths (github.com/useinsider/go-pkg/insredis).