21 lines
657 B
Go
21 lines
657 B
Go
package ant
|
|
|
|
import (
|
|
dciConfig "chain-dci/config"
|
|
"github.com/google/wire"
|
|
antCloud "github.com/huyi-cn/antcloud-golang-sdk"
|
|
)
|
|
|
|
var Provider = wire.NewSet(NewAntClient)
|
|
|
|
func NewAntClient() *antCloud.Client {
|
|
// Endpoint 请参考 https://api.aliyun.com/product/rtc
|
|
//bccrConfig := new(bccrClient.Config)
|
|
//bccrConfig.SetEndpoint(dciConfig.Data.Dci.EndPoint)
|
|
//bccrConfig.SetAccessKeyId(dciConfig.Data.Dci.AccessKey)
|
|
//bccrConfig.SetAccessKeySecret(dciConfig.Data.Dci.AccessKeySecret)
|
|
|
|
client := antCloud.NewClient(dciConfig.Data.AntCloud.EndPoint, dciConfig.Data.AntCloud.AccessKey, dciConfig.Data.AntCloud.AccessKeySecret, nil)
|
|
return client
|
|
}
|