| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934 |
- basePath: /api
- definitions:
- api.AddressBookForm:
- properties:
- data:
- example: '{"tags":["tag1","tag2","tag3"],"peers":[{"id":"abc","username":"abv-l","hostname":"","platform":"Windows","alias":"","tags":["tag1","tag2"],"hash":"hash"}],"tag_colors":"{\"tag1\":4288585374,\"tag2\":4278238420,\"tag3\":4291681337}"}'
- type: string
- type: object
- api.AuditConnForm:
- properties:
- action:
- type: string
- conn_id:
- type: integer
- id:
- type: string
- ip:
- type: string
- peer:
- items:
- type: string
- type: array
- session_id:
- type: number
- type:
- type: integer
- uuid:
- type: string
- type: object
- api.DeviceInfoInLogin:
- properties:
- name:
- type: string
- os:
- type: string
- type:
- type: string
- type: object
- api.LoginForm:
- properties:
- autoLogin:
- type: boolean
- deviceInfo:
- $ref: '#/definitions/api.DeviceInfoInLogin'
- id:
- type: string
- password:
- maxLength: 20
- minLength: 4
- type: string
- type:
- type: string
- username:
- maxLength: 10
- minLength: 4
- type: string
- uuid:
- type: string
- required:
- - username
- type: object
- api.LoginRes:
- properties:
- access_token:
- type: string
- secret:
- type: string
- tfa_type:
- type: string
- type:
- type: string
- user:
- $ref: '#/definitions/api.UserPayload'
- type: object
- api.PeerForm:
- properties:
- cpu:
- type: string
- hostname:
- type: string
- id:
- type: string
- memory:
- type: string
- os:
- type: string
- username:
- type: string
- uuid:
- type: string
- version:
- type: string
- type: object
- api.UserPayload:
- properties:
- email:
- type: string
- info:
- additionalProperties: true
- type: object
- is_admin:
- type: boolean
- name:
- type: string
- note:
- type: string
- status:
- type: integer
- type: object
- model.Tag:
- properties:
- color:
- description: color 是flutter的颜色值,从0x00000000 到 0xFFFFFFFF; 前两位表示透明度,后面6位表示颜色,
- 可以转成rgba
- type: integer
- created_at:
- type: string
- id:
- type: integer
- name:
- type: string
- updated_at:
- type: string
- user_id:
- type: integer
- type: object
- model.TagList:
- properties:
- list:
- items:
- $ref: '#/definitions/model.Tag'
- type: array
- page:
- type: integer
- page_size:
- type: integer
- total:
- type: integer
- type: object
- response.DataResponse:
- properties:
- data: {}
- total:
- type: integer
- type: object
- response.ErrorResponse:
- properties:
- error:
- type: string
- type: object
- response.Response:
- properties:
- code:
- type: integer
- data: {}
- message:
- type: string
- type: object
- info:
- contact: {}
- description: 接口
- title: 管理系统API
- version: "1.0"
- paths:
- /:
- get:
- consumes:
- - application/json
- description: 首页
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 首页
- tags:
- - 首页
- /ab:
- get:
- consumes:
- - application/json
- description: 地址列表
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 地址列表
- tags:
- - 地址
- post:
- consumes:
- - application/json
- description: 地址更新
- parameters:
- - description: 地址表单
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.AddressBookForm'
- produces:
- - application/json
- responses:
- "200":
- description: "null"
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 地址更新
- tags:
- - 地址
- /ab/peer/add/{guid}:
- delete:
- consumes:
- - application/json
- description: 删除地址
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 删除地址
- tags:
- - 地址[Personal]
- post:
- consumes:
- - application/json
- description: 添加地址
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 添加地址
- tags:
- - 地址[Personal]
- /ab/peer/update/{guid}:
- put:
- consumes:
- - application/json
- description: 更新地址
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 更新地址
- tags:
- - 地址[Personal]
- /ab/peers:
- post:
- consumes:
- - application/json
- description: 地址
- parameters:
- - description: 页码
- in: query
- name: current
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- - description: guid
- in: query
- name: ab
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 地址列表
- tags:
- - 地址[Personal]
- /ab/personal:
- post:
- consumes:
- - application/json
- description: 个人地址
- parameters:
- - description: string valid
- in: body
- name: string
- schema:
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 个人地址
- tags:
- - 地址[Personal]
- /ab/settings:
- post:
- consumes:
- - application/json
- description: 设置
- parameters:
- - description: string valid
- in: body
- name: string
- schema:
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 设置
- tags:
- - 地址[Personal]
- /ab/shared/profiles:
- post:
- consumes:
- - application/json
- description: 共享
- parameters:
- - description: 页码
- in: query
- name: current
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 共享地址簿
- tags:
- - 地址[Personal]
- /ab/tag/{guid}:
- delete:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签删除
- tags:
- - 地址[Personal]
- /ab/tag/add/{guid}:
- post:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签添加
- tags:
- - 地址[Personal]
- /ab/tag/rename/{guid}:
- put:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签重命名
- tags:
- - 地址[Personal]
- /ab/tag/update/{guid}:
- put:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签修改颜色
- tags:
- - 地址[Personal]
- /ab/tags/{guid}:
- post:
- consumes:
- - application/json
- description: 标签
- parameters:
- - description: guid
- in: path
- name: guid
- required: true
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/model.TagList'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签
- tags:
- - 地址[Personal]
- /api:
- get:
- consumes:
- - application/json
- description: 用户信息
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.UserPayload'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - token: []
- summary: 用户信息
- tags:
- - 用户
- /audit/conn:
- post:
- consumes:
- - application/json
- description: 审计连接
- parameters:
- - description: 审计连接
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.AuditConnForm'
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 审计连接
- tags:
- - 审计
- /heartbeat:
- post:
- consumes:
- - application/json
- description: 心跳
- produces:
- - application/json
- responses:
- "200":
- description: OK
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 心跳
- tags:
- - 首页
- /login:
- post:
- consumes:
- - application/json
- description: 登录
- parameters:
- - description: 登录表单
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.LoginForm'
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 登录
- tags:
- - 登录
- /login-options:
- post:
- consumes:
- - application/json
- description: 登录选项
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- items:
- type: string
- type: array
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 登录选项
- tags:
- - 登录
- /logout:
- post:
- consumes:
- - application/json
- description: 登出
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 登出
- tags:
- - 登录
- /oauth/callback:
- get:
- consumes:
- - application/json
- description: OauthCallback
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: OauthCallback
- tags:
- - Oauth
- /oidc/auth:
- post:
- consumes:
- - application/json
- description: OidcAuth
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: OidcAuth
- tags:
- - Oauth
- /oidc/auth-query:
- get:
- consumes:
- - application/json
- description: OidcAuthQuery
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/api.LoginRes'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: OidcAuthQuery
- tags:
- - Oauth
- /peers:
- get:
- consumes:
- - application/json
- description: 机器
- parameters:
- - description: 页码
- in: query
- name: page
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- - description: 状态
- in: query
- name: status
- type: integer
- - description: accessible
- in: query
- name: accessible
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.DataResponse'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - BearerAuth: []
- summary: 机器
- tags:
- - 群组
- /server-config:
- get:
- consumes:
- - application/json
- description: 服务配置,给webclient提供api-server
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- security:
- - token: []
- summary: 服务配置
- tags:
- - WEBCLIENT
- /shared-peer:
- post:
- consumes:
- - application/json
- description: 分享的peer
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- $ref: '#/definitions/response.Response'
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.Response'
- summary: 分享的peer
- tags:
- - WEBCLIENT
- /sysinfo:
- post:
- consumes:
- - application/json
- description: 提交系统信息
- parameters:
- - description: 系统信息表单
- in: body
- name: body
- required: true
- schema:
- $ref: '#/definitions/api.PeerForm'
- produces:
- - application/json
- responses:
- "200":
- description: SYSINFO_UPDATED,ID_NOT_FOUND
- schema:
- type: string
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- summary: 提交系统信息
- tags:
- - 地址
- /tags:
- post:
- consumes:
- - application/json
- description: 标签
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- items:
- $ref: '#/definitions/model.Tag'
- type: array
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 标签
- tags:
- - 地址
- /users:
- get:
- consumes:
- - application/json
- description: 用户列表
- parameters:
- - description: 页码
- in: query
- name: page
- type: integer
- - description: 每页数量
- in: query
- name: pageSize
- type: integer
- - description: 状态
- in: query
- name: status
- type: integer
- - description: accessible
- in: query
- name: accessible
- type: string
- produces:
- - application/json
- responses:
- "200":
- description: OK
- schema:
- allOf:
- - $ref: '#/definitions/response.DataResponse'
- - properties:
- data:
- items:
- $ref: '#/definitions/api.UserPayload'
- type: array
- type: object
- "500":
- description: Internal Server Error
- schema:
- $ref: '#/definitions/response.ErrorResponse'
- security:
- - BearerAuth: []
- summary: 用户列表
- tags:
- - 群组
- securityDefinitions:
- BearerAuth:
- in: header
- name: Authorization
- type: apiKey
- token:
- in: header
- name: api-token
- type: apiKey
- swagger: "2.0"
|