config.go 740 B

12345678910111213141516171819
  1. package config
  2. import (
  3. "sparrow-sdk/logger"
  4. "sparrow-sdk/protocal"
  5. )
  6. type Config struct {
  7. SparrowServer string // sparrow平台的http access服务的地址
  8. ProductKey string // 平台分配的产品key
  9. Protocol protocal.Protocol // 协议名称
  10. DeviceCode string // 设备唯一识别码
  11. Version string // 网关的版本号
  12. Debug bool //是否显示调试信息
  13. Logger logger.Interface // 日志组件
  14. UseTls bool // 是否通过ssl接入平台,如果启用,要配置CaFile 和kKeyFile两个参数
  15. CaFile string //public ca pem file
  16. KeyFile string // private key pem file
  17. }