import request from '@/utils/request'

// 查询接口管理列表
export function listInterface(query) {
  return request({
    url: '/gateway/interface/list',
    method: 'get',
    params: query
  })
}

// 查询接口管理详细
export function getInterface(id) {
  return request({
    url: '/gateway/interface/' + id,
    method: 'get'
  })
}

// 新增接口管理
export function addInterface(data) {
  return request({
    url: '/gateway/interface',
    method: 'post',
    data: data
  })
}

// 修改接口管理
export function updateInterface(data) {
  return request({
    url: '/gateway/interface',
    method: 'put',
    data: data
  })
}

// 删除接口管理
export function delInterface(id) {
  return request({
    url: '/gateway/interface/' + id,
    method: 'delete'
  })
}

// 禁用/启用接口管理
export function changeInterfaceStatus(data) {
  return request({
    url: '/gateway/interface/status',
    method: 'put',
    data: data
  })
}
