Documentation ¶
Index ¶
- type Service
- func (db *Service) ChangePassword(user *datatype.User, newPassword string, password string) error
- func (db *Service) ConfirmPassResetToken(userID datatype.ID, token string, newPassword string) error
- func (db *Service) ConfirmUserEmailChange(userID datatype.ID, token string) bool
- func (db *Service) CreateChangeEmailConfirmation(user *datatype.User, email string, password string) (*datatype.EmailChangeConfirmation, error)
- func (db *Service) DeletePassResetToken(userID datatype.ID, token string) bool
- func (db *Service) FindByEmail(email string) (*datatype.User, error)
- func (db *Service) FindByID(id datatype.ID) (*datatype.User, error)
- func (db *Service) FindUserBalance(userID datatype.ID, currecncyID datatype.ID) (decimaldt.Decimal, decimaldt.Decimal, error)
- func (db *Service) FindUserBalances(id datatype.ID) ([]datatype.Balance, error)
- func (db *Service) GetBalances(userID datatype.ID) ([]datatype.Balance, error)
- func (db *Service) GetPerson(userID datatype.ID) (*datatype.Person, error)
- func (db *Service) IsEmailRegistered(email string) bool
- func (db *Service) NewPassResetTokenByEmail(email string) (*datatype.UserResetToken, error)
- func (db *Service) Register(email, name string, ethereumAddress string, password string, agreeToTerms bool) (*datatype.User, error)
- func (db *Service) UpdateProfileImage(user *datatype.User, imageURL string) error
- func (db *Service) Validate(email string, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
Service defines service type
func (*Service) ChangePassword ¶
ChangePassword changes user password
func (*Service) ConfirmPassResetToken ¶
func (db *Service) ConfirmPassResetToken( userID datatype.ID, token string, newPassword string, ) error
ConfirmPassResetToken validates a pass-reset token and update user's password
func (*Service) ConfirmUserEmailChange ¶
ConfirmUserEmailChange confirms email change and changes user's email if successful
func (*Service) CreateChangeEmailConfirmation ¶
func (db *Service) CreateChangeEmailConfirmation( user *datatype.User, email string, password string, ) (*datatype.EmailChangeConfirmation, error)
CreateChangeEmailConfirmation creates a new email change confirmation db entry
func (*Service) DeletePassResetToken ¶
DeletePassResetToken deletes a pass-reset token
func (*Service) FindByEmail ¶
FindByEmail finds a user by email
func (*Service) FindUserBalance ¶
func (db *Service) FindUserBalance( userID datatype.ID, currecncyID datatype.ID, ) ( decimaldt.Decimal, decimaldt.Decimal, error, )
FindUserBalance finds user's balance of given currecncy
func (*Service) FindUserBalances ¶
FindUserBalances finds all balances belonging to given user
func (*Service) GetBalances ¶
GetBalaces fetches user balaces
func (*Service) IsEmailRegistered ¶
IsEmailRegistered checks whether email is already registered or not
func (*Service) NewPassResetTokenByEmail ¶
func (db *Service) NewPassResetTokenByEmail(email string) (*datatype.UserResetToken, error)
NewPassResetTokenByEmail creates a new reset password token for given email
func (*Service) Register ¶
func (db *Service) Register( email, name string, ethereumAddress string, password string, agreeToTerms bool, ) (*datatype.User, error)
Register Registers a new user
func (*Service) UpdateProfileImage ¶
UpdateProfileImage changes user profile image url
Source Files ¶
- change-password.go
- confirm-email-change.go
- confirm-pass-reset-token.go
- create-change-email-confirmation.go
- delete-pass-reset-token.go
- find-by-email.go
- find-by-id.go
- find-user-balance.go
- find-user-balances.go
- get-balances.go
- get-person.go
- helper.go
- is-email-registered.go
- new-pass-reset-token-by-email.go
- register.go
- service.go
- update-profile-image.go