basePath: / consumes: - application/json definitions: BaseID: description: Basic ID Request | 基础ID结构 properties: id: description: Id | 序号 format: int64 type: string x-go-name: ID type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types BaseIDs: description: Basic ID List request | 基础ID列表结构,用于Post properties: ids: description: 主键列表 items: format: int64 type: integer type: array x-go-name: Ids type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types CaptchaInfo: description: CaptchaInfo | 验证码信息 properties: base64: description: Base64 | 验证码图片 Base64 type: string x-go-name: Base64 captchaId: description: CaptchaId | 验证码ID type: string x-go-name: CaptchaId type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DepartmentInfo: properties: children: description: Children | 孩子列表 items: $ref: '#/definitions/DepartmentInfo' type: array x-go-name: Children createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt id: description: Id | 序号 format: int64 type: string x-go-name: ID leader: $ref: '#/definitions/UserInfo' leaderId: description: Department leader | 部门负责人 format: int64 type: string x-go-name: LeaderId name: description: Department name | 部门名称 type: string x-go-name: Name parent: $ref: '#/definitions/DepartmentInfo' parentId: description: Parent ID | 直接父级ID format: int64 type: string x-go-name: ParentId remark: description: Remark | 备注 type: string x-go-name: Remark status: description: Status | 状态 type: string x-go-name: Status updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DepartmentListResp: description: Department list response | 部门列表返回 properties: list: description: List | 数据列表 items: $ref: '#/definitions/DepartmentInfo' type: array x-go-name: List page: $ref: '#/definitions/Pagination' type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DictionaryDetailInfo: description: 字典项信息 properties: createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt dictionary: $ref: '#/definitions/DictionaryInfo' dictionaryId: description: Dictionary Id | 字典ID format: int64 type: string x-go-name: DictionaryId id: description: Id | 序号 format: int64 type: string x-go-name: ID key: description: key | 键 type: string x-go-name: Key sort: description: Sort number | 排序号 format: uint32 type: integer x-go-name: Sort status: description: Status | 状态 type: string x-go-name: Status title: description: The title shown in the ui | 展示名称 (建议配合i18n) type: string x-go-name: Title updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt value: description: value | 值 type: string x-go-name: Value type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DictionaryDetailListResp: description: Dictionary Detail list response | 字典项列表返回 properties: list: description: List | 数据列表 items: $ref: '#/definitions/DictionaryDetailInfo' type: array x-go-name: List page: $ref: '#/definitions/Pagination' type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DictionaryInfo: description: 字典信息 properties: createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt description: description: The description of dictionary | 字典的描述 type: string x-go-name: Description details: description: Details | 字典项 items: $ref: '#/definitions/DictionaryDetailInfo' type: array x-go-name: Details id: description: Id | 序号 format: int64 type: string x-go-name: ID name: description: The name of dictionary for search | 字典搜索名称 type: string x-go-name: Name status: description: Status | 状态 type: string x-go-name: Status title: description: The title shown in the ui | 展示名称 (建议配合i18n) type: string x-go-name: Title updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DictionaryListResp: description: Dictionary list response | 字典列表返回 properties: list: description: List | 数据列表 items: $ref: '#/definitions/DictionaryInfo' type: array x-go-name: List page: $ref: '#/definitions/Pagination' type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DistrictInfo: description: District info | 地址信息 properties: area: description: Area | 县级行政编号,表示该地区归属 type: string x-go-name: Area children: description: Children | 子级 items: $ref: '#/definitions/DistrictInfo' type: array x-go-name: Children city: description: City | 地级行政编号,表示该地区归属 type: string x-go-name: City code: description: Code | 地址编码 type: string x-go-name: Code createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt id: description: Id | 序号 format: int64 type: string x-go-name: ID latitude: description: Latitude | 纬度 format: double type: number x-go-name: Latitude level: description: Level | 地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县 4-乡镇 format: uint32 type: integer x-go-name: Level longitude: description: Longitude | 经度 format: double type: number x-go-name: Longitude name: description: Name | 地区名称 type: string x-go-name: Name province: description: Province code | 省级行政编号,表示该地区归属 type: string x-go-name: Province shortName: description: Short name | 地区缩写,省级 type: string x-go-name: ShortName street: description: Street or Town | 乡级行政编号,表示该地区归属 type: string x-go-name: Street updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types DistrictTree: description: District tree | 地址树,层级结构 properties: tree: description: Tree | 树 items: $ref: '#/definitions/DistrictInfo' type: array x-go-name: Tree type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types GetDistrictNameResp: description: District name response | 地址名称回复 properties: code: description: Code | 地址编码 type: string x-go-name: Code name: description: Name | 地址名称(拼接后) type: string x-go-name: Name nameList: description: Name List | 地址名称列表,逐级,不拼接 items: type: string type: array x-go-name: NameList type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types LoginReq: description: Log in request | 普通登录请求 properties: captcha: description: The Captcha which users input | 用户输入的验证码 maxLength: 4 type: string x-go-name: Captcha captchaId: description: Captcha ID which store in redis | 图形验证码编号, 存在redis中 maxLength: 32 type: string x-go-name: CaptchaId credentials: description: Credentials | 登录凭证 type: string x-go-name: Credentials platform: description: Platform | 当前登录平台 type: string x-go-name: Platform subject: description: Log in subject | 登录主体(用户名/邮箱/手机号码)| 作用于验证码时,不支持用户名 type: string x-go-name: Subject required: - captchaId - captcha type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types LoginResp: description: LoginResp | 登录返回数据 properties: token: $ref: '#/definitions/LoginTokenInfo' twoFactorType: description: TwoFactorType | 两步验证类型,空字符串表示无需两步验证 type: string x-go-name: TwoFactorType type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types LoginTokenInfo: description: LoginTokenInfo | Token数据 properties: access_token: description: Access Token | Jwt-Token type: string x-go-name: AccessToken expires_at: description: Expires At | 过期具体时间,时间戳格式 format: int64 type: integer x-go-name: ExpiresAt scope: description: Scope | 授权范围,逗号分割 type: string x-go-name: Scope token_type: description: 'Token Type | Token类型 Authorization: {token_type} {access_token}' example: '[Bearer]' type: string x-go-name: TokenType uid: description: User ID | 用户ID format: int64 type: string x-go-name: UID type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types OauthLoginByCodeReq: description: OAuth log in by code request | OAuth 直接登录请求 properties: code: description: Code | 一次性code type: string x-go-name: Code provider: description: Provider name | 服务提供商名称 example: '[wechat,google]' maxLength: 40 type: string x-go-name: Provider type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types OauthLoginByPhoneCodeReq: description: OAuth log in by phone code request | OAuth 手机号码登录请求 properties: authCode: description: AuthCode | 登录Code,非必填,为了平台兼容性 type: string x-go-name: AuthCode code: description: Code | 一次性code type: string x-go-name: Code provider: description: Provider name | 服务提供商名称 example: '[wechat,google]' maxLength: 40 type: string x-go-name: Provider type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types OauthLoginResp: description: OAuth login return auth url | OAuth登录返回提供商登录页地址 properties: authUrl: description: Auth URL | 提供商登录地址 type: string x-go-name: AuthUrl type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types OauthProviderInfo: properties: authUrl: description: The auth url of the provider | 认证地址 type: string x-go-name: AuthUrl clientId: description: The client id | 客户端 id type: string x-go-name: ClientId clientSecret: description: The client secret | 客户端密钥 type: string x-go-name: ClientSecret createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt description: description: The description of the provider | 提供商描述 type: string x-go-name: Description id: description: Id | 序号 format: int64 type: string x-go-name: ID infoUrl: description: The URL to request user information by token | 用户信息请求地址 type: string x-go-name: InfoUrl init: description: The oauth provider init status | 提供商初始化状态 type: boolean x-go-name: Init name: description: The provider's name | 提供商名称 type: string x-go-name: Name redirectUrl: description: The redirect url | 跳转地址 type: string x-go-name: RedirectUrl scopes: description: The scopes | 权限范围 type: string x-go-name: Scopes system: description: The system internal oauth provider | 系统内置提供商 type: boolean x-go-name: System tokenUrl: description: The token url of the provider | 获取 Token 地址 type: string x-go-name: TokenUrl updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types OauthProviderListResp: description: OAuth provider list response | OAuth提供商查询返回 properties: list: items: $ref: '#/definitions/OauthProviderInfo' type: array x-go-name: List page: $ref: '#/definitions/Pagination' type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types Pagination: description: Pagination | 分页模型 properties: current: description: Current Page | 当前页 example: 1 format: uint64 maximum: 100000 minimum: 1 type: integer x-go-name: Current size: description: Page Size | 每页大小 example: 10 format: uint64 maximum: 9999 minimum: 0 type: integer x-go-name: Size total: description: Total Number | 数据总数 format: uint64 type: integer x-go-name: Total type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types RegisterReq: description: Register request | 注册请求 properties: captcha: description: The Captcha which users input | 用户输入的验证码 maxLength: 6 type: string x-go-name: Captcha captchaId: description: Captcha ID which store in redis | 图形验证码编号, 存在redis中 maxLength: 32 type: string x-go-name: CaptchaId code: description: Code | 验证码 type: string x-go-name: Code credentials: description: Credentials | 凭证 type: string x-go-name: Credentials email: description: Email | 邮箱 type: string x-go-name: Email phoneNumber: description: PhoneNumber | 手机号码 type: string x-go-name: PhoneNumber username: description: Username | 用户名 type: string x-go-name: Username required: - captchaId - captcha type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types RoleInfo: description: 角色信息 properties: code: description: Role Code | 角色编码,可用于权限控制 type: string x-go-name: Code createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt description: description: Description | 角色描述 type: string x-go-name: Description id: description: Id | 序号 format: int64 type: string x-go-name: ID name: description: Role Name | 角色名 type: string x-go-name: Name status: description: Status | 状态 type: string x-go-name: Status updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types RoleListResp: description: Role list response | 角色列表查询返回 properties: list: description: List | 数据列表 items: $ref: '#/definitions/RoleInfo' type: array x-go-name: List page: $ref: '#/definitions/Pagination' type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types TimeInfo: description: TimeInfo | 时间结构 properties: createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types TokenInfo: description: Token信息 properties: accessToken: description: AccessToken | AccessToken 字符串 type: string x-go-name: AccessToken createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt expiredAt: description: Expire Time | 过期时间 format: int64 type: integer x-go-name: ExpiredAt id: description: Id | 序号 format: int64 type: string x-go-name: ID refreshYoken: description: RefreshToken | RefreshToken 字符串 type: string x-go-name: RefreshToken source: description: Source | Token来源,PCWeb/WechatMini/AlipayMini type: string x-go-name: Source status: description: Status | 状态 type: string x-go-name: Status updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt userId: description: User's Id | 用户ID format: int64 type: string x-go-name: UserId type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types TokenListResp: description: Token list response | 凭证列表返回 properties: list: description: List | 数据列表 items: $ref: '#/definitions/TokenInfo' type: array x-go-name: List page: $ref: '#/definitions/Pagination' type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types UserInfo: properties: createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt email: description: Email | 邮箱 type: string x-go-name: Email id: description: Id | 序号 format: int64 type: string x-go-name: ID loginRecord: $ref: '#/definitions/UserLoginRecordInfo' metadata: additionalProperties: type: string description: Meta | 元数据 type: object x-go-name: Metas nickname: description: Nickname | 昵称 type: string x-go-name: Nickname password: description: Password | 密码 type: string x-go-name: Password phoneNumber: description: Phone number | 手机号码 type: string x-go-name: PhoneNumber roles: description: Roles | 角色代码列表 items: type: string type: array x-go-name: Roles status: description: Status | 状态 type: string x-go-name: Status updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt username: description: Username | 用户名 type: string x-go-name: Username type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types UserListResp: description: User list response | 用户列表返回 properties: list: description: List | 数据列表 items: $ref: '#/definitions/UserInfo' type: array x-go-name: List page: $ref: '#/definitions/Pagination' type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types UserLoginRecordInfo: description: 用户登录记录 properties: createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt id: description: Id | 序号 format: int64 type: string x-go-name: ID lastLoginAt: description: 最近一次登录时间 type: string x-go-name: LastLoginAt lastLoginDevice: description: 最近一次登录设备 type: string x-go-name: LastLoginDevice lastLoginIpv4: description: 最近一次登录IPv4 type: string x-go-name: LastLoginIpv4 lastLoginUa: description: 最近一次登录浏览器Ua type: string x-go-name: LastLoginUa loginCount: description: 总登录次数 format: uint64 type: integer x-go-name: LoginCount updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt userId: description: 用户ID format: int64 type: string x-go-name: UserId type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types UserSocialInfo: description: 用户社交平台信息 properties: accessToken: description: Access Token | 用户在提供商最近一次登录的访问凭证 type: string x-go-name: AccessToken createdAt: description: Create Time | 创建时间 type: string x-go-name: CreatedAt expiresIn: description: Expires in | 访问凭证过期时长,单位:秒 format: uint64 type: integer x-go-name: ExpiresIn id: description: Id | 序号 format: int64 type: string x-go-name: ID key: description: Key | 用户在提供商的用于解密的key type: string x-go-name: Key openId: description: OpenId | 用户在提供商的OpenID type: string x-go-name: OpenId provider: description: OAuth Provider | 服务提供商 type: string x-go-name: Provider refreshToken: description: Refresh Token | 用户在提供商最近一次登录的刷新凭证 type: string x-go-name: RefreshToken uid: description: User's ID | 提供商用户ID,不一定存在 type: string x-go-name: Uid unionId: description: UnionId | 用户在提供商的UnionID type: string x-go-name: UnionId updatedAt: description: Update Time | 更新时间 type: string x-go-name: UpdatedAt userId: description: 系统用户ID format: int64 type: string x-go-name: UserId userProfile: description: User Profile | 提供商用户信息,不一定存在 type: string x-go-name: UserProfile type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types ValidateCaptchaReq: description: Validating captcha request | 验证验证码请求 properties: captcha: description: The Captcha which users input | 用户输入的验证码 maxLength: 4 type: string x-go-name: Captcha captchaId: description: Captcha ID which store in redis | 图形验证码编号, 存在redis中 maxLength: 32 type: string x-go-name: CaptchaId clear: description: Auto remove captcha | 自动删除被验证的验证码 type: boolean x-go-name: Clear required: - captchaId - captcha type: object x-go-package: git.noahlan.cn/n-admin/n-admin-server/api/internal/types host: localhost:0 info: description: 'Description: api service' title: api version: 0.0.1 paths: /api/admin/department: delete: description: Delete department | 删除部门 operationId: DeleteDepartmentAdmin parameters: - in: body name: body schema: $ref: '#/definitions/BaseIDs' type: object summary: Delete department | 删除部门 tags: - department_admin get: description: Get department | 获取部门 operationId: GetDepartmentAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: 部门名称 in: query name: name type: string x-go-name: Name - description: Leader ID | 负责人ID format: int64 in: query name: leaderId type: integer x-go-name: LeaderId - description: Parent ID | 父节点ID format: int64 in: query name: parentId type: integer x-go-name: ParentId responses: "200": description: DepartmentInfo schema: $ref: '#/definitions/DepartmentInfo' summary: Get department | 获取部门 tags: - department_admin /api/admin/department/create: post: description: Create department | 创建部门 operationId: CreateDepartmentAdmin parameters: - in: body name: body schema: $ref: '#/definitions/DepartmentInfo' type: object responses: "200": description: BaseID schema: $ref: '#/definitions/BaseID' summary: Create department | 创建部门 tags: - department_admin /api/admin/department/list: get: description: Get department list | 获取部门列表 operationId: GetDepartmentListAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: 部门名称 in: query name: name type: string x-go-name: Name - description: Leader ID | 负责人ID format: int64 in: query name: leaderId type: integer x-go-name: LeaderId - description: Parent ID | 父节点ID format: int64 in: query name: parentId type: integer x-go-name: ParentId responses: "200": description: DepartmentListResp schema: $ref: '#/definitions/DepartmentListResp' summary: Get department list | 获取部门列表 tags: - department_admin /api/admin/department/update: post: description: Update department info | 更新部门信息 operationId: UpdateDepartmentAdmin parameters: - in: body name: body schema: $ref: '#/definitions/DepartmentInfo' type: object summary: Update department info | 更新部门信息 tags: - department_admin /api/admin/dictionary: delete: description: Delete dictionary | 删除字典 operationId: DeleteDictionaryAdmin parameters: - in: body name: body schema: $ref: '#/definitions/BaseIDs' type: object summary: Delete dictionary | 删除字典 tags: - dictionary_admin get: description: Get dictionary | 获取字典 operationId: GetDictionaryAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: 展示名称 in: query name: title type: string x-go-name: Title - description: 搜索名称 in: query name: name type: string x-go-name: Name - description: Status | 状态 in: query name: status type: string x-go-name: Status - description: Keyword | 综合搜索关键字 in: query name: keyword type: string x-go-name: Keyword responses: "200": description: DictionaryInfo schema: $ref: '#/definitions/DictionaryInfo' summary: Get dictionary | 获取字典 tags: - dictionary_admin /api/admin/dictionary/create: post: description: Create dictionary | 创建字典 operationId: CreateDictionaryAdmin parameters: - in: body name: body schema: $ref: '#/definitions/DictionaryInfo' type: object responses: "200": description: BaseID schema: $ref: '#/definitions/BaseID' summary: Create dictionary | 创建字典 tags: - dictionary_admin /api/admin/dictionary/list: get: description: Get dictionary list | 获取字典列表 operationId: GetDictionaryListAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: 展示名称 in: query name: title type: string x-go-name: Title - description: 搜索名称 in: query name: name type: string x-go-name: Name - description: Status | 状态 in: query name: status type: string x-go-name: Status - description: Keyword | 综合搜索关键字 in: query name: keyword type: string x-go-name: Keyword responses: "200": description: DictionaryListResp schema: $ref: '#/definitions/DictionaryListResp' summary: Get dictionary list | 获取字典列表 tags: - dictionary_admin /api/admin/dictionary/update: post: description: Update dictionary info | 更新字典信息 operationId: UpdateDictionaryAdmin parameters: - in: body name: body schema: $ref: '#/definitions/DictionaryInfo' type: object summary: Update dictionary info | 更新字典信息 tags: - dictionary_admin /api/admin/oauth_provider: get: description: Get oauth provider by Params | 根据条件获取第三方信息 operationId: GetOauthProviderAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: Name | 第三方提供商名称 example: wechat in: query name: Name type: string - description: ClientId | 第三方客户端ID (like) example: wx21k2j193j2ksdfaak291l in: query name: ClientId type: string - description: 是否系统内置 in: query name: System type: boolean - description: 是否已初始化 in: query name: Init type: boolean responses: "200": description: OauthProviderInfo schema: $ref: '#/definitions/OauthProviderInfo' summary: Get oauth provider by Params | 根据条件获取第三方信息 tags: - oauthprovider_admin /api/admin/oauth_provider/create: post: description: Create oauth provider information | 创建第三方信息 operationId: CreateOauthProviderAdmin parameters: - in: body name: body schema: $ref: '#/definitions/OauthProviderInfo' type: object summary: Create oauth provider information | 创建第三方信息 tags: - oauthprovider_admin /api/admin/oauth_provider/delete: post: description: Delete oauth provider information | 删除第三方信息 operationId: DeleteOauthProviderAdmin parameters: - in: body name: body schema: $ref: '#/definitions/BaseIDs' type: object summary: Delete oauth provider information | 删除第三方信息 tags: - oauthprovider_admin /api/admin/oauth_provider/list: get: description: Get oauth provider list | 获取第三方信息列表 operationId: GetOauthProviderListAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: Name | 第三方提供商名称 example: wechat in: query name: Name type: string - description: ClientId | 第三方客户端ID (like) example: wx21k2j193j2ksdfaak291l in: query name: ClientId type: string - description: 是否系统内置 in: query name: System type: boolean - description: 是否已初始化 in: query name: Init type: boolean responses: "200": description: OauthProviderListResp schema: $ref: '#/definitions/OauthProviderListResp' summary: Get oauth provider list | 获取第三方信息列表 tags: - oauthprovider_admin /api/admin/oauth_provider/update: post: description: Update oauth provider information | 更新第三方信息 operationId: UpdateOauthProviderAdmin parameters: - in: body name: body schema: $ref: '#/definitions/OauthProviderInfo' type: object summary: Update oauth provider information | 更新第三方信息 tags: - oauthprovider_admin /api/admin/role: delete: description: Delete role information | 删除角色信息 operationId: DeleteRoleAdmin parameters: - in: body name: body schema: $ref: '#/definitions/BaseIDs' type: object summary: Delete role information | 删除角色信息 tags: - role_admin get: description: Get Role | 根据条件获取角色 operationId: GetRoleAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: Name | 角色名称 example: wechat in: query name: Name type: string - description: Code | 角色编码(Like) example: Admin in: query name: Code type: string responses: "200": description: RoleInfo schema: $ref: '#/definitions/RoleInfo' summary: Get Role | 根据条件获取角色 tags: - role_admin /api/admin/role/create: post: description: Create role information | 创建角色 operationId: CreateRoleAdmin parameters: - in: body name: body schema: $ref: '#/definitions/RoleInfo' type: object summary: Create role information | 创建角色 tags: - role_admin /api/admin/role/list: get: description: Get role list | 获取角色列表 operationId: GetRoleListAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: Name | 角色名称 example: wechat in: query name: Name type: string - description: Code | 角色编码(Like) example: Admin in: query name: Code type: string responses: "200": description: RoleListResp schema: $ref: '#/definitions/RoleListResp' summary: Get role list | 获取角色列表 tags: - role_admin /api/admin/role/update: post: description: Update role information | 更新角色 operationId: UpdateRoleAdmin parameters: - in: body name: body schema: $ref: '#/definitions/RoleInfo' type: object summary: Update role information | 更新角色 tags: - role_admin /api/admin/token/disable: post: description: Disable token | 禁用凭证(强制下线) operationId: DisableTokenAdmin parameters: - in: body name: body schema: $ref: '#/definitions/BaseID' type: object summary: Disable token | 禁用凭证(强制下线) tags: - token_admin /api/admin/token/list: get: description: Get token list | 获取凭证列表 operationId: GetTokenListAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: User id | 用户ID format: int64 in: query name: userId type: integer x-go-name: UserID - description: Token status | Token状态 in: query name: status type: string x-go-name: Status - description: Provider source | 提供商来源 in: query name: source type: string x-go-name: Source - description: Token type | 凭证类型 [Bearer] example: Bearer in: query name: tokenType type: string x-go-name: TokenType responses: "200": description: TokenListResp schema: $ref: '#/definitions/TokenListResp' summary: Get token list | 获取凭证列表 tags: - token_admin /api/admin/user: delete: description: Delete user | 删除用户 operationId: DeleteUserAdmin parameters: - in: body name: body schema: $ref: '#/definitions/BaseIDs' type: object summary: Delete user | 删除用户 tags: - user_admin get: description: Get user | 获取用户 operationId: GetUserAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: Username | 用户名 in: query name: username type: string x-go-name: Username - description: PhoneNumber | 手机号码 in: query name: phoneNumber type: string x-go-name: PhoneNumber - description: Email | 邮箱 in: query name: email type: string x-go-name: Email - description: Nickname | 昵称 in: query name: nickname type: string x-go-name: Nickname responses: "200": description: UserInfo schema: $ref: '#/definitions/UserInfo' summary: Get user | 获取用户 tags: - user_admin /api/admin/user/create: post: description: Create user | 创建用户 operationId: CreateUserAdmin parameters: - in: body name: body schema: $ref: '#/definitions/UserInfo' type: object responses: "200": description: BaseID schema: $ref: '#/definitions/BaseID' summary: Create user | 创建用户 tags: - user_admin /api/admin/user/list: get: description: Get user list | 获取用户列表 operationId: GetUserListAdmin parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: Username | 用户名 in: query name: username type: string x-go-name: Username - description: PhoneNumber | 手机号码 in: query name: phoneNumber type: string x-go-name: PhoneNumber - description: Email | 邮箱 in: query name: email type: string x-go-name: Email - description: Nickname | 昵称 in: query name: nickname type: string x-go-name: Nickname responses: "200": description: UserListResp schema: $ref: '#/definitions/UserListResp' summary: Get user list | 获取用户列表 tags: - user_admin /api/admin/user/update: post: description: Update user | 更新用户信息 operationId: UpdateUserAdmin parameters: - in: body name: body schema: $ref: '#/definitions/UserInfo' type: object summary: Update user | 更新用户信息 tags: - user_admin /api/auth/login: post: description: Log in | 密码登录 operationId: Login parameters: - in: body name: body schema: $ref: '#/definitions/LoginReq' type: object responses: "200": description: LoginResp schema: $ref: '#/definitions/LoginResp' summary: Log in | 密码登录 tags: - auth /api/auth/login/byCode: post: description: Log in by code | 验证码登录,手机x邮箱 operationId: LoginByCode parameters: - in: body name: body schema: $ref: '#/definitions/LoginReq' type: object responses: "200": description: LoginResp schema: $ref: '#/definitions/LoginResp' summary: Log in by code | 验证码登录,手机x邮箱 tags: - auth /api/auth/oauth/login: get: description: Oauth log in | Oauth 第三方登录,获取登录地址(通常针对PC网页登录,APP端自行获取code) operationId: OauthLogin parameters: - description: Provider name | 服务提供商名称 example: '[google, github, facebook]' in: query maxLength: 40 name: Provider required: true type: string responses: "200": description: OauthLoginResp schema: $ref: '#/definitions/OauthLoginResp' summary: Oauth log in | Oauth 第三方登录,获取登录地址(通常针对PC网页登录,APP端自行获取code) tags: - auth /api/auth/oauth/login/byCode: post: description: Oauth log in by code | Oauth 第三方登录,客户端自行获取code进行登录 operationId: OauthLoginByCode parameters: - in: body name: body schema: $ref: '#/definitions/OauthLoginByCodeReq' type: object responses: "200": description: LoginResp schema: $ref: '#/definitions/LoginResp' summary: Oauth log in by code | Oauth 第三方登录,客户端自行获取code进行登录 tags: - auth /api/auth/oauth/login/byPhone: post: description: Oauth log in by phone code | Oauth 第三方登录,客户端获取换取手机号的code进行登录 operationId: OauthLoginByPhone parameters: - in: body name: body schema: $ref: '#/definitions/OauthLoginByPhoneCodeReq' type: object responses: "200": description: LoginResp schema: $ref: '#/definitions/LoginResp' summary: Oauth log in by phone code | Oauth 第三方登录,客户端获取换取手机号的code进行登录 tags: - auth /api/auth/oauth/login/callback: get: description: Oauth log in callback route | Oauth 登录返回调接口,即redirect_uri operationId: OauthCallback responses: "200": description: LoginResp schema: $ref: '#/definitions/LoginResp' summary: Oauth log in callback route | Oauth 登录返回调接口,即redirect_uri tags: - auth /api/auth/register: post: description: Register | 注册 operationId: Register parameters: - in: body name: body schema: $ref: '#/definitions/RegisterReq' type: object responses: "200": description: BaseID schema: $ref: '#/definitions/BaseID' summary: Register | 注册 tags: - auth /api/base/initDatabase: get: description: Initialize database | 初始化数据库 operationId: InitDatabase summary: Initialize database | 初始化数据库 tags: - base /api/captcha: get: description: Get Captcha | 获取验证码 operationId: GetCaptcha responses: "200": description: CaptchaInfo schema: $ref: '#/definitions/CaptchaInfo' summary: Get Captcha | 获取验证码 tags: - captcha /api/captcha/validate: post: description: Validating captcha | 验证验证码正确性 operationId: ValidateCaptcha parameters: - in: body name: body schema: $ref: '#/definitions/ValidateCaptchaReq' type: object summary: Validating captcha | 验证验证码正确性 tags: - captcha /api/district/children: get: description: get district children | 获取子级地址列表 operationId: GetDistrictChildren parameters: - description: Parent Code | 父级Code,若为空,则查询level为1的列表 in: query name: parentCode type: string x-go-name: ParentCode responses: "200": $ref: '#/responses/*DistrictInfo' summary: get district children | 获取子级地址列表 tags: - district /api/district/list: get: description: get district list | 获取地址列表 operationId: GetDistrictList parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Page Size | 每页大小 example: "10" format: uint64 in: query maximum: 9999 minimum: 0 name: size type: integer x-go-name: Size - description: Current Page | 当前页 example: "1" format: uint64 in: query maximum: 100000 minimum: 1 name: current type: integer x-go-name: Current - description: Total Number | 数据总数 format: uint64 in: query name: total type: integer x-go-name: Total - description: Name | 地区名称模糊匹配 (like) in: query name: name type: string x-go-name: Name - description: Province code | 省级行政编号,表示该地区归属 in: query name: province type: string x-go-name: Province - description: City | 地级行政编号,表示该地区归属 in: query name: city type: string x-go-name: City - description: Area | 县级行政编号,表示该地区归属 in: query name: area type: string x-go-name: Area - description: Street or Town | 乡级行政编号,表示该地区归属 in: query name: street type: string x-go-name: Street - description: Level | 地区级别 1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县 4-乡镇 format: uint32 in: query name: level type: integer x-go-name: Level responses: "200": $ref: '#/responses/*DistrictInfo' summary: get district list | 获取地址列表 tags: - district /api/district/name: get: description: get district name list | 获取地址名 operationId: GetDistrictName parameters: - description: Code | 地址编码 in: query name: code type: string x-go-name: Code - description: Separator | 分隔符,默认为空字符串 in: query name: sep type: string x-go-name: Separator responses: "200": description: GetDistrictNameResp schema: $ref: '#/definitions/GetDistrictNameResp' summary: get district name list | 获取地址名 tags: - district /api/district/tree: get: description: get district tree | 获取地址树,整棵树 operationId: GetDistrictTree parameters: - description: Id | 序号 format: int64 in: query name: id type: integer x-go-name: ID - description: Code | 地址编码 in: query name: code type: string x-go-name: Code responses: "200": description: DistrictTree schema: $ref: '#/definitions/DistrictTree' summary: get district tree | 获取地址树,整棵树 tags: - district /api/user: get: description: Get Current User | 获取当前登录用户信息 operationId: GetCurrentUser responses: "200": description: UserInfo schema: $ref: '#/definitions/UserInfo' summary: Get Current User | 获取当前登录用户信息 tags: - user produces: - application/json schemes: - http - https security: - Token: - '[]' securityDefinitions: Token: in: header name: Authorization type: apiKey swagger: "2.0"