数据操作

sosotest支持使用响应的内置关键字或者python模式的内置函数来进行数据操作,目前支持mysqldb、redis、mongodb。

数据服务的后台配置结构如下:

  1. {
  2. "DB": {
  3. "default": {
  4. "comment":"默认数据库配置",
  5. "host": "10.10.10.09",
  6. "port": 6666,
  7. "username": "root",
  8. "password": "123456"
  9. },
  10. "service1": {
  11. "comment":"服务service1的mysqldb的配置",
  12. "host": "10.10.10.10",
  13. "port": 6666,
  14. "username": "root",
  15. "password": "123456"
  16. }
  17. },
  18. "REDIS": {
  19. "default": {
  20. "comment":"默认redis配置",
  21. "host": "10.10.10.11",
  22. "port": 11296,
  23. "password": ""
  24. },
  25. "service1": {
  26. "comment":"服务service1的redis配置",
  27. "host": "10.10.10.12",
  28. "port": 11321,
  29. "password": ""
  30. }
  31. },
  32. "MONGO": {
  33. "default": {
  34. "comment": "默认mongodb配置",
  35. "host": "10.10.10.16",
  36. "port": 27027
  37. },
  38. "service1": {
  39. "comment": "服务service1的mongodb配置",
  40. "host": "10.10.10.18",
  41. "port": 27027
  42. }
  43. }
  44. }

用户查看数据服务配置的地址是:http://127.0.0.1/interfaceTest/HTTP_UserServiceConf
用户看到的前台展示如图: 图片 其中=> 之前的是service,之后的请求的地址。