global.go 298 B

1234567891011121314151617181920
  1. package global
  2. import (
  3. "github.com/go-logr/logr"
  4. "gorm.io/gorm"
  5. )
  6. var Log logr.Logger
  7. // 定义数据库指针
  8. var DB *gorm.DB
  9. type JWTConfig struct {
  10. SigningKey string `mapstructure:"key" json:"key"`
  11. }
  12. // JWT 签名密钥
  13. var JWT = JWTConfig{
  14. SigningKey: "abcdefghijklmnopqrstuvwxyz",
  15. }