auth(JWT authentication)
A comprehensive JWT authentication system supporting both Gin and gRPC contexts with flexible token extraction and validation.
This is the complete documentation for frx, including detailed usage instructions and examples for all modules.
frx is a collection of Go libraries designed to provide convenient wrappers for common development tasks. It contains non-business logic code, transport frameworks, and standard libraries for large-scale project development, as well as useful toolkits.
The project is organized into several modules, each focusing on a specific aspect of Go development:
To use frx in your Go project, you can install individual modules or the entire package:
1go get github.com/crazyfrankie/frx@latest
A comprehensive JWT authentication system supporting both Gin and gRPC contexts with flexible token extraction and validation.
Thread-safe context caching for HTTP requests, enabling efficient data sharing within request lifecycles without repeated computations or database queries.
Thread-safe consistent hashing implementation with virtual nodes support, ideal for distributed systems and load balancing scenarios.
Flexible configuration management system supporting multiple sources (files, environment variables, remote config centers) with unified reading, watching, and parsing interfaces. Protobuf is recommended for defining configuration structures.
Comprehensive error code management with status codes, stack traces, and configurable error registration for structured error handling.
Thread-safe serialization codec system supporting multiple formats (JSON, XML, YAML, Protocol Buffers, Form) with automatic registration and content-type handling.
A convenient bridge between HTTP requests and gRPC calls, simplifying the process of converting HTTP endpoints to RPC service calls.
A fluent, chainable HTTP client with enhanced functionality for building and executing HTTP requests with automatic error handling and JSON support.
Distributed unique ID generation using Redis as the coordination backend, suitable for high-concurrency scenarios.
Type-safe JSON caching functionality with Redis backend, supporting generic types for compile-time type safety.
Utility functions and extensions for common Go programming tasks, organized into several sub-packages.
A comprehensive logging system with multiple interfaces, level-based filtering, and flexible output configuration, designed for high-performance applications.
Enhanced logging capabilities built on top of Uber’s Zap logger, with additional features like sensitive data masking.