English | 简体中文
An enterprise-level language heterogeneous microservice solution that supports grpc and http protocols. The single-service code framework adheres to the principle of minimalism, while providing complete devops process support (gitops).
contributing · security · good first issues
- Follow RESTful API Design Specifications
- Login support idp(dex)
- Support for Swagger documentation (based on swaggo)
- Code generation tool
- Perfect cicd package
- Comprehensive core libraries (log, cache, queue, search, config)
- Multi-database support (MySQL, PostgreSQL, SQLite, MongoDB)
- Multi-storage provider support (local, S3, embed)
- Advanced error handling with standardized error codes
- Action scope management for context-aware operations
- Extensive middleware ecosystem
- Enhanced Error Handling: Standardized error codes and improved error propagation
- Action Scope Management: Better context management for complex operations
- Query Cache Invalidation: More complete GORM query-cache tag invalidation for create, update, and delete paths
- Mongo Safety: ObjectID validation before Mongo delete operations
- Dependency Updates: Comprehensive dependency refresh across all modules
- Performance Optimizations: Improved memory usage and response times
- Test Coverage: Comprehensive test suite with 80%+ coverage requirement
- Integration Testing: Robust integration tests for all core components
- CI/CD Pipeline: Enhanced GitHub Actions workflow with quality gates
- Open Source Intake: Structured issue forms and refreshed contributor entry points
- Comprehensive Guides: Updated documentation for all core features
- API Reference: Complete Swagger documentation for all endpoints
- Migration Guides: Clear upgrade paths from previous versions
The request flow uses a small set of repeated terms:
- Controller: A
pkg/response.Controllerimplementation that owns a route path, route-level Gin handlers, and the mapping from an action name to a concreteAction.pkg/response/controller.Simplechooses provider-specific actions for GORM, MGM, or Kubernetes models. - Action: A named request operation such as
get,search,control, ordelete. An action implementsresponse.Action, returns a Gin handler chain, and contains the provider-specific logic for handling that operation. - Hook: A callback attached to a lifecycle point. Common examples are
BeforeCreate,AfterUpdate,BeforeSearch, config sourcePrefixHook/PostHook, and server start or shutdown hooks. - Scope: A per-request query filter, usually supplied through
WithScope, that turns the current Gin context and model table into a GORM scope. Use scopes for tenant filters, ownership filters, or other contextual constraints. - Provider: The selected backend implementation for a model, config source, or storage target. For controllers this is usually
ModelProviderGorm,ModelProviderMgm, orModelProviderK8S; config and storage packages have their own provider enums.
- Support dynamodb
- Support config provider
- Support istio traces
- Out-of-the-box support
- Enhanced error handling (v0.7.x)
- Action scope management (v0.7.x)
- Comprehensive testing infrastructure (v0.7.x)
The project follows strict testing requirements:
- Unit Tests:
*_test.gofiles alongside source code - Integration Tests: Database and API integration validation
- E2E Tests: Full stack testing with real dependencies
- Minimum Coverage: 80%
- Critical Components: 85%+
- New Code: Must meet or exceed existing coverage
# Required local test gate
go test ./...
# Coverage report
go test ./... -coverprofile=coverage.out
go tool cover -func=coverage.out
# Integration tests (requires configured external services)
go test -tags=integration ./...Integration-style tests should skip when optional databases, object storage, Kubernetes clusters, cloud credentials, or other external services are not configured.
# Install the tools used by the CI lint job when they are not already available
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
# Local lint sweep
golangci-lint run ./...The GitHub Actions lint job runs golangci-lint from the repository root with the latest action-provided version. If a local binary was built with an older Go version than go.mod targets, reinstall it before running the sweep. The lint job is currently advisory while the existing lint backlog is reduced; go test ./... remains the required CI gate.
- Go 1.26+
go get github.com/mss-boot-io/mss-boot@v0.7.3package main
import (
"github.com/mss-boot-io/mss-boot/core/server"
"github.com/mss-boot-io/mss-boot/pkg/log"
)
func main() {
s := server.New()
if err := s.Run(); err != nil {
log.Fatal("server run failed", log.Err(err))
}
}make tidy
make test
make coverage
make lintFor detailed release notes and migration guides, see CHANGELOG.md.
The mss-boot-io project has always been developed in the GoLand integrated development environment under JetBrains, based on the free JetBrains Open Source license(s) genuine free license. I would like to express my gratitude.
Copyright (c) 2022 mss-boot-io

