Untitled
unknown
plain_text
7 months ago
2.1 kB
4
Indexable
package ordermanagementv1
import (
//nolint:depguard // can't use go-microservices-kit until it supports for IssueImpersonatedPartnerPAT
"github.com/kouzoh/authority-sdk/pat"
"github.com/kouzoh/magician/workflow"
)
type Application struct {
productInventoryClient productInventoryClient
proxyClient proxyClient
orderClient orderClient
userClient userClient
paymentSolutionClient paymentSolutionClient
repository repository
workflowManager *workflow.Manager
categoryValidator categoryValidator
offerClient offerClient
couponClient couponClient
tokenIssuer pat.TokenIssuer
xbBuyeeCheckoutSessionConfig CheckoutSessionConfig
translationClient translationClient
}
func NewApplication(
productInventoryClient productInventoryClient,
proxyClient proxyClient,
orderClient orderClient,
userClient userClient,
paymentSolutionClient paymentSolutionClient,
repository repository,
workflowManager *workflow.Manager,
categoryValidator categoryValidator,
offerClient offerClient,
couponClient couponClient,
tokenIssuer pat.TokenIssuer,
xbBuyeeCheckoutSessionConfig CheckoutSessionConfig,
translationClient translationClient,
) (*Application, error) {
a := &Application{
productInventoryClient: productInventoryClient,
proxyClient: proxyClient,
orderClient: orderClient,
userClient: userClient,
paymentSolutionClient: paymentSolutionClient,
repository: repository,
workflowManager: workflowManager,
categoryValidator: categoryValidator,
offerClient: offerClient,
couponClient: couponClient,
tokenIssuer: tokenIssuer,
xbBuyeeCheckoutSessionConfig: xbBuyeeCheckoutSessionConfig,
translationClient: translationClient,
}
if err := a.registerWorkflowAndActivities(); err != nil {
return nil, err
}
return a, nil
}
Editor is loading...
Leave a Comment