MCPcopy Create free account
hub / github.com/TomDoesTech/GOTTH / CreateUser

Method CreateUser

internal/store/dbstore/user.go:27–38  ·  view source on GitHub ↗
(email string, password string)

Source from the content-addressed store, hash-verified

25}
26
27func (s *UserStore) CreateUser(email string, password string) error {
28
29 hashedPassword, err := s.passwordhash.GenerateFromPassword(password)
30 if err != nil {
31 return err
32 }
33
34 return s.db.Create(&store.User{
35 Email: email,
36 Password: hashedPassword,
37 }).Error
38}
39
40func (s *UserStore) GetUser(email string) (*store.User, error) {
41

Callers

nothing calls this directly

Implementers 2

UserStoreMockinternal/store/mock/mock.go
UserStoreinternal/store/dbstore/user.go

Calls 1

GenerateFromPasswordMethod · 0.65

Tested by

no test coverage detected