sunsheng 1 년 전
부모
커밋
366a0d4632
3개의 변경된 파일4개의 추가작업 그리고 53개의 파일을 삭제
  1. 0 18
      src/app.yaml
  2. 2 33
      src/conf/app.go
  3. 2 2
      src/readme.md

+ 0 - 18
src/app.yaml

@@ -1,9 +1,6 @@
 port: 8101
 name: copter-train
 version: 1.0.0
-saveType: obs
-isRelease: true
-# isIgnoreUserType: true
 
 jwt: 
   timeoutHour: 168
@@ -17,7 +14,6 @@ redis:
 
 nats:
   url: nats://127.0.0.1:4222
-  # url: nats://124.71.139.24:14301
   maxReconnect: 1000
   reconnDelaySecond: 5
 
@@ -30,19 +26,5 @@ configer:
   mongo: copter-mongo
   redis: copter-redis
 
-# 主账号
-# obs:
-#   bucket: copter-train
-#   accessKeyId: LTAI5tC5uAPKWRQMyvwETRwf
-#   secrateKey: asiIuMCXC6mmVf1q52jzkQvF62mv3w
-#   endpoint: oss-cn-chengdu.aliyuncs.com
-
-# ossaccount
-obs:
-  bucket: copter-train
-  accessKeyId: LTAI5t7HEYvgfkXxvt6PzuPK
-  secrateKey: STAbtmqRM3iUYIn8zlu5M8kIaNfdCr
-  endpoint: oss-cn-chengdu.aliyuncs.com
-    
 
 

+ 2 - 33
src/conf/app.go

@@ -12,11 +12,8 @@ import (
 )
 
 type AppConf struct {
-	Name             string
-	Version          string
-	SaveType         string //obs, oss, minio
-	IsRelease        bool
-	IsIgnoreUserType bool
+	Name    string
+	Version string
 
 	Jwt struct {
 		Realm       string
@@ -24,14 +21,6 @@ type AppConf struct {
 		TimeoutHour int
 	}
 
-	Mysql struct {
-		DSN string
-	}
-	Redis struct {
-		Addr     string
-		Password string // no password set
-		Db       int    // use default DB
-	}
 	Log struct {
 		FileName    string
 		Level       int32
@@ -58,13 +47,6 @@ type AppConf struct {
 		HdrProcStreamTopic string
 		RenderStreamTopic  string
 	}
-
-	Obs struct {
-		Bucket      string
-		AccessKeyId string
-		SecrateKey  string
-		Endpoint    string
-	}
 }
 
 func LoadConfFile(filepath string) (*AppConf, error) {
@@ -94,12 +76,6 @@ func NewAppConf(filePath string) (*AppConf, error) {
 	//初始化log
 	_ = log.NewLoggerSugar(c.Log.ServiceName, c.Log.FileName, c.Log.Level)
 
-	//环境变量
-	ignoreUserType := os.Getenv("IGNORE_USER_TYPE")
-	if strings.ToLower(ignoreUserType) == "true" {
-		c.IsIgnoreUserType = true
-	}
-
 	mongo := os.Getenv("CONFIGER_MONGO")
 	if len(mongo) > 0 {
 		c.Configer.Mongo = mongo
@@ -134,13 +110,6 @@ func NewAppConf(filePath string) (*AppConf, error) {
 	}
 	fmt.Println("NATS URL =>", c.Nats.Url)
 
-	//是否是正式版本
-	IsRelease := os.Getenv("ISRELEASE")
-	if len(IsRelease) > 0 {
-		c.IsRelease = (IsRelease == "true")
-	}
-	fmt.Println("IsRelease =>", c.IsRelease)
-
 	AppConfig = c
 
 	return c, nil

+ 2 - 2
src/readme.md

@@ -24,5 +24,5 @@ db.auth("admin","admin123");
 db.createUser({user:"root",pwd:"copter-train-8888",roles:["dbOwner"]});
 
 ```
-/g/wk/vr-projects/mongo-migrations==mongodb://root:copter-train-8888@127.0.0.1:27017/copter?authSource=admin
-MONGO_MIGRATION: .\mongo-migrations==mongodb://root:copter-train-8888@127.0.0.1:27017/copter?authSource=admin
+创建默认管理员账号
+MONGO_MIGRATION: mongo-migrations==mongodb://root:copter-train-8888@127.0.0.1:27017/copter?authSource=admin