21 lines
418 B
Go
21 lines
418 B
Go
package initialize
|
|
|
|
import (
|
|
"github.com/baidubce/bce-sdk-go/services/bos"
|
|
"nCovTrack-Backend/global"
|
|
)
|
|
|
|
func initBos() {
|
|
clientConfig := bos.BosClientConfiguration{
|
|
global.ServerSettings.Bos.AccessKey,
|
|
global.ServerSettings.Bos.SecretKey,
|
|
global.ServerSettings.Bos.Domain,
|
|
false,
|
|
}
|
|
bosClient, err := bos.NewClientWithConfig(&clientConfig)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
global.BosClient = bosClient
|
|
}
|