Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateUser ¶
ValidateUser makes sure all user's information is satisfied
Types ¶
type User ¶
type User struct { Id int `json:"id"` Name string `json:"name" form:"name"` Email string `json:"email" form:"email"` PasswordDigest []byte `json:"-"` Password string `json:"password"` }
func CreateUser ¶
CreateUser validates the User's information. Upon successful validations, it creates a new User node in the database,
func DummyUsers ¶
func DummyUsers() []User
DummyUsers or factory.DummyUsers creates a slice of valid Users
func FindUser ¶
FindUser finds a single User by calling on FindUsers and returns the first element of the []*User slice.
type UserAdapter ¶
type UserAdapter struct { Id int `json:"id(u)"` Name string `json:"u.name"` Email string `json:"u.email"` PasswordDigest []byte `json:"u.password_digest"` }
func (*UserAdapter) Transform ¶
func (ua *UserAdapter) Transform() *User
Transform creates a User struct from the UserAdapter
Click to show internal directories.
Click to hide internal directories.