@@ -45,7 +45,12 @@ type MongoUserRepository struct {
4545func NewUserRepositoryByConfig (db * mongo.Database , userCollectionName , passwordCollectionName string , activatedStatus interface {}, status a.UserStatusConfig , c a.SchemaConfig , options ... func (context.Context , string ) (bool , error )) * MongoUserRepository {
4646 return NewUserRepository (db , userCollectionName , passwordCollectionName , activatedStatus , status , c .Username , c .SuccessTime , c .FailTime , c .FailCount , c .LockedUntilTime , c .Status , c .PasswordChangedTime , c .Password , c .Contact , c .Email , c .Phone , c .DisplayName , c .MaxPasswordAge , c .Roles , c .UserType , c .AccessDateFrom , c .AccessDateTo , c .AccessTimeFrom , c .AccessTimeTo , c .TwoFactors , options ... )
4747}
48-
48+ func NewUserAdapterByConfig (db * mongo.Database , userCollectionName , passwordCollectionName string , activatedStatus interface {}, status a.UserStatusConfig , c a.SchemaConfig , options ... func (context.Context , string ) (bool , error )) * MongoUserRepository {
49+ return NewUserRepositoryByConfig (db , userCollectionName , passwordCollectionName , activatedStatus , status , c , options ... )
50+ }
51+ func NewUserAdapter (db * mongo.Database , userCollectionName , passwordCollectionName string , activatedStatus interface {}, status a.UserStatusConfig , userName , successTimeName , failTimeName , failCountName , lockedUntilTimeName , statusName , passwordChangedTimeName , passwordName , contactName , emailName , phoneName , displayNameName , maxPasswordAgeName , rolesName , userTypeName , accessDateFromName , accessDateToName , accessTimeFromName , accessTimeToName , twoFactorsName string , options ... func (context.Context , string ) (bool , error )) * MongoUserRepository {
52+ return NewUserRepository (db , userCollectionName , passwordCollectionName , activatedStatus , status , userName , successTimeName , failTimeName , failCountName , lockedUntilTimeName , statusName , passwordChangedTimeName , passwordName , contactName , emailName , phoneName , displayNameName , maxPasswordAgeName , rolesName , userTypeName , accessDateFromName , accessDateToName , accessTimeFromName , accessTimeToName , twoFactorsName , options ... )
53+ }
4954func NewUserRepository (db * mongo.Database , userCollectionName , passwordCollectionName string , activatedStatus interface {}, status a.UserStatusConfig , userName , successTimeName , failTimeName , failCountName , lockedUntilTimeName , statusName , passwordChangedTimeName , passwordName , contactName , emailName , phoneName , displayNameName , maxPasswordAgeName , rolesName , userTypeName , accessDateFromName , accessDateToName , accessTimeFromName , accessTimeToName , twoFactorsName string , options ... func (context.Context , string ) (bool , error )) * MongoUserRepository {
5055 passwordCollection := db .Collection (passwordCollectionName )
5156 userCollection := passwordCollection
0 commit comments