Back to Skills

goframe-v2

GoFrame v2 development skill. Use only when the target Go project uses or is explicitly adopting GoFrame v2: the nearest go.mod requires github.com/gogf/gf/v2, existing Go files import github.com/gogf/gf/v2 or any github.com/gogf/gf/v2/... component package, or the user asks to scaffold, migrate, or build with GoFrame. Trigger for GoFrame-backed Go work such as APIs/controllers/services, middleware, routing/config, ORM/DAO/DO/entity/database operations, gf CLI/codegen, HTTP/gRPC services, and mi

72stars2forksUpdated 6/15/2026

Security Assessment

Low Risk(70/100)

Detected risks:

Secret Exposure([examples/database/encoded-pass/README.MD] PASSWORD=, [examples/database/encoded-pass/README.ZH.MD] PASSWORD=, [examples/nosql/mongodb/README.MD] PASSWORD=)
Security Score70/100

About goframe-v2

This skill provides seamless integration between Tencent Cloud Polaris configuration center and GoFrame applications, enabling dynamic configuration management for cloud-native microservices. It demonstrates how to set up a Polaris client, implement configuration adapters, and manage centralized configuration across distributed services. The skill addresses the challenge of managing configuration in microservice architectures where configuration needs to be updated dynamically without service restarts, supporting features like namespace isolation, file group management, and secure configuration retrieval.

The main capabilities include Polaris client initialization and setup, configuration adapter implementation for GoFrame's config component, dynamic configuration loading with hot-reloading support, real-time configuration watch and synchronization, namespace and file group management, and comprehensive error handling with logging mechanisms. It supports multiple namespaces and configuration groups, automatic configuration refresh, type-safe configuration access, and integrates with Polaris service mesh for unified service governance. The implementation provides production-ready monitoring and ensures configuration changes in Polaris are automatically reflected in running applications.

This skill is ideal for developers building cloud-native microservices on Tencent Cloud or using Polaris mesh that require centralized configuration management, service discovery, traffic management, and unified configuration governance. It's particularly valuable for teams managing multiple microservices that need consistent configuration across environments, real-time configuration updates without downtime, and integration with service mesh capabilities. The example is suitable for both development and production environments, offering a complete reference implementation with proper error handling and monitoring.

FAQ

What version of Go and GoFrame is required?

This skill requires Go 1.22 or higher and uses the GoFrame framework. You'll also need the GoFrame Polaris Config contrib package from github.com/gogf/gf/tree/master/contrib/config/polaris.

How do I set up a Polaris server for testing?

You can quickly start a Polaris server using Docker with the command: docker run -d --name polaris -p 8090:8090 -p 8091:8091 polarismesh/polaris-server. The console will be accessible at http://localhost:8090 on port 8090, and the gRPC service runs on the default port.

Does this support automatic configuration updates without restarting the application?

Yes, the skill includes dynamic configuration updates with hot-reloading support. It implements configuration watching, change notification, and automatic refresh capabilities, allowing your application to pick up configuration changes from Polaris in real-time without requiring a restart.

What authentication and security features are supported?

The integration supports namespace isolation for multi-tenant environments, group-level access control for fine-grained permissions, and access token support for secure authentication with the Polaris server.

Can I use this with multiple configuration namespaces and groups?

Yes, the skill supports multiple namespaces and configuration groups, allowing you to organize configurations by environment, service, or any other logical grouping. You can configure namespace, file group, and file name settings during client initialization.

All Files

