Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *pop.Connection
DB is a connection to your database to be used throughout your application.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID uuid.UUID `json:"id" db:"id"` Username string `json:"username" db:"username"` Email string `json:"email" db:"email"` Admin bool `json:"admin" db:"admin"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` PasswordHash string `json:"-" db:"password_hash"` Password string `json:"-" db:"-"` PasswordConfirm string `json:"-" db:"-"` }
User is used by pop to map your users database table to your go code.
func (*User) Validate ¶
Validate gets run every time you call a "pop.Validate*" (pop.ValidateAndSave, pop.ValidateAndCreate, pop.ValidateAndUpdate) method. This method is not required and may be deleted.
func (*User) ValidateCreate ¶
ValidateCreate gets run every time you call "pop.ValidateAndCreate" method. This method is not required and may be deleted.
func (*User) ValidateUpdate ¶
ValidateUpdate gets run every time you call "pop.ValidateAndUpdate" method. This method is not required and may be deleted.
Click to show internal directories.
Click to hide internal directories.