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 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, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.