Documentation ¶
Index ¶
- func CheckEmail(email string) bool
- func CreateUser(c *gin.Context) (*models.User, int)
- func CreateUserFromRequest(registrationForm *userValidator.RegistrationForm) (*models.User, error)
- func Exists(email string, pass string) (user *models.User, status int, err error)
- func FindByAPIToken(apiToken string) (*models.User, string, int, error)
- func FindByAPITokenAndName(apiToken string, username string) (*models.User, string, string, int, error)
- func FindByEmail(email string) (*models.User, string, int, error)
- func FindByID(id uint) (*models.User, int, error)
- func FindByUsername(username string) (*models.User, string, int, error)
- func FindForAdmin(id uint) (*models.User, int, error)
- func FindOldUploadsByUsername(username string) ([]uint, error)
- func FindOrCreate(username string) (models.User, int, error)
- func FindUsersByEmail(email string) []*models.User
- func FindUsersForAdmin(limit int, offset int) ([]models.User, int)
- func GetAll() ([]*models.User, int, error)
- func SessionByID(id uint) (*models.User, int, error)
- func SuggestUsername(username string) string
- func UpdateFromRequest(c *gin.Context, form *userValidator.UserForm, ...) (*models.User, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserFromRequest ¶
CreateUserFromForm creates a user from a registration form.
func FindByAPIToken ¶
RetrieveUserByAPIToken retrieves a user by an API token
func FindByAPITokenAndName ¶
func FindByAPITokenAndName(apiToken string, username string) (*models.User, string, string, int, error)
RetrieveUserByAPITokenAndName retrieves a user by an API token and his username
func FindByEmail ¶
GetByEmail retrieves a user by an email
func FindByUsername ¶
FindByUsername retrieves a user by username.
func FindForAdmin ¶
FindForAdmin retrieves a user for an administrator, preloads torrents.
func FindOldUploadsByUsername ¶
RetrieveOldUploadsByUsername retrieves olduploads by username
func FindOrCreate ¶
FindOrCreateUser creates a user.
func FindUsersByEmail ¶
RetrieveUsersByEmail retrieves users by an email
func FindUsersForAdmin ¶
FindUsersForAdmin retrieves users for an administrator, preloads torrents.
func SuggestUsername ¶
SuggestUsername suggest user's name if user's name already occupied.
Types ¶
This section is empty.