constants.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package utils
  2. const (
  3. Md5Key = "Ks@h64WJ#tcVgG8$&WlNfqvLAtMgpxWN"
  4. )
  5. //常量定义
  6. const (
  7. FormatTime = "15:04:05" //时间格式
  8. FormatDate = "2006-01-02" //日期格式
  9. FormatDateTime = "2006-01-02 15:04:05" //完整时间格式
  10. HlbFormatDateTime = "2006-01-02_15:04:05.999" //完整时间格式
  11. FormatDateTimeUnSpace = "20060102150405" //完整时间格式
  12. PageSize15 = 15 //列表页每页数据量
  13. PageSize5 = 5
  14. PageSize10 = 10
  15. PageSize20 = 20
  16. PageSize30 = 30
  17. )
  18. const (
  19. APPNAME = "弘则-日度点评-管理后台"
  20. EmailSendToUsers = "glji@hzinsights.com"
  21. )
  22. //手机号,电子邮箱正则
  23. const (
  24. RegularMobile = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0-9])|(17[0-9])|(16[0-9])|(19[0-9]))\\d{8}$" //手机号码
  25. RegularEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` //匹配电子邮箱
  26. )
  27. //验证码code
  28. const (
  29. REGISTER_CODE = iota + 1 //注册
  30. LOGIN_CODE //登录
  31. )
  32. //聚合短信
  33. var (
  34. TplId = "65692"
  35. JhAppKey = "4c8504c49dd335e99cfd7b6a3a9e2415"
  36. )
  37. //科大讯飞--语音合成
  38. const (
  39. XfSTATUS_FIRST_FRAME = 0 //第一帧标识
  40. XfSTATUS_CONTINUE_FRAME = 1 //中间帧标识
  41. XfSTATUS_LAST_FRAME = 2 //最后一帧标识
  42. XfAPPID = "5ed70e9d"
  43. XfAPIKey = "d580509ca262e9586fb65a7064d5ce77"
  44. XfAPISecret = "a085720dc55850c720fa5576335f847a"
  45. XfHostUrl = "wss://tts-api.xfyun.cn/v2/tts"
  46. XfOrigin = "http://tts-api.xfyun.cn/"
  47. XfHost = "tts-api.xfyun.cn"
  48. )
  49. //OSS
  50. var (
  51. Endpoint string = "oss-cn-shanghai.aliyuncs.com"
  52. Bucketname string = "hongze"
  53. Imghost string = "http://hongze.oss-cn-shanghai.aliyuncs.com/"
  54. Upload_dir string = "static/images/"
  55. AccessKeyId string = "LTAIFMZYQhS2BTvW"
  56. AccessKeySecret string = "12kk1ptCHoGWedhBnKRVW5hRJzq9Fq"
  57. )