c050955157
新增数据预加载功能,优化配置缓存逻辑,支持健康检查接口,调整兰空图床获取器的重试机制(指数退避),提升系统性能和稳定性。
2025-06-15 06:12:46 +08:00
5960444dc9
重构处理器逻辑,统一Handler命名为handler,更新相关引用;重命名模型为model,优化数据库迁移和配置获取逻辑,移除不再使用的处理器文件,简化代码结构。
2025-06-14 20:24:34 +08:00
bcc333b142
重构路由设置逻辑,统一配置所有路由,新增公开首页配置处理方法,更新前端API调用路径以匹配新路由结构。
2025-06-14 20:17:41 +08:00
5176cc85db
重构Handlers结构,新增HandlePublicEndpoints方法以处理公开端点信息请求,优化URL统计缓存逻辑,更新Router以支持新路由,简化认证信息管理,移除不再使用的刷新令牌逻辑。
2025-06-14 20:00:01 +08:00
f2456e116b
删除不再使用的配置文件和脚本,更新Dockerfile以支持前后端构建,重构配置加载逻辑,添加OAuth2.0支持,优化API处理和路由设置。
2025-06-14 17:40:31 +08:00
fd9c616aa2
feat(main, handlers): initialize random number generator and enhance URL stats response format
...
- Added initialization of a random number generator in main.go to support future features.
- Refactored HandleURLStats in handlers.go to return URL statistics in a structured format, improving API response clarity and usability.
2024-11-30 23:56:21 +08:00
88c86787a0
refactor(main): reorder configuration loading and directory creation in Initialize method
...
- Moved the configuration loading to occur before creating necessary directories.
- Improved code clarity by ensuring that configuration is loaded prior to any directory operations.
2024-11-30 23:30:17 +08:00
e70ca4cf52
feat(docker, config, api): update docker-compose for logging, enhance app structure, and add system metrics display
...
- Updated docker-compose.yml to mount logs directory.
- Changed BASE_URL environment variable to point to the new API endpoint.
- Refactored main.go to implement a structured App type, improving initialization and graceful shutdown.
- Enhanced config management with JSON loading and environment variable support.
- Added monitoring capabilities in api_handler for logging request metrics.
- Introduced new metrics display in index.html with corresponding CSS styles for better visualization.
2024-11-30 23:23:58 +08:00
981759be39
feat(api, services, handlers): add URL statistics endpoint and service initialization
2024-11-16 05:21:05 +08:00
236ef74f85
feat: refactor code structure and move utility functions to separate package
2024-10-27 05:04:33 +08:00
147bda8251
refactor(main): 取消算法, 改成完全随机simplify URLSelector and remove unnecessary fields
2024-10-27 04:40:53 +08:00
749cd088b7
refactor: update environment variable and csv file handling
2024-10-27 02:40:53 +08:00
ba25817111
feat: add support for CSV_BASE_URL environment variable and update file reading logic
2024-10-27 02:02:15 +08:00
0537e46ef6
refactor(main): remove unused cache duration and last fetch time
2024-10-26 16:01:20 +08:00
96f41e374f
refactor(main, logging, utils): Refactor logging and IP extraction logic
...
Move setupLogging to logging package and create GetRealIP utility function
2024-10-26 15:46:00 +08:00
39155ac1bb
feat(api, stats): add graceful shutdown and periodic stats saving
2024-10-26 15:29:21 +08:00
ff2163b207
feat: update random-api-go service and UI with stats display
2024-10-26 14:28:04 +08:00
fe18d6c828
feat(api, stats): add stats manager and endpoint call tracking
2024-10-26 12:39:00 +08:00
485594497c
增加来源域名日志及错误日志格式化输出
2024-10-14 12:19:03 +08:00
c4bb234c2c
添加互斥锁以保护URLSelector结构体的并发访问
2024-10-13 18:17:52 +08:00
f8737684ef
去重, 无重复选择(3次内), 洗牌算法
2024-10-13 11:57:07 +08:00
f3dae5dfa5
丰富日志
2024-09-12 17:21:37 +08:00
e10049f57c
fix
2024-09-12 17:14:16 +08:00
7ee5c10ea3
修复
2024-09-12 17:06:18 +08:00
8287d9f726
feat: refactor main.go and readme.md to improve IP handling and logging
2024-09-12 17:00:32 +08:00
0aaed93abc
feat: refactor Dockerfile and implement new CSV handling logic
2024-09-12 16:37:03 +08:00
7fd2ac2283
first commit
2024-09-12 15:48:31 +08:00