更新
This commit is contained in:
parent
ccead6dc90
commit
d843145c0e
@ -26,10 +26,10 @@ jwt:
|
||||
key: "3Ei*^!a6^6$w^wgK"
|
||||
expire: 24
|
||||
bos:
|
||||
Ak: "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk: "d2ecaa9d75114d3b9f42b99014198306"
|
||||
AccessKeyId: "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
AccessKeySecret: "d2ecaa9d75114d3b9f42b99014198306"
|
||||
BucketName: "dci-file-new"
|
||||
BosUrl: ".bj.bcebos.com"
|
||||
BosBaseDir: "fonchain-main"
|
||||
BosHttp: "https://"
|
||||
BosDomain: "cdns.fontree.cn"
|
||||
Endpoint: ".bj.bcebos.com"
|
||||
BosBaseDir: "exhibition"
|
||||
Host: "https://bj.bcebos.com"
|
||||
CdnHost: "https://cdns.fontree.cn"
|
@ -13,16 +13,18 @@ dubbo:
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
timeout: 15s
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ExhibitionClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Exhibition
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
@ -26,10 +26,10 @@ jwt:
|
||||
key: "tP0xXGErz4~"
|
||||
expire: 24
|
||||
bos:
|
||||
Ak: "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk: "d2ecaa9d75114d3b9f42b99014198306"
|
||||
AccessKeyId: "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
AccessKeySecret: "d2ecaa9d75114d3b9f42b99014198306"
|
||||
BucketName: "dci-file-new"
|
||||
BosUrl: ".bj.bcebos.com"
|
||||
BosBaseDir: "fonchain-main"
|
||||
BosHttp: "https://"
|
||||
BosDomain: "cdns.fontree.cn"
|
||||
Endpoint: ".bj.bcebos.com"
|
||||
BosBaseDir: "exhibition"
|
||||
Host: "https://bj.bcebos.com"
|
||||
CdnHost: "https://cdns.fontree.cn"
|
@ -13,16 +13,18 @@ dubbo:
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
timeout: 15s
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ExhibitionClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Exhibition
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
|
@ -26,10 +26,10 @@ jwt:
|
||||
key: "SxjwBuEcHg42t73"
|
||||
expire: 24
|
||||
bos:
|
||||
Ak: "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk: "d2ecaa9d75114d3b9f42b99014198306"
|
||||
AccessKeyId: "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
AccessKeySecret: "d2ecaa9d75114d3b9f42b99014198306"
|
||||
BucketName: "dci-file-new"
|
||||
BosUrl: ".bj.bcebos.com"
|
||||
BosBaseDir: "fonchain-main"
|
||||
BosHttp: "https://"
|
||||
BosDomain: "cdns.fontree.cn"
|
||||
Endpoint: ".bj.bcebos.com"
|
||||
BosBaseDir: "exhibition"
|
||||
Host: "https://bj.bcebos.com"
|
||||
CdnHost: "https://cdns.fontree.cn"
|
@ -13,54 +13,56 @@ dubbo:
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
timeout: 15s
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: cshutdown,sign
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
ExhibitionClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Exhibition
|
||||
# logger:
|
||||
# zap-config:
|
||||
# level: error # 日志级别
|
||||
# development: false
|
||||
# disableCaller: false
|
||||
# disableStacktrace: false
|
||||
# encoding: "json"
|
||||
# # zap encoder 配置
|
||||
# encoderConfig:
|
||||
# messageKey: "message"
|
||||
# levelKey: "level"
|
||||
# timeKey: "time"
|
||||
# nameKey: "logger"
|
||||
# callerKey: "caller"
|
||||
# stacktraceKey: "stacktrace"
|
||||
# lineEnding: ""
|
||||
# levelEncoder: "capitalColor"
|
||||
# timeEncoder: "iso8601"
|
||||
# durationEncoder: "seconds"
|
||||
# callerEncoder: "short"
|
||||
# nameEncoder: ""
|
||||
# EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
|
||||
# EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
# outputPaths:
|
||||
# - "stderr"
|
||||
# errorOutputPaths:
|
||||
# - "stderr"
|
||||
# lumberjack-config:
|
||||
# # 写日志的文件名称
|
||||
# filename: "runtime/exhibition-main.log"
|
||||
# # 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
# maxSize: 5
|
||||
# # 日志保留的最大天数(只保留最近多少天的日志)
|
||||
# maxAge: 30
|
||||
# # 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
# maxBackups: 30
|
||||
# # 是否使用本地时间,默认使用 UTC 时间
|
||||
# localTime: true
|
||||
# # 是否压缩日志文件,压缩方法 gzip
|
||||
# compress: false
|
||||
#
|
||||
ArtistClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.common.Artist
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
development: false
|
||||
disableCaller: false
|
||||
disableStacktrace: false
|
||||
encoding: "json"
|
||||
# zap encoder 配置
|
||||
encoderConfig:
|
||||
messageKey: "message"
|
||||
levelKey: "level"
|
||||
timeKey: "time"
|
||||
nameKey: "logger"
|
||||
callerKey: "caller"
|
||||
stacktraceKey: "stacktrace"
|
||||
lineEnding: ""
|
||||
levelEncoder: "capitalColor"
|
||||
timeEncoder: "iso8601"
|
||||
durationEncoder: "seconds"
|
||||
callerEncoder: "short"
|
||||
nameEncoder: ""
|
||||
EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
|
||||
EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
outputPaths:
|
||||
- "stderr"
|
||||
errorOutputPaths:
|
||||
- "stderr"
|
||||
lumberjack-config:
|
||||
# 写日志的文件名称
|
||||
filename: "runtime/exhibition-main.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 5
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 30
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 30
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
||||
|
||||
|
@ -212,7 +212,7 @@ func GetSnapshot(videoPath, snapshotPath string, frameNum int) (snapshotName str
|
||||
}
|
||||
|
||||
func PutBos(filePath string, mediaType string, needRemove bool) (url string, err error) {
|
||||
BOSClient, err := objstorage.NewBOS(config.BosAk, config.BosSk, objstorage.BOS_BJ)
|
||||
BOSClient, err := objstorage.NewBOS(config.Data.Bos.AccessKeyId, config.Data.Bos.AccessKeySecret, objstorage.BOS_BJ)
|
||||
if err != nil {
|
||||
logger.Errorf("PutBos NewBOS err ", err)
|
||||
err = errors.New(msg.ErrorUploadBos)
|
||||
@ -235,15 +235,15 @@ func PutBos(filePath string, mediaType string, needRemove bool) (url string, err
|
||||
}
|
||||
}
|
||||
filePath = strings.Replace(filePath, "./runtime", "", 1)
|
||||
var objectName string = fmt.Sprintf("%s/%s%s", config.BosBaseDir, config.Env, filePath)
|
||||
_, err = BOSClient.PutObjectFromBytes(config.BosBucketName, objectName, fileBytes)
|
||||
var objectName string = fmt.Sprintf("%s/%s%s", config.Data.Bos.BosBaseDir, config.Data.System.Mode, filePath)
|
||||
_, err = BOSClient.PutObjectFromBytes(config.Data.Bos.BucketName, objectName, fileBytes)
|
||||
if err != nil {
|
||||
logger.Errorf("PutBos PutObject err %+v", err.Error())
|
||||
err = errors.New(msg.ErrorUploadBos)
|
||||
return
|
||||
}
|
||||
//url = fmt.Sprintf("%s%s%s/%s", config.BosHttp, config.BosBucketName, config.BosUrl, objectName)
|
||||
url = fmt.Sprintf("%s%s/%s", config.BosHttp, config.BosDomain, objectName)
|
||||
url = fmt.Sprintf("%s/%s", config.Data.Bos.CdnHost, objectName)
|
||||
return
|
||||
}
|
||||
|
||||
@ -258,15 +258,15 @@ func quickBos(file *multipart.FileHeader, mediaType string, mask string, source
|
||||
return
|
||||
}
|
||||
}
|
||||
var objectName string = fmt.Sprintf("%s/%s/%s", config.BosBaseDir, config.Env, filePath)
|
||||
BOSClient, _ := objstorage.NewBOS(config.BosAk, config.BosSk, objstorage.BOS_BJ)
|
||||
_, err = BOSClient.PutObjectFromBytes(config.BosBucketName, objectName, fileBytes)
|
||||
var objectName string = fmt.Sprintf("%s/%s/%s", config.Data.Bos.BosBaseDir, config.Data.System.Mode, filePath)
|
||||
BOSClient, _ := objstorage.NewBOS(config.Data.Bos.AccessKeyId, config.Data.Bos.AccessKeySecret, objstorage.BOS_BJ)
|
||||
_, err = BOSClient.PutObjectFromBytes(config.Data.Bos.BucketName, objectName, fileBytes)
|
||||
if err != nil {
|
||||
logger.Errorf("quickBos err", err)
|
||||
return
|
||||
}
|
||||
//url = fmt.Sprintf("%s%s%s/%s", config.BosHttp, config.BosBucketName, config.BosUrl, objectName)
|
||||
url = fmt.Sprintf("%s%s/%s", config.BosHttp, config.BosDomain, objectName)
|
||||
url = fmt.Sprintf("%s/%s", config.Data.Bos.CdnHost, objectName)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user