Documentation
¶
Index ¶
- Variables
- func CreatePreSignedURL(otu *OneTimeURL) (err error)
- func CreateRole(Role *Role) (err error)
- func GetOTU(otu *OneTimeURL, id int) (err error)
- func GetOTUs(otu *[]OneTimeURL) (err error)
- func GetRole(Role *Role, id int) (err error)
- func GetRoles(Role *[]Role) (err error)
- func GetUser(User *User, id int) (err error)
- func GetUsers(User *[]User) (err error)
- func UpdateRole(Role *Role) (err error)
- func UpdateUser(User *User) (err error)
- func VerifyOTU(token string) error
- type OneTimeURL
- type Role
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrOTUInvalid = errors.New("invalid or expired OTU")
Functions ¶
func CreatePreSignedURL ¶
func CreatePreSignedURL(otu *OneTimeURL) (err error)
func GetOTU ¶
func GetOTU(otu *OneTimeURL, id int) (err error)
func GetOTUs ¶
func GetOTUs(otu *[]OneTimeURL) (err error)
Types ¶
type OneTimeURL ¶
type Role ¶
type Role struct {
gorm.Model
ID uint `gorm:"primary_key"`
Name string `gorm:"size:50;not null;unique" json:"name"`
Description string `gorm:"size:255;not null" json:"description"`
}
Role model
type User ¶
type User struct {
gorm.Model
ID uint `gorm:"primary_key"`
RoleID uint `gorm:"not null;DEFAULT:3" json:"role_id"`
Email string `gorm:"size:255;not null;unique" json:"email"`
Password string `gorm:"size:255;not null" json:"-"`
Role Role `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;" json:"-"`
}
func (*User) ValidateUserPassword ¶
Validate user password
Click to show internal directories.
Click to hide internal directories.