170 files
examples/balancer/http/client/client.go1.6 KB
View
examples/balancer/polaris/client/client.go2.8 KB
View
examples/config/apollo/boot/boot.go1.7 KB
View
examples/config/consul/boot/boot.go2.2 KB
View
examples/config/kubecm/boot_in_pod/boot.go2.0 KB
View
examples/config/polaris/README.MD4.2 KB
View
examples/config/polaris/testdata/polaris.yaml0.2 KB
View
examples/database/encoded-pass/main.go0.7 KB
View
examples/grpc/balancer/go.sum8.1 KB
View
examples/grpc/balancer/server/config.yaml0.2 KB
View
examples/grpc/basic/protobuf/helloworld_grpc.pb.go3.4 KB
View
examples/database/encoded-pass/go.mod1.4 KB
View
examples/grpc/balancer/controller/helloworld.go0.7 KB
View
examples/grpc/basic/protobuf/helloworld.pb.go6.7 KB
View
examples/grpc/basic/server/config.yaml0.2 KB
View
examples/grpc/ctx/client/client.go2.1 KB
View
examples/grpc/ctx/controller/helloworld.go2.0 KB
View
examples/grpc/ctx/protobuf/helloworld.proto0.5 KB
View
examples/grpc/rawgrpc/go.mod1.6 KB
View
examples/nosql/redis/go.sum7.7 KB
View
examples/balancer/http/go.sum13.7 KB
View
examples/balancer/polaris/go.sum99.7 KB
View
examples/config/apollo/go.sum63.0 KB
View
examples/config/consul/go.sum26.2 KB
View
examples/config/kubecm/go.mod3.1 KB
View
examples/config/nacos/go.mod4.2 KB
View
examples/config/polaris/go.mod2.6 KB
View
examples/database/encoded-pass/config.yaml0.1 KB
View
examples/database/encoded-pass/README.MD4.4 KB
View
examples/grpc/balancer/protobuf/helloworld_grpc.pb.go4.3 KB
View
examples/grpc/balancer/server/server.go1.2 KB
View
examples/balancer/http/README.ZH.MD0.8 KB
View
examples/balancer/http/go.mod2.2 KB
View
examples/balancer/polaris/go.mod2.6 KB
View
examples/config/apollo/go.mod1.9 KB
View
examples/config/consul/go.mod2.0 KB
View
examples/config/kubecm/boot_out_pod/boot.go2.9 KB
View
examples/config/nacos/boot/boot.go2.4 KB
View
examples/config/polaris/boot/boot.go2.2 KB
View
examples/balancer/http/README.MD2.7 KB
View
examples/balancer/http/server/server.go1.4 KB
View
examples/balancer/polaris/server/server.go2.3 KB
View
examples/config/apollo/README.ZH.MD1.1 KB
View
examples/config/consul/README.ZH.MD1.1 KB
View
examples/config/kubecm/README.MD4.5 KB
View
examples/config/nacos/README.MD3.3 KB
View
examples/balancer/polaris/README.md3.4 KB
View
examples/config/apollo/main.go1.3 KB
View
examples/config/consul/main.go1.5 KB
View
examples/config/kubecm/go.sum18.4 KB
View
examples/config/nacos/go.sum72.3 KB
View
examples/config/polaris/go.sum99.7 KB
View
examples/database/encoded-pass/dbdriver/dbdriver_test.go1.7 KB
View
examples/database/encoded-pass/README.ZH.MD2.2 KB
View
examples/grpc/balancer/protobuf/helloworld.pb.go4.3 KB
View
examples/grpc/basic/client/client.go1.6 KB
View
examples/grpc/basic/protobuf/helloworld.proto0.5 KB
View
examples/grpc/ctx/go.mod1.6 KB
View
examples/grpc/ctx/README.ZH.MD1.1 KB
View
examples/grpc/rawgrpc/helloworld/helloworld_grpc.pb.go3.5 KB
View
examples/grpc/resolver/client/client.go1.7 KB
View
examples/httpserver/basic-auth/go.sum6.8 KB
View
examples/httpserver/jwt/go.sum7.0 KB
View
examples/httpserver/jwt/internal/middleware/jwt.go1.6 KB
View
examples/httpserver/mcp-http/main.go1.2 KB
View
examples/httpserver/mcp-sse/README.MD3.5 KB
View
examples/balancer/polaris/README.ZH.MD1.5 KB
View
examples/config/apollo/README.MD4.3 KB
View
examples/config/consul/README.MD3.9 KB
View
examples/config/kubecm/main.go1.5 KB
View
examples/config/nacos/main.go1.5 KB
View
examples/config/polaris/main.go1.5 KB
View
examples/database/encoded-pass/dbdriver/dbdriver.go2.7 KB
View
examples/grpc/balancer/client/client.go2.1 KB
View
examples/grpc/balancer/protobuf/helloworld.proto0.5 KB
View
examples/grpc/basic/controller/helloworld.go0.7 KB
View
examples/grpc/basic/README.MD3.0 KB
View
examples/grpc/ctx/go.sum8.1 KB
View
examples/grpc/ctx/server/config.yaml0.2 KB
View
examples/grpc/rawgrpc/helloworld/helloworld.pb.go8.0 KB
View
examples/grpc/resolver/controller/helloworld.go1.7 KB
View
examples/config/kubecm/README.ZH.MD1.1 KB
View
examples/config/nacos/README.ZH.MD1.2 KB
View
examples/config/polaris/README.ZH.MD1.2 KB
View
examples/database/encoded-pass/go.sum7.3 KB
View
examples/grpc/balancer/go.mod1.6 KB
View
examples/grpc/balancer/README.ZH.MD1.2 KB
View
examples/grpc/basic/go.sum8.1 KB
View
examples/grpc/basic/server/server.go1.2 KB
View
examples/grpc/ctx/protobuf/helloworld.pb.go6.7 KB
View
examples/grpc/rawgrpc/client/client.go2.1 KB
View
examples/grpc/balancer/README.MD3.3 KB
View
examples/grpc/basic/go.mod1.6 KB
View
examples/grpc/basic/README.ZH.MD1.1 KB
View
examples/grpc/ctx/protobuf/helloworld_grpc.pb.go3.4 KB
View
examples/grpc/ctx/server/server.go1.3 KB
View
examples/grpc/rawgrpc/helloworld/helloworld.proto0.5 KB
View
examples/grpc/resolver/go.mod2.2 KB
View
examples/grpc/resolver/README.ZH.MD1.4 KB
View
examples/httpserver/basic-auth/README.MD3.9 KB
View
examples/grpc/ctx/README.MD3.1 KB
View
examples/grpc/rawgrpc/go.sum8.1 KB
View
examples/grpc/rawgrpc/server/server.go2.3 KB
View
examples/grpc/resolver/protobuf/helloworld.pb.go6.7 KB
View
examples/httpserver/basic-auth/go.mod1.3 KB
View
examples/httpserver/jwt/go.mod1.4 KB
View
examples/httpserver/mcp-http/go.sum8.5 KB
View
examples/httpserver/mcp-sse/main.go1.5 KB
View
examples/httpserver/proxy/README.MD3.2 KB
View
examples/httpserver/rate-limit/README.ZH.MD1.0 KB
View
examples/httpserver/sse/go.mod1.3 KB
View
examples/httpserver/swagger-auth/go.sum6.8 KB
View
examples/httpserver/upload-file/main.go2.4 KB
View
examples/nosql/mongodb/go.sum10.9 KB
View
examples/grpc/rawgrpc/README.MD3.1 KB
View
examples/grpc/resolver/go.sum13.9 KB
View
examples/grpc/resolver/server/config.yaml0.2 KB
View
examples/httpserver/basic-auth/README.ZH.MD2.0 KB
View
examples/httpserver/jwt/README.ZH.MD1.7 KB
View
examples/httpserver/mcp-sse/go.mod1.7 KB
View
examples/httpserver/proxy/go.sum6.8 KB
View
examples/httpserver/rate-limit/main.go2.5 KB
View
examples/httpserver/response-json-array/README.MD2.9 KB
View
examples/httpserver/sse/README.ZH.MD1.6 KB
View
examples/httpserver/upload-file/go.mod1.3 KB
View
examples/nosql/mongodb/config.yaml0.1 KB
View
examples/nosql/redis/config.yaml0.0 KB
View
examples/grpc/rawgrpc/README.ZH.MD1.2 KB
View
examples/grpc/resolver/protobuf/helloworld_grpc.pb.go3.4 KB
View
examples/grpc/resolver/protobuf/helloworld.proto0.5 KB
View
examples/grpc/resolver/server/server.go1.4 KB
View
examples/httpserver/jwt/api/v1/auth.go0.9 KB
View
examples/httpserver/mcp-http/go.mod1.7 KB
View
examples/httpserver/mcp-sse/go.sum8.5 KB
View
examples/httpserver/proxy/main.go3.0 KB
View
examples/httpserver/rate-limit/README.MD3.1 KB
View
examples/httpserver/response-json-array/README.ZH.MD1.0 KB
View
examples/httpserver/swagger-auth/go.mod1.3 KB
View
examples/httpserver/upload-file/go.sum6.8 KB
View
examples/nosql/mongodb/go.mod1.8 KB
View
examples/nosql/redis/go.mod1.5 KB
View
examples/grpc/resolver/README.MD3.3 KB
View
examples/httpserver/basic-auth/main.go1.1 KB
View
examples/httpserver/jwt/internal/controller/auth.go2.0 KB
View
examples/httpserver/jwt/main.go0.8 KB
View
examples/httpserver/mcp-http/README.MD4.2 KB
View
examples/httpserver/mcp-sse/README.ZH.MD1.9 KB
View
examples/httpserver/rate-limit/go.mod1.4 KB
View
examples/httpserver/response-json-array/go.sum6.8 KB
View
examples/httpserver/sse/main.go3.0 KB
View
examples/httpserver/swagger-auth/README.MD3.3 KB
View
examples/httpserver/upload-file/README.ZH.MD1.0 KB
View
examples/nosql/mongodb/README.MD3.4 KB
View
examples/httpserver/jwt/README.MD2.9 KB
View
examples/httpserver/mcp-http/README.ZH.MD2.5 KB
View
examples/httpserver/proxy/go.mod1.3 KB
View
examples/httpserver/rate-limit/go.sum7.0 KB
View
examples/httpserver/response-json-array/main.go2.3 KB
View
examples/httpserver/sse/README.MD3.1 KB
View
examples/httpserver/swagger-auth/README.ZH.MD1.9 KB
View
examples/httpserver/upload-file/static/index.html4.9 KB
View
examples/nosql/mongodb/README.ZH.MD1.8 KB
View
examples/httpserver/proxy/README.ZH.MD1.0 KB
View
examples/httpserver/response-json-array/go.mod1.3 KB
View
examples/httpserver/sse/go.sum6.8 KB
View
examples/httpserver/swagger-auth/main.go2.4 KB
View
examples/httpserver/upload-file/README.MD3.5 KB
View
examples/nosql/mongodb/main.go3.4 KB
View
examples/nosql/redis/main.go2.0 KB
View
examples/nosql/redis/README.MD3.0 KB
View

Install goframe-v2

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

gogf/skills