pcm-coordinator/adaptor/PCM-FC/PCM-SCF/internal/svc/servicecontext.go

25 lines
455 B
Go

package svc
import (
"PCM/adaptor/PCM-FC/PCM-SCF/internal/config"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
)
type ServiceContext struct {
Config config.Config
Credential *common.Credential
}
func NewServiceContext(c config.Config) *ServiceContext {
credential := common.NewCredential(
c.SecretConfig.SecretId,
c.SecretConfig.SecretKey,
)
return &ServiceContext{
Credential: credential,
Config: c,
}
}