[文档] 文档更新

This commit is contained in:
ryan
2026-03-19 21:17:23 +08:00
parent dc72c78b7f
commit 7b9377eb21
4 changed files with 79 additions and 32 deletions
-17
View File
@@ -112,12 +112,9 @@ services:
DSN: postgres://openflare:replace-with-strong-password@postgres:5432/openflare?sslmode=disable
GIN_MODE: release
LOG_LEVEL: info
volumes:
- openflare-data:/data
volumes:
postgres-data:
openflare-data:
```
```bash
@@ -199,17 +196,6 @@ cd openflare_agent
go run ./cmd/agent -config /path/to/agent.json
```
## 文档导航
建议按以下顺序阅读:
1. [docs/design.md](./docs/design.md)
2. [docs/development-guidelines.md](./docs/development-guidelines.md)
3. [docs/development-plan.md](./docs/development-plan.md)
4. [docs/frontend-development-guidelines.md](./docs/frontend-development-guidelines.md)
5. [docs/deployment.md](./docs/deployment.md)
6. [docs/app-config.md](./docs/app-config.md)
## 管理端与接口
管理端当前覆盖:
@@ -226,9 +212,6 @@ go run ./cmd/agent -config /path/to/agent.json
登录管理端后,可访问 Swagger UI:`/swagger/index.html`
如需重新生成 Swagger 文档,请使用与服务端依赖一致的版本:
`go install github.com/swaggo/swag/cmd/swag@v1.16.4`
## 开源协议
本项目采用 [Apache License 2.0](./LICENSE) 开源。
+31 -6
View File
@@ -1442,6 +1442,34 @@ const docTemplate = `{
}
}
},
"/api/option/database/cleanup": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Options"
],
"summary": "Cleanup observability tables",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/option/geoip/lookup": {
"post": {
"consumes": [
@@ -2351,22 +2379,19 @@ const docTemplate = `{
"source_countries": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
"type": "integer"
}
},
"status_codes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
"type": "integer"
}
},
"top_domains": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
"type": "integer"
}
},
"unique_visitor_count": {
+31 -6
View File
@@ -1439,6 +1439,34 @@
}
}
},
"/api/option/database/cleanup": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Options"
],
"summary": "Cleanup observability tables",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/option/geoip/lookup": {
"post": {
"consumes": [
@@ -2348,22 +2376,19 @@
"source_countries": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
"type": "integer"
}
},
"status_codes": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
"type": "integer"
}
},
"top_domains": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
"type": "integer"
}
},
"unique_visitor_count": {
+17 -3
View File
@@ -156,17 +156,14 @@ definitions:
type: integer
source_countries:
additionalProperties:
format: int64
type: integer
type: object
status_codes:
additionalProperties:
format: int64
type: integer
type: object
top_domains:
additionalProperties:
format: int64
type: integer
type: object
unique_visitor_count:
@@ -1178,6 +1175,23 @@ paths:
summary: List editable options
tags:
- Options
/api/option/database/cleanup:
post:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties: true
type: object
security:
- BearerAuth: []
summary: Cleanup observability tables
tags:
- Options
/api/option/geoip/lookup:
post:
consumes: