mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 17:56:37 +08:00
[文档] 文档更新
This commit is contained in:
@@ -112,12 +112,9 @@ services:
|
|||||||
DSN: postgres://openflare:replace-with-strong-password@postgres:5432/openflare?sslmode=disable
|
DSN: postgres://openflare:replace-with-strong-password@postgres:5432/openflare?sslmode=disable
|
||||||
GIN_MODE: release
|
GIN_MODE: release
|
||||||
LOG_LEVEL: info
|
LOG_LEVEL: info
|
||||||
volumes:
|
|
||||||
- openflare-data:/data
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
openflare-data:
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -199,17 +196,6 @@ cd openflare_agent
|
|||||||
go run ./cmd/agent -config /path/to/agent.json
|
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 UI:`/swagger/index.html`
|
||||||
|
|
||||||
如需重新生成 Swagger 文档,请使用与服务端依赖一致的版本:
|
|
||||||
`go install github.com/swaggo/swag/cmd/swag@v1.16.4`
|
|
||||||
|
|
||||||
## 开源协议
|
## 开源协议
|
||||||
|
|
||||||
本项目采用 [Apache License 2.0](./LICENSE) 开源。
|
本项目采用 [Apache License 2.0](./LICENSE) 开源。
|
||||||
|
|||||||
@@ -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": {
|
"/api/option/geoip/lookup": {
|
||||||
"post": {
|
"post": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
@@ -2351,22 +2379,19 @@ const docTemplate = `{
|
|||||||
"source_countries": {
|
"source_countries": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "integer",
|
"type": "integer"
|
||||||
"format": "int64"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"status_codes": {
|
"status_codes": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "integer",
|
"type": "integer"
|
||||||
"format": "int64"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"top_domains": {
|
"top_domains": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "integer",
|
"type": "integer"
|
||||||
"format": "int64"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"unique_visitor_count": {
|
"unique_visitor_count": {
|
||||||
|
|||||||
@@ -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": {
|
"/api/option/geoip/lookup": {
|
||||||
"post": {
|
"post": {
|
||||||
"consumes": [
|
"consumes": [
|
||||||
@@ -2348,22 +2376,19 @@
|
|||||||
"source_countries": {
|
"source_countries": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "integer",
|
"type": "integer"
|
||||||
"format": "int64"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"status_codes": {
|
"status_codes": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "integer",
|
"type": "integer"
|
||||||
"format": "int64"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"top_domains": {
|
"top_domains": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "integer",
|
"type": "integer"
|
||||||
"format": "int64"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"unique_visitor_count": {
|
"unique_visitor_count": {
|
||||||
|
|||||||
@@ -156,17 +156,14 @@ definitions:
|
|||||||
type: integer
|
type: integer
|
||||||
source_countries:
|
source_countries:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
format: int64
|
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
status_codes:
|
status_codes:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
format: int64
|
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
top_domains:
|
top_domains:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
format: int64
|
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
unique_visitor_count:
|
unique_visitor_count:
|
||||||
@@ -1178,6 +1175,23 @@ paths:
|
|||||||
summary: List editable options
|
summary: List editable options
|
||||||
tags:
|
tags:
|
||||||
- Options
|
- 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:
|
/api/option/geoip/lookup:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user