Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoUsersDeletedErr = errors.New("no users deleted") NothingToUpdateErr = errors.New("nothing to update") UserIsNilErr = errors.New("user is nil") UpdateIsNil = errors.New("update is nil") )
View Source
var (
ErrInvalidUpdatedAt = errors.New("invalid updated at timestamp")
)
Functions ¶
This section is empty.
Types ¶
type UserRepository ¶
type UserRepository interface { Create(ctx context.Context, user *go_nuntio.User, hasher hash.Hash) (*go_nuntio.User, error) UpdateProfile(ctx context.Context, get *go_nuntio.User, update *go_nuntio.User) error UpdatePassword(ctx context.Context, get *go_nuntio.User, update *go_nuntio.User, hasher hash.Hash) error UpdateContact(ctx context.Context, get *go_nuntio.User, update *go_nuntio.User) error UpdateRole(ctx context.Context, get *go_nuntio.User, update *go_nuntio.User) error UpdateRegistrationType(ctx context.Context, userId string, registrationType go_nuntio.LoginType) error VerifyEmail(ctx context.Context, user *go_nuntio.User) error VerifyPhone(ctx context.Context, user *go_nuntio.User) error Get(ctx context.Context, user *go_nuntio.User, query *go_nuntio.Filter) (*go_nuntio.User, error) GetMany(ctx context.Context, users []*go_nuntio.User) ([]*go_nuntio.User, error) Search(ctx context.Context, search string) (*go_nuntio.User, error) List(ctx context.Context, query *go_nuntio.Filter) ([]*go_nuntio.User, error) Count(ctx context.Context) (int64, error) Delete(ctx context.Context, user *go_nuntio.User) error DeleteMany(ctx context.Context, userBatch []*go_nuntio.User) error DeleteAll(ctx context.Context) error AddContact(ctx context.Context, user, contact *go_nuntio.User) error RemoveContact(ctx context.Context, user, contact *go_nuntio.User) error BuildIndexes(ctx context.Context) error }
func New ¶
func New(collection *mongo.Collection, crypto cryptox.Crypto, validatePassword bool) UserRepository
Source Files ¶
- add_contact.go
- count.go
- create.go
- delete.go
- delete_all.go
- delete_many.go
- get.go
- get_many.go
- helpers.go
- list.go
- remove_contact.go
- search.go
- update_contact.go
- update_password.go
- update_profile.go
- update_registration_type.go
- update_role.go
- upgrade_encryption_level.go
- user_repository.go
- verify_email.go
- verify_phone.go
Click to show internal directories.
Click to hide internal directories.