This commit is contained in:
fallen-angle
2022-05-16 19:55:59 +08:00
parent 7598280fc1
commit 9e3638885d
34 changed files with 3623 additions and 115 deletions

View File

@@ -12,6 +12,7 @@ type ServerConfig struct {
Jwt JwtConfig `yaml:"jwt"`
Email EmailConfig `yaml:"email"`
Bos BosConfig `yaml:"bos"`
Kafka KafkaCofig `yaml:"kafka"`
}
type MySQLConfig struct {
@@ -46,3 +47,9 @@ type BosConfig struct {
SecretKey string `yaml:"secretKey"`
Domain string `yaml:"domain"`
}
type KafkaCofig struct {
Servers []string `yaml:"servers"`
Topic string `yaml:"topic"`
Partition int `yaml:"partition"`
}

View File

@@ -4,12 +4,11 @@ import (
"errors"
"fmt"
"github.com/baidubce/bce-sdk-go/services/bos"
"net/http"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis"
"go.uber.org/zap"
"gorm.io/gorm"
"net/http"
)
var (
@@ -76,4 +75,5 @@ var (
"NEGATIVE": 1,
"POSITIVE": 2,
}
KafkaProducerChan = make(chan []byte)
)