MCPcopy Create free account
hub / github.com/MG-RAST/Shock / New

Function New

shock-server/user/user.go:58–65  ·  view source on GitHub ↗
(username string, password string, isAdmin bool)

Source from the content-addressed store, hash-verified

56}
57
58func New(username string, password string, isAdmin bool) (u *User, err error) {
59 u = &User{Uuid: uuid.New(), Username: username, Password: password, Admin: isAdmin}
60 err = u.Save()
61 if err != nil {
62 u = nil
63 }
64 return
65}
66
67func FindByUuid(uuid string) (u *User, err error) {
68 session := db.Connection.Session.Copy()

Callers 1

InitializeFunction · 0.70

Calls 1

SaveMethod · 0.45

Tested by

no test coverage detected