definitions:
  admin_handler.createResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  admin_handler.deleteResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  admin_handler.detailResponse:
    properties:
      mobile:
        description: 手机号
        type: string
      nickname:
        description: 昵称
        type: string
      username:
        description: 用户名
        type: string
    type: object
  admin_handler.listData:
    properties:
      created_at:
        description: 创建时间
        type: string
      created_user:
        description: 创建人
        type: string
      hashid:
        description: hashid
        type: string
      id:
        description: ID
        type: integer
      is_used:
        description: 是否启用 1:是 -1:否
        type: integer
      mobile:
        description: 手机号
        type: string
      nickname:
        description: 昵称
        type: string
      updated_at:
        description: 更新时间
        type: string
      updated_user:
        description: 更新人
        type: string
      username:
        description: 用户名
        type: string
    type: object
  admin_handler.listResponse:
    properties:
      list:
        items:
          $ref: '#/definitions/admin_handler.listData'
        type: array
      pagination:
        properties:
          current_page:
            type: integer
          pre_page_count:
            type: integer
          total:
            type: integer
        type: object
    type: object
  admin_handler.loginResponse:
    properties:
      token:
        description: 用户身份标识
        type: string
    type: object
  admin_handler.logoutResponse:
    properties:
      username:
        description: 用户账号
        type: string
    type: object
  admin_handler.modifyPasswordResponse:
    properties:
      username:
        description: 用户账号
        type: string
    type: object
  admin_handler.modifyPersonalInfoResponse:
    properties:
      username:
        description: 用户账号
        type: string
    type: object
  admin_handler.resetPasswordResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  admin_handler.updateUsedResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  authorized_handler.createAPIResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  authorized_handler.createResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  authorized_handler.deleteAPIResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  authorized_handler.deleteResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  authorized_handler.listAPIData:
    properties:
      api:
        description: 调用方对接人
        type: string
      business_key:
        description: 调用方key
        type: string
      hash_id:
        description: hashID
        type: string
      method:
        description: 调用方secret
        type: string
    type: object
  authorized_handler.listAPIResponse:
    properties:
      list:
        items:
          $ref: '#/definitions/authorized_handler.listAPIData'
        type: array
    type: object
  authorized_handler.listData:
    properties:
      business_developer:
        description: 调用方对接人
        type: string
      business_key:
        description: 调用方key
        type: string
      business_secret:
        description: 调用方secret
        type: string
      created_at:
        description: 创建时间
        type: string
      created_user:
        description: 创建人
        type: string
      hashid:
        description: hashid
        type: string
      id:
        description: ID
        type: integer
      is_used:
        description: 是否启用 1:是 -1:否
        type: integer
      remark:
        description: 备注
        type: string
      updated_at:
        description: 更新时间
        type: string
      updated_user:
        description: 更新人
        type: string
    type: object
  authorized_handler.listResponse:
    properties:
      list:
        items:
          $ref: '#/definitions/authorized_handler.listData'
        type: array
      pagination:
        properties:
          current_page:
            type: integer
          pre_page_count:
            type: integer
          total:
            type: integer
        type: object
    type: object
  authorized_handler.updateUsedResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  code.Failure:
    properties:
      code:
        description: 业务码
        type: integer
      message:
        description: 描述信息
        type: string
    type: object
  demo_handler.authResponse:
    properties:
      authorization:
        description: 签名
        type: string
      expire_time:
        description: 过期时间
        type: integer
    type: object
  tool_handler.hashIdsDecodeResponse:
    properties:
      val:
        description: 解密后的值
        type: integer
    type: object
  tool_handler.hashIdsEncodeResponse:
    properties:
      val:
        description: 加密后的值
        type: string
    type: object
  user_handler.createRequest:
    properties:
      mobile:
        description: 手机号
        type: string
      nick_name:
        description: 昵称
        type: string
      user_name:
        description: 用户名
        type: string
    type: object
  user_handler.createResponse:
    properties:
      id:
        description: 主键ID
        type: integer
    type: object
  user_handler.deleteResponse:
    properties:
      id:
        description: 用户主键ID
        type: integer
    type: object
  user_handler.detailResponse:
    properties:
      id:
        description: 用户主键ID
        type: integer
      mobile:
        description: 手机号（脱敏）
        type: string
      nick_name:
        description: 昵称
        type: string
      user_name:
        description: 用户名
        type: string
    type: object
  user_handler.updateNickNameByIDRequest:
    properties:
      id:
        description: 用户主键ID
        type: integer
      nick_name:
        description: 昵称
        type: string
    type: object
  user_handler.updateNickNameByIDResponse:
    properties:
      id:
        description: 用户主键ID
        type: integer
    type: object
