Documentation
¶
Index ¶
Constants ¶
View Source
const ( InsertUserQuery = "INSERT INTO users (name, email, password) VALUES (@userName, @userEmail, @hashedPassword);" GetUserByEmailQuery = "SELECT * FROM users WHERE email = @userEmail;" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertUser ¶
type Postgres ¶
type Postgres struct { User // contains filtered or unexported fields }
func CreatePool ¶
type User ¶
type User struct { Id int `json:"id"` Name string `json:"name"` Email string `json:"email"` Password string `json:"-"` Verified bool `json:"verified"` Role string `json:"role"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
exact order as in database
func (*User) GetByEmail ¶
Click to show internal directories.
Click to hide internal directories.