Documentation ¶
Index ¶
- func ActivateUser(id string) error
- func Close()
- func CreateRepo(ownerName, repoName string, visibility bool) error
- func CreateUser(id, name, email, password, picture string) error
- func DeleteUserSession(deviceId string) error
- func EmailIsRegistered(email string) bool
- func GetRepoByOwnerAndName(owner, name string) (models.Repo, error)
- func GetReposByOwner(ownerName string, includePrivate bool) ([]models.Repo, error)
- func GetUserByName(username string) (models.User, error)
- func GetUserByNameOrEmail(userOrMail string) (models.User, error)
- func GetUserSession(deviceId string) (models.User, error)
- func NameIsRegistered(name string) bool
- func Open()
- func SetUserSession(deviceId string, user models.User) error
- func UpdateRepo(data models.Repo) error
- func UpdateUser(data models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRepo ¶
register on database a repo with given author, name and visibility
func CreateUser ¶
use for register, it creates a new user in DB using assumed values
func DeleteUserSession ¶
func EmailIsRegistered ¶
check if a user with given email exists
func GetRepoByOwnerAndName ¶
owner username and repo name to retrieve a unique repo
func GetReposByOwner ¶
get all repos who has been created by given username
func GetUserByName ¶
use to retrieve data of user
func GetUserByNameOrEmail ¶
use for login, give as param a value that could be username or email of the searched user
func GetUserSession ¶
function to use on any logged-in route, to get context of the logged user data.
func SetUserSession ¶
function to use on login. Is to store the user data to persist across session
func UpdateUser ¶
replace picture, bio, displayname, amountrepositores, and password with given values
Types ¶
This section is empty.