Skip to content

ArcGo Documentation

ArcGo

ArcGo is a modular Go backend infrastructure toolkit. It consists of independent packages, so you can adopt only what you need.

Quick Start

go get github.com/DaiYuANg/arcgo/{package}

Package Overview

PackagePurposeDescription
authxAuthentication & AuthorizationExtensible abstraction for multi-scenario authentication and authorization
clientxProtocol ClientsProtocol-oriented clients (http/tcp/udp) with shared engineering conventions
collectionxData StructuresGeneric collections and concurrency-safe structures
configxConfiguration ManagementHierarchical configuration loading and validation
dixApplication FrameworkStrongly typed modular app framework built on do
eventxEvent BusIn-process strongly typed event bus
httpxHTTP RoutingMulti-framework unified strongly typed HTTP routing
kvxRedis / Valkey AccessStrongly typed Redis / Valkey object access and repository layer
logxLoggingStructured logging with slog interoperability
observabilityxObservabilityOptional observability abstraction (OTel/Prometheus)
dbxORM & MigrationsSchema-first / generic-first ORM core on database/sql(包含 dbx/sqltmplx

Roadmap

How to Choose

  • Need container/data utilities: Start with collectionx
  • Need an extensible authentication/authorization abstraction: Start with authx
  • Need protocol-oriented clients (http/tcp/udp) with shared conventions: Start with clientx
  • Need configuration loading from .env + files + environment variables: Start with configx
  • Need modular application composition, typed DI, lifecycle, and startup validation: Start with dix
  • Need in-process typed pub/sub: Start with eventx
  • Need unified typed HTTP handlers across frameworks: Start with httpx
  • Need strongly typed Redis / Valkey repositories and access helpers: Start with kvx
  • Need SQL-first dynamic query templating with optional parser-backed validation: Start with dbx(includes dbx/sqltmplx
  • Need structured logging with rotation: Start with logx
  • Need optional telemetry abstraction (OTel/Prometheus): Start with observabilityx

Typical Combinations

  • API Service Baseline: httpx + configx + logx
  • Modular App Baseline: dix + configx + logx
  • Event-driven within monolith: eventx + logx
  • Redis / Valkey-backed service: kvx + httpx + configx
  • Data-intensive tools/internal libraries: collectionx + configx

Common Commands

# Format code
go tool task fmt

# Lint code
go tool task lint

# Run tests
go tool task test

# Full check
go tool task check

Pre-commit Git Hook

The repository uses lefthook (managed via go tool).

Install once per clone:

go tool task git:hooks:install

Run hooks manually:

go tool task git:hooks:run

The pre-commit hook runs:

  • go tool task fmt
  • go tool task lint

Notes

  • Code comments are unified in English
  • Chinese documentation uses _index.md files

Links