feat: add post buy count
This commit is contained in:
@@ -36,13 +36,20 @@ func Provide(opts ...opt.Option) error {
|
||||
|
||||
return container.Container.Provide(func() (*OSSClient, error) {
|
||||
cred := credentials.NewStaticCredentialsProvider(config.AccessKeyId, config.AccessKeySecret)
|
||||
|
||||
cfg := oss.LoadDefaultConfig().
|
||||
WithCredentialsProvider(cred).
|
||||
WithRegion(config.Region).
|
||||
WithUseCName(true).
|
||||
WithEndpoint(*config.Host)
|
||||
|
||||
cfgInternal := oss.LoadDefaultConfig().
|
||||
WithCredentialsProvider(cred).
|
||||
WithRegion(config.Region)
|
||||
|
||||
return &OSSClient{
|
||||
client: oss.NewClient(cfg.WithUseCName(true).WithEndpoint(*config.Host)),
|
||||
internalClient: oss.NewClient(cfg.WithUseInternalEndpoint(true)),
|
||||
client: oss.NewClient(cfg),
|
||||
internalClient: oss.NewClient(cfgInternal),
|
||||
config: &config,
|
||||
}, nil
|
||||
}, o.DiOptions()...)
|
||||
|
||||
Reference in New Issue
Block a user