feat: add post buy count

This commit is contained in:
yanghao05
2025-04-18 22:10:28 +08:00
parent 2cb7960302
commit 192bd07b9e
13 changed files with 429 additions and 11 deletions

View File

@@ -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()...)