Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/internal/cert/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"errors"

tidcommon "github.com/thunder-id/thunderid/pkg/thunderidengine/common"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"

"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
sysutils "github.com/thunder-id/thunderid/internal/system/utils"
)

Expand All @@ -50,12 +50,12 @@ type CertificateServiceInterface interface {
// certificateService implements the CertificateServiceInterface for managing certificates.
type certificateService struct {
store certificateStoreInterface
transactioner transaction.Transactioner
transactioner providers.Transactioner
}

// newCertificateService creates a new instance of CertificateService.
func newCertificateService(store certificateStoreInterface,
transactioner transaction.Transactioner) CertificateServiceInterface {
transactioner providers.Transactioner) CertificateServiceInterface {
return &certificateService{
store: store,
transactioner: transactioner,
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/consent/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (

inboundmodel "github.com/thunder-id/thunderid/internal/inboundclient/model"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/internal/system/utils"
tidcommon "github.com/thunder-id/thunderid/pkg/thunderidengine/common"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

// ConsentServiceInterface defines the business operations for managing consents and their purposes.
Expand All @@ -55,7 +55,7 @@ type InboundClientProvider interface {
// consentService is the default implementation of ConsentServiceInterface.
type consentService struct {
consentStore consentStoreInterface
transactioner transaction.Transactioner
transactioner providers.Transactioner
inboundClientProvider InboundClientProvider
logger *log.Logger
}
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/consent/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (

"github.com/thunder-id/thunderid/internal/system/config"
"github.com/thunder-id/thunderid/internal/system/database/provider"
"github.com/thunder-id/thunderid/internal/system/transaction"
sysutils "github.com/thunder-id/thunderid/internal/system/utils"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

// consentStoreInterface defines the persistence operations for consent records.
Expand All @@ -48,7 +48,7 @@ type consentStore struct {
// newConsentStore creates a new consentStore along with a transactioner that callers can use to
// wrap the multi-table create and update operations in a single database transaction. Consent
// records are long-lived persistent state, so they are persisted to the runtime persistent datasource.
func newConsentStore() (consentStoreInterface, transaction.Transactioner, error) {
func newConsentStore() (consentStoreInterface, providers.Transactioner, error) {
dbProvider := provider.GetDBProvider()

transactioner, err := dbProvider.GetRuntimePersistentDBTransactioner()
Expand Down
3 changes: 1 addition & 2 deletions backend/internal/entity/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/thunder-id/thunderid/internal/ou"
"github.com/thunder-id/thunderid/internal/system/cache"
"github.com/thunder-id/thunderid/internal/system/cryptolib"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

Expand All @@ -48,7 +47,7 @@ func Initialize(

// initializeStore always creates a composite store (DB + in-memory file store).
func initializeStore(cacheManager cache.CacheManagerInterface) (
entityStoreInterface, transaction.Transactioner, error) {
entityStoreInterface, providers.Transactioner, error) {
fileStore := newEntityFileBasedStore()
dbStore, transactioner, err := newEntityDBStore()
if err != nil {
Expand Down
5 changes: 2 additions & 3 deletions backend/internal/entity/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/thunder-id/thunderid/internal/ou"
"github.com/thunder-id/thunderid/internal/system/cryptolib"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
sysutils "github.com/thunder-id/thunderid/internal/system/utils"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)
Expand Down Expand Up @@ -107,7 +106,7 @@ type entityService struct {
hashService cryptolib.HashServiceInterface
entityTypeService entitytype.EntityTypeServiceInterface
ouService ou.OrganizationUnitServiceInterface
transactioner transaction.Transactioner
transactioner providers.Transactioner
logger *log.Logger
groupMembershipProvider GroupMembershipProvider
}
Expand All @@ -124,7 +123,7 @@ func newEntityService(
hashService cryptolib.HashServiceInterface,
entityTypeService entitytype.EntityTypeServiceInterface,
ouService ou.OrganizationUnitServiceInterface,
transactioner transaction.Transactioner,
transactioner providers.Transactioner,
) EntityServiceInterface {
return &entityService{
store: store,
Expand Down
3 changes: 1 addition & 2 deletions backend/internal/entity/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
dbmodel "github.com/thunder-id/thunderid/internal/system/database/model"
"github.com/thunder-id/thunderid/internal/system/database/provider"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

Expand Down Expand Up @@ -90,7 +89,7 @@ type entityDBStore struct {

// newEntityDBStore creates a new instance of entityDBStore.
// Indexed attributes start empty; consumers must call LoadIndexedAttributes after init.
func newEntityDBStore() (entityStoreInterface, transaction.Transactioner, error) {
func newEntityDBStore() (entityStoreInterface, providers.Transactioner, error) {
runtime := config.GetServerRuntime()

dbProvider := getDBProvider()
Expand Down
3 changes: 2 additions & 1 deletion backend/internal/entitytype/file_based_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
declarativeresource "github.com/thunder-id/thunderid/internal/system/declarative_resource"
"github.com/thunder-id/thunderid/internal/system/declarative_resource/entity"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

type entityTypeFileBasedStore struct {
Expand Down Expand Up @@ -279,7 +280,7 @@ func (f *entityTypeFileBasedStore) GetDisplayAttributesByNames(
}

// newEntityTypeFileBasedStore creates a new instance of a file-based store.
func newEntityTypeFileBasedStore() (entityTypeStoreInterface, transaction.Transactioner) {
func newEntityTypeFileBasedStore() (entityTypeStoreInterface, providers.Transactioner) {
genericStore := declarativeresource.NewGenericFileBasedStore(entity.KeyTypeEntityType)
return &entityTypeFileBasedStore{
GenericFileBasedStore: genericStore,
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/entitytype/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
declarativeresource "github.com/thunder-id/thunderid/internal/system/declarative_resource"
"github.com/thunder-id/thunderid/internal/system/middleware"
"github.com/thunder-id/thunderid/internal/system/sysauthz"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

// Initialize initializes the entity type service and registers its routes.
Expand Down Expand Up @@ -99,7 +99,7 @@ func Initialize(
// - If declarative_resources.enabled = true: behaves as IMMUTABLE mode
// - If declarative_resources.enabled = false: behaves as MUTABLE mode
func initializeStore(storeMode serverconst.StoreMode, cacheManager cache.CacheManagerInterface) (
entityTypeStoreInterface, transaction.Transactioner, error) {
entityTypeStoreInterface, providers.Transactioner, error) {
entityTypeByIDCache := cache.GetCache[*EntityType](cacheManager, "EntityTypeByIDCache")
entityTypeByNameCache := cache.GetCache[*EntityType](cacheManager, "EntityTypeByNameCache")

Expand Down
6 changes: 3 additions & 3 deletions backend/internal/entitytype/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ import (
"fmt"

tidcommon "github.com/thunder-id/thunderid/pkg/thunderidengine/common"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"

"github.com/thunder-id/thunderid/internal/entitytype/model"
oupkg "github.com/thunder-id/thunderid/internal/ou"
serverconst "github.com/thunder-id/thunderid/internal/system/constants"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/security"
"github.com/thunder-id/thunderid/internal/system/sysauthz"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/internal/system/utils"
)

Expand Down Expand Up @@ -90,15 +90,15 @@ type EntityTypeServiceInterface interface {
type entityTypeService struct {
entityTypeStore entityTypeStoreInterface
ouService oupkg.OrganizationUnitServiceInterface
transactioner transaction.Transactioner
transactioner providers.Transactioner
authzService sysauthz.SystemAuthorizationServiceInterface
}

// newEntityTypeService creates a new instance of entityTypeService.
func newEntityTypeService(
ouService oupkg.OrganizationUnitServiceInterface,
store entityTypeStoreInterface,
transactioner transaction.Transactioner,
transactioner providers.Transactioner,
authzService sysauthz.SystemAuthorizationServiceInterface,
) EntityTypeServiceInterface {
return &entityTypeService{
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/entitytype/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/thunder-id/thunderid/internal/system/config"
"github.com/thunder-id/thunderid/internal/system/database/provider"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

// marshalSystemAttributes marshals SystemAttributes to a JSON string for DB storage.
Expand Down Expand Up @@ -96,7 +96,7 @@ type entityTypeStore struct {
}

// newEntityTypeStore creates a new instance of entityTypeStore.
func newEntityTypeStore() (entityTypeStoreInterface, transaction.Transactioner, error) {
func newEntityTypeStore() (entityTypeStoreInterface, providers.Transactioner, error) {
dbProvider := provider.GetDBProvider()
transactioner, err := dbProvider.GetConfigDBTransactioner()
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions backend/internal/flow/flowexec/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/thunder-id/thunderid/internal/flow/session"
kmprovider "github.com/thunder-id/thunderid/internal/system/kmprovider/common"
"github.com/thunder-id/thunderid/internal/system/middleware"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

Expand All @@ -44,7 +43,7 @@ func Initialize(
attestationVerifier providers.AttestationProvider,
graphBuilder graphbuilder.GraphBuilderInterface,
storeProvider providers.RuntimeStoreProvider,
transactioner transaction.Transactioner,
transactioner providers.Transactioner,
cfg flowconfig.Config,
) (FlowExecServiceInterface, error) {
flowStore := newFlowStore(storeProvider)
Expand Down
5 changes: 2 additions & 3 deletions backend/internal/flow/flowexec/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
kmprovider "github.com/thunder-id/thunderid/internal/system/kmprovider/common"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/observability/event"
"github.com/thunder-id/thunderid/internal/system/transaction"
sysutils "github.com/thunder-id/thunderid/internal/system/utils"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)
Expand All @@ -52,7 +51,7 @@ type flowExecService struct {
flowStore flowStoreInterface
actorProvider providers.ActorProvider
observabilitySvc providers.ObservabilityProvider
transactioner transaction.Transactioner
transactioner providers.Transactioner
cryptoSvc kmprovider.RuntimeCryptoProvider
attestationVerifier providers.AttestationProvider
cfg flowconfig.Config
Expand All @@ -63,7 +62,7 @@ func newFlowExecService(flowProvider providers.FlowProvider,
flowStore flowStoreInterface, flowEngine flowEngineInterface,
actorProvider providers.ActorProvider,
observabilitySvc providers.ObservabilityProvider,
transactioner transaction.Transactioner,
transactioner providers.Transactioner,
cryptoSvc kmprovider.RuntimeCryptoProvider,
attestationVerifier providers.AttestationProvider,
graphBuilder graphbuilder.GraphBuilderInterface,
Expand Down
3 changes: 1 addition & 2 deletions backend/internal/flow/mgt/cache_backed_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (

"github.com/thunder-id/thunderid/internal/system/cache"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
)

const cacheBackedStoreLoggerComponentName = "CacheBackedFlowStore"
Expand All @@ -43,7 +42,7 @@ type cacheBackedFlowStore struct {
func newCacheBackedFlowStore(
flowByIDCache cache.CacheInterface[*providers.CompleteFlowDefinition],
flowByHandleCache cache.CacheInterface[*providers.CompleteFlowDefinition],
) (flowStoreInterface, transaction.Transactioner, error) {
) (flowStoreInterface, providers.Transactioner, error) {
store, transactioner, err := newFlowStore()
if err != nil {
return nil, nil, err
Expand Down
2 changes: 1 addition & 1 deletion backend/internal/flow/mgt/file_based_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (f *fileBasedStore) IsFlowExistsByHandle(_ context.Context, handle string,
}

// newFileBasedStore creates a new instance of a file-based store.
func newFileBasedStore() (flowStoreInterface, transaction.Transactioner) {
func newFileBasedStore() (flowStoreInterface, providers.Transactioner) {
return &fileBasedStore{
GenericFileBasedStore: declarativeresource.NewGenericFileBasedStore(entity.KeyTypeFlow),
}, transaction.NewNoOpTransactioner()
Expand Down
3 changes: 1 addition & 2 deletions backend/internal/flow/mgt/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
serverconst "github.com/thunder-id/thunderid/internal/system/constants"
declarativeresource "github.com/thunder-id/thunderid/internal/system/declarative_resource"
"github.com/thunder-id/thunderid/internal/system/middleware"
"github.com/thunder-id/thunderid/internal/system/transaction"
)

// Initialize initializes the flow management service and registers HTTP routes.
Expand Down Expand Up @@ -95,7 +94,7 @@ func Initialize(
// - Declarative flows cannot be updated or deleted
func initializeStore(
cacheManager cache.CacheManagerInterface,
flowValidator FlowValidatorInterface) (flowStoreInterface, *compositeFlowStore, transaction.Transactioner, error) {
flowValidator FlowValidatorInterface) (flowStoreInterface, *compositeFlowStore, providers.Transactioner, error) {
var compositeStore *compositeFlowStore

storeMode := getFlowStoreMode()
Expand Down
5 changes: 2 additions & 3 deletions backend/internal/flow/mgt/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
"github.com/thunder-id/thunderid/internal/system/config"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/resourcedependency"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/internal/system/utils"
)

Expand Down Expand Up @@ -85,7 +84,7 @@ type flowMgtService struct {
interceptorRegistry interceptor.InterceptorRegistryInterface
flowValidator FlowValidatorInterface
compositeStore *compositeFlowStore
transactioner transaction.Transactioner
transactioner providers.Transactioner
dependencyRegistry resourcedependency.Registry
logger *log.Logger
}
Expand All @@ -99,7 +98,7 @@ func newFlowMgtService(
interceptorRegistry interceptor.InterceptorRegistryInterface,
flowValidator FlowValidatorInterface,
compositeStore *compositeFlowStore,
transactioner transaction.Transactioner,
transactioner providers.Transactioner,
) FlowMgtServiceInterface {
return &flowMgtService{
store: store,
Expand Down
3 changes: 1 addition & 2 deletions backend/internal/flow/mgt/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/thunder-id/thunderid/internal/system/config"
"github.com/thunder-id/thunderid/internal/system/database/provider"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
)

// Database column names
Expand Down Expand Up @@ -78,7 +77,7 @@ type flowStore struct {
}

// newFlowStore creates a new instance of flowStore.
func newFlowStore() (flowStoreInterface, transaction.Transactioner, error) {
func newFlowStore() (flowStoreInterface, providers.Transactioner, error) {
dbProvider := getDBProvider()
transactioner, err := dbProvider.GetConfigDBTransactioner()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/flow/session/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (

"github.com/thunder-id/thunderid/internal/system/cryptolib"
"github.com/thunder-id/thunderid/internal/system/log"
"github.com/thunder-id/thunderid/internal/system/transaction"
sysutils "github.com/thunder-id/thunderid/internal/system/utils"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

// Service is the SSO session capability. It wraps every session-store operation so callers (the
Expand Down Expand Up @@ -110,7 +110,7 @@ type CriteriaRevoker interface {
type service struct {
store sessionStore
resolver Resolver
transactioner transaction.Transactioner
transactioner providers.Transactioner
criteriaRevoker CriteriaRevoker
timeouts Timeouts
logger *log.Logger
Expand Down
2 changes: 1 addition & 1 deletion backend/internal/group/file_based_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type fileBasedGroupStore struct {
}

// newFileBasedGroupStore creates a new file-based store for groups.
func newFileBasedGroupStore() (groupStoreInterface, transaction.Transactioner) {
func newFileBasedGroupStore() (groupStoreInterface, providers.Transactioner) {
return &fileBasedGroupStore{
GenericFileBasedStore: declarativeresource.NewGenericFileBasedStore(entitystore.KeyTypeGroup),
}, transaction.NewNoOpTransactioner()
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/group/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
declarativeresource "github.com/thunder-id/thunderid/internal/system/declarative_resource"
"github.com/thunder-id/thunderid/internal/system/middleware"
"github.com/thunder-id/thunderid/internal/system/sysauthz"
"github.com/thunder-id/thunderid/internal/system/transaction"
"github.com/thunder-id/thunderid/pkg/thunderidengine/providers"
)

// Initialize initializes the group service and registers its routes.
Expand Down Expand Up @@ -100,7 +100,7 @@ func Initialize(
// non-nil only in composite mode.
func initializeGroupStore(
dbProvider provider.DBProviderInterface,
) (groupStoreInterface, transaction.Transactioner, *fileBasedGroupStore, groupStoreInterface, error) {
) (groupStoreInterface, providers.Transactioner, *fileBasedGroupStore, groupStoreInterface, error) {
storeMode, err := getGroupStoreMode()
if err != nil {
return nil, nil, nil, nil, err
Expand Down
Loading
Loading