Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AuthCookie is cookie name used in autentication api, maybe use a injected parameter instead AuthCookie string = "olivsoftauth" // LoggedUser contains the UUID for the current user inside context LoggedUser string = "current-logged-user" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type SessionSigner ¶
type User ¶
type User struct { UUID uuid.UUID `gorm:"type:uuid;primaryKey" json:"uuid" binding:"-"` CreatedAt time.Time `json:"createdAt" binding:"-"` UpdatedAt time.Time `json:"updatedAt" binding:"-"` DeletedAt gorm.DeletedAt `json:"-" binding:"-"` FirstName string `json:"firstName" binding:"required"` LastName string `json:"lastName"` Email string `json:"email" gorm:"UNIQUE" binding:"required"` Username string `json:"username" gorm:"UNIQUE" binding:"required"` Password string `json:"password"` Active bool `json:"active" ` }
User domain/database representation
func (*User) BeforeCreate ¶
BeforeCreate execute commands before creating User
Click to show internal directories.
Click to hide internal directories.