Files
sxchnge/backend/internal/profile/runtime.go
T

22 lines
655 B
Go

// Package profile selects the locally owned components of the copied BFF.
package profile
import (
"git.sendico.io/tech/sxchnge/bff/edge/product/interface/accountservice"
"git.sendico.io/tech/sxchnge/bff/edge/shared/interface/api"
)
const Accounts = "accounts"
func Runtime() api.RuntimeConfig {
return api.RuntimeConfig{Name: "sxchnge.bff", Bootstrap: bootstrap}
}
func bootstrap(a api.API) (api.RuntimeComponents, error) {
accounts, err := accountservice.NewAccountService(a.Logger(), a.DBFactory(), &a.Config().Mw.Password, a.Config().AuthStorage)
if err != nil {
return nil, err
}
return api.RuntimeComponents{Accounts: accounts}, nil
}