host: 127.0.0.1:9999
info:
  contact: {}
  license:
    name: MIT
    url: https://github.com/xinliangnote/go-gin-api/blob/master/LICENSE
  title: swagger 接口文档
  version: "2.0"
paths:
  /api/admin:
    get:
      consumes:
      - application/json
      description: 管理员列表
      parameters:
      - description: 第几页
        in: query
        name: page
        type: integer
      - description: 每页显示条数
        in: query
        name: page_size
        type: string
      - description: 用户名
        in: query
        name: username
        type: string
      - description: 昵称
        in: query
        name: nickname
        type: string
      - description: 手机号
        in: query
        name: mobile
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.listResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 管理员列表
      tags:
      - API.admin
    post:
      consumes:
      - multipart/form-data
      description: 新增管理员
      parameters:
      - description: 用户名
        in: formData
        name: username
        required: true
        type: string
      - description: 昵称
        in: formData
        name: nickname
        required: true
        type: string
      - description: 手机号
        in: formData
        name: mobile
        required: true
        type: string
      - description: 密码
        in: formData
        name: password
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.createResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 新增管理员
      tags:
      - API.admin
  /api/admin/{id}:
    delete:
      consumes:
      - application/json
      description: 删除管理员
      parameters:
      - description: hashId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.deleteResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 删除管理员
      tags:
      - API.admin
  /api/admin/info:
    get:
      consumes:
      - application/json
      description: 管理员详情
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.detailResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 管理员详情
      tags:
      - API.admin
  /api/admin/login:
    post:
      consumes:
      - application/json
      description: 管理员登出
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.logoutResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 管理员登出
      tags:
      - API.admin
  /api/admin/modify_password:
    patch:
      consumes:
      - multipart/form-data
      description: 修改个人信息
      parameters:
      - description: 昵称
        in: formData
        name: nickname
        required: true
        type: string
      - description: 手机号
        in: formData
        name: mobile
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.modifyPersonalInfoResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 修改个人信息
      tags:
      - API.admin
  /api/admin/reset_password/{id}:
    patch:
      consumes:
      - application/json
      description: 重置密码
      parameters:
      - description: hashId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.resetPasswordResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 重置密码
      tags:
      - API.admin
  /api/admin/used:
    patch:
      consumes:
      - multipart/form-data
      description: 更新管理员为启用/禁用
      parameters:
      - description: Hashid
        in: formData
        name: id
        required: true
        type: string
      - description: 是否启用 1:是 -1:否
        in: formData
        name: used
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/admin_handler.updateUsedResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 更新管理员为启用/禁用
      tags:
      - API.admin
  /api/authorized:
    get:
      consumes:
      - application/json
      description: 调用方列表
      parameters:
      - description: 第几页
        in: query
        name: page
        type: integer
      - description: 每页显示条数
        in: query
        name: page_size
        type: string
      - description: 调用方key
        in: query
        name: business_key
        type: string
      - description: 调用方secret
        in: query
        name: business_secret
        type: string
      - description: 调用方对接人
        in: query
        name: business_developer
        type: string
      - description: 备注
        in: path
        name: remark
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/authorized_handler.listResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 调用方列表
      tags:
      - API.authorized
    post:
      consumes:
      - multipart/form-data
      description: 新增调用方
      parameters:
      - description: 调用方key
        in: formData
        name: business_key
        required: true
        type: string
      - description: 调用方对接人
        in: formData
        name: business_developer
        required: true
        type: string
      - description: 备注
        in: formData
        name: remark
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/authorized_handler.createResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 新增调用方
      tags:
      - API.authorized
  /api/authorized/{id}:
    delete:
      consumes:
      - application/json
      description: 删除调用方
      parameters:
      - description: hashId
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/authorized_handler.deleteResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 删除调用方
      tags:
      - API.authorized
  /api/authorized/used:
    patch:
      consumes:
      - multipart/form-data
      description: 更新调用方为启用/禁用
      parameters:
      - description: Hashid
        in: formData
        name: id
        required: true
        type: string
      - description: 是否启用 1:是 -1:否
        in: formData
        name: used
        required: true
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/authorized_handler.updateUsedResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 更新调用方为启用/禁用
      tags:
      - API.authorized
  /api/authorized_api:
    get:
      consumes:
      - application/json
      description: 调用方接口地址列表
      parameters:
      - description: 调用方key
        in: query
        name: business_key
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/authorized_handler.listAPIResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 调用方接口地址列表
      tags:
      - API.authorized
    post:
      consumes:
      - multipart/form-data
      description: 授权调用方接口地址
      parameters:
      - description: HashID
        in: formData
        name: id
        required: true
        type: string
      - description: 请求方法
        in: formData
        name: method
        required: true
        type: string
      - description: 请求地址
        in: formData
        name: api
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/authorized_handler.createAPIResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 授权调用方接口地址
      tags:
      - API.authorized
  /api/authorized_api/{id}:
    delete:
      consumes:
      - application/json
      description: 删除调用方接口地址
      parameters:
      - description: 主键ID
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/authorized_handler.deleteAPIResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 删除调用方接口地址
      tags:
      - API.authorized
  /api/tool/hashids/decode/{id}:
    get:
      consumes:
      - application/json
      description: HashIds 解密
      parameters:
      - description: 需解密的密文
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/tool_handler.hashIdsDecodeResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: HashIds 解密
      tags:
      - API.tool
  /api/tool/hashids/encode/{id}:
    get:
      consumes:
      - application/json
      description: HashIds 加密
      parameters:
      - description: 需加密的数字
        in: path
        name: id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/tool_handler.hashIdsEncodeResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: HashIds 加密
      tags:
      - API.tool
  /auth/get:
    post:
      consumes:
      - application/json
      description: 获取授权信息
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/demo_handler.authResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 获取授权信息
      tags:
      - Demo
  /demo/trace:
    get:
      consumes:
      - application/json
      description: Trace 示例
      parameters:
      - description: 签名
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              properties:
                job:
                  description: 工作
                  type: string
                name:
                  description: 用户名
                  type: string
              type: object
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/code.Failure'
      summary: Trace 示例
      tags:
      - Demo
  /user/create:
    post:
      consumes:
      - application/json
      description: 创建用户
      parameters:
      - description: 请求信息
        in: body
        name: Request
        required: true
        schema:
          $ref: '#/definitions/user_handler.createRequest'
      - description: 签名
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/user_handler.createResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 创建用户
      tags:
      - User
  /user/delete/{id}:
    patch:
      consumes:
      - application/json
      description: 删除用户
      parameters:
      - description: 用户ID
        in: path
        name: id
        required: true
        type: integer
      - description: 签名
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/user_handler.deleteResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 删除用户
      tags:
      - User
  /user/info/{username}:
    get:
      consumes:
      - application/json
      description: 用户详情
      parameters:
      - description: 用户名
        in: path
        name: username
        required: true
        type: string
      - description: 签名
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/user_handler.detailResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 用户详情
      tags:
      - User
  /user/update:
    put:
      consumes:
      - application/json
      description: 编辑用户 - 通过用户主键ID更新用户昵称
      parameters:
      - description: 请求信息
        in: body
        name: Request
        required: true
        schema:
          $ref: '#/definitions/user_handler.updateNickNameByIDRequest'
      - description: 签名
        in: header
        name: Authorization
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/user_handler.updateNickNameByIDResponse'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/code.Failure'
        "401":
          description: Unauthorized
          schema:
            $ref: '#/definitions/code.Failure'
      summary: 编辑用户 - 通过用户主键ID更新用户昵称
      tags:
      - User
swagger: "2.0"
