import request from '@/utils/request';

// 获取密钥列表
export function getSecrets(params?: any) {
  return request.get('/api/admin/secrets', { params });
}

// 获取密钥详情
export function getSecret(id: number) {
  return request.get(`/api/admin/secrets/${id}`);
}

// 新增密钥
export function createSecret(data: any) {
  return request.post('/api/admin/secrets', data);
}

// 更新密钥
export function updateSecret(id: number, data: any) {
  return request.put(`/api/admin/secrets/${id}`, data);
}

// 删除密钥
export function deleteSecret(id: number) {
  return request.delete(`/api/admin/secrets/${id}`);
}

// 获取分组列表
export function getSecretGroups() {
  return request.get('/api/admin/secrets/group/list');
}
