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