mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 15:27:33 +00:00
start
This commit is contained in:
@@ -63,68 +63,3 @@ type domainChanges interface {
|
||||
// This is used for reducing events.
|
||||
SetUpdatedAt(t time.Time) database.Change
|
||||
}
|
||||
|
||||
// import (
|
||||
// "math/rand/v2"
|
||||
// "strconv"
|
||||
|
||||
// "github.com/zitadel/zitadel/backend/v3/storage/cache"
|
||||
// "github.com/zitadel/zitadel/backend/v3/storage/database"
|
||||
|
||||
// // "github.com/zitadel/zitadel/backend/v3/telemetry/logging"
|
||||
// "github.com/zitadel/zitadel/backend/v3/telemetry/tracing"
|
||||
// "github.com/zitadel/zitadel/internal/crypto"
|
||||
// )
|
||||
|
||||
// // The variables could also be moved to a struct.
|
||||
// // I just started with the singleton pattern and kept it like this.
|
||||
// var (
|
||||
// pool database.Pool
|
||||
// userCodeAlgorithm crypto.EncryptionAlgorithm
|
||||
// tracer tracing.Tracer
|
||||
// // logger logging.Logger
|
||||
|
||||
// userRepo func(database.QueryExecutor) UserRepository
|
||||
// // instanceRepo func(database.QueryExecutor) InstanceRepository
|
||||
// cryptoRepo func(database.QueryExecutor) CryptoRepository
|
||||
// orgRepo func(database.QueryExecutor) OrgRepository
|
||||
|
||||
// // instanceCache cache.Cache[instanceCacheIndex, string, *Instance]
|
||||
// orgCache cache.Cache[orgCacheIndex, string, *Org]
|
||||
|
||||
// generateID func() (string, error) = func() (string, error) {
|
||||
// return strconv.FormatUint(rand.Uint64(), 10), nil
|
||||
// }
|
||||
// )
|
||||
|
||||
// func SetPool(p database.Pool) {
|
||||
// pool = p
|
||||
// }
|
||||
|
||||
// func SetUserCodeAlgorithm(algorithm crypto.EncryptionAlgorithm) {
|
||||
// userCodeAlgorithm = algorithm
|
||||
// }
|
||||
|
||||
// func SetTracer(t tracing.Tracer) {
|
||||
// tracer = t
|
||||
// }
|
||||
|
||||
// // func SetLogger(l logging.Logger) {
|
||||
// // logger = l
|
||||
// // }
|
||||
|
||||
// func SetUserRepository(repo func(database.QueryExecutor) UserRepository) {
|
||||
// userRepo = repo
|
||||
// }
|
||||
|
||||
// func SetOrgRepository(repo func(database.QueryExecutor) OrgRepository) {
|
||||
// orgRepo = repo
|
||||
// }
|
||||
|
||||
// // func SetInstanceRepository(repo func(database.QueryExecutor) InstanceRepository) {
|
||||
// // instanceRepo = repo
|
||||
// // }
|
||||
|
||||
// func SetCryptoRepository(repo func(database.QueryExecutor) CryptoRepository) {
|
||||
// cryptoRepo = repo
|
||||
// }
|
||||
|
Reference in New Issue
Block